2019-04-25 04:52:08 +07:00
|
|
|
language: go
|
2019-11-07 07:59:24 +07:00
|
|
|
|
2019-03-24 22:37:31 +07:00
|
|
|
required: sudo
|
2019-11-07 07:59:24 +07:00
|
|
|
|
2019-04-25 04:52:08 +07:00
|
|
|
go:
|
2019-11-07 07:59:24 +07:00
|
|
|
- '1.13'
|
|
|
|
|
2016-12-18 03:57:09 +07:00
|
|
|
services:
|
2019-11-07 07:59:24 +07:00
|
|
|
- docker
|
|
|
|
- ntp
|
|
|
|
- xvfb
|
2019-10-30 03:54:47 +07:00
|
|
|
|
2019-11-02 21:32:58 +07:00
|
|
|
addons:
|
|
|
|
chrome: stable
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- google-chrome
|
|
|
|
packages:
|
|
|
|
- libgif-dev
|
|
|
|
- google-chrome-stable
|
|
|
|
|
|
|
|
install: # Install ChromeDriver (64bits; replace 64 with 32 for 32bits).
|
|
|
|
- wget -N https://chromedriver.storage.googleapis.com/78.0.3904.70/chromedriver_linux64.zip -P ~/
|
|
|
|
- unzip ~/chromedriver_linux64.zip -d ~/
|
|
|
|
- rm ~/chromedriver_linux64.zip
|
|
|
|
- sudo mv -f ~/chromedriver /usr/local/share/
|
|
|
|
- sudo chmod +x /usr/local/share/chromedriver
|
|
|
|
- sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
|
|
|
|
|
2019-04-25 04:52:08 +07:00
|
|
|
before_script:
|
2019-11-07 07:59:24 +07:00
|
|
|
- export PATH=./cmd/authelia-scripts/:/tmp:$PATH
|
2019-11-02 21:32:58 +07:00
|
|
|
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
|
|
|
- nvm install v11 && nvm use v11 && npm i
|
|
|
|
- source bootstrap.sh
|
2019-10-30 03:54:47 +07:00
|
|
|
|
2019-11-07 07:59:24 +07:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: test
|
|
|
|
script:
|
2019-11-02 21:32:58 +07:00
|
|
|
- authelia-scripts --log-level debug ci
|
2019-11-07 07:59:24 +07:00
|
|
|
- &build-images
|
|
|
|
stage: build images
|
|
|
|
env:
|
|
|
|
- ARCH=amd64
|
|
|
|
install: skip
|
|
|
|
script:
|
|
|
|
- while sleep 9m; do echo '===== Prevent build from terminating ====='; done &
|
|
|
|
- authelia-scripts docker build --arch=$ARCH
|
|
|
|
- kill %1
|
|
|
|
after_success:
|
|
|
|
- authelia-scripts docker push-image --arch=$ARCH
|
2019-11-28 18:14:34 +07:00
|
|
|
- if [[ $TRAVIS_TAG ]]; then docker create --name authelia-binary clems4ever/authelia:$TRAVIS_TAG-$ARCH && docker cp authelia-binary:/usr/app/authelia ./authelia-linux-$ARCH && docker cp authelia-binary:/usr/app/public_html ./ && tar -czf authelia-linux-$ARCH.tar.gz authelia-linux-$ARCH public_html; fi
|
|
|
|
before_deploy:
|
|
|
|
- echo Deploying Authelia $TRAVIS_TAG-$ARCH to GitHub Releases
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: '$GITHUB_API_KEY'
|
|
|
|
file_glob: true
|
|
|
|
file: 'authelia-linux-$ARCH.tar.gz'
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
2019-11-07 07:59:24 +07:00
|
|
|
- <<: *build-images
|
|
|
|
env:
|
|
|
|
- ARCH=arm32v7
|
|
|
|
- <<: *build-images
|
|
|
|
env:
|
|
|
|
- ARCH=arm64v8
|
|
|
|
- stage: deploy manifests
|
|
|
|
env:
|
|
|
|
- DOCKER_CLI_EXPERIMENTAL=enabled
|
|
|
|
install: skip
|
|
|
|
script:
|
|
|
|
- authelia-scripts docker push-manifest
|
2019-10-30 03:54:47 +07:00
|
|
|
|
2016-12-18 03:57:09 +07:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
recipients:
|
2019-11-07 07:59:24 +07:00
|
|
|
- clement.michaud34@gmail.com
|
2016-12-18 03:57:09 +07:00
|
|
|
on_success: change
|
|
|
|
on_failure: always
|