-
Notifications
You must be signed in to change notification settings - Fork 52
/
.travis.yml
86 lines (82 loc) · 4.96 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
dist: xenial
sudo: required
language: ruby
rvm:
- ruby-2.4.4
services:
- redis-server
- mysql
env:
global:
- GATE_SERVER_URL=gate.server/url
- SIGN_IN_TYPE=
- GATE_OAUTH_CLIENT_ID=totally_secret_client_id
- GATE_OAUTH_CLIENT_SECRET=totally_secret
- GATE_HOSTED_DOMAIN=gate.domain
- GATE_HOSTED_DOMAINS=test1.com,test2.com
- GATE_DB_HOST=localhost
- GATE_DB_PORT=3306
- GATE_DB_NAME=
- GATE_DB_USER=root
- GATE_DB_PASSWORD=
- CACHE_HOST=localhost
- CACHE_PORT=6379
- SECRET_KEY_BASE=
- SECRET_API_KEY=
- GATE_CONFIG_SECRET=gate_pw_secret
- USER_ROLES=employee,consultant
- UID_BUFFER=5000
- DEFAULT_HOST_PATTERN=s*
- PRODUCT_LIST=pr1,pr2
- SAML_APPS=datadog
- secure: Q2/gUeT/Y6IUKsRzgiiE6HGxLcHAzTtVCv6+6TcQnpJL9+HEO06+ISwekNXHRe/2BNMiWzDG5ufqo2YpA1j9h8899KAJZRYDULbbV0o8nrpT2kZSac1ZejBVYb/SrhDk8wrnQxQ061o6SdKpFEEwbIiJDzaqeQkv4tkyw3dEOq6+FRGS/QXj3mPIIArPbNCOtwcvnmg0mGIuPAAxuRZmz4Tuk2F6JdR4LrZstf33mvUYqbTw02Kl7UoErFjGSx2Ti+JPYIVDJ6D8pNCjv5va3awJskcXE5bj0evR5+OiP69GK6T2/UbP+QKwN2J36Pb9RxBKGuEkBTNuduch+h+RMiYk0A8MDO3Sy47i2v8Oj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ljH0IDVhPPKQsMHaVKtaqEeiTCRXCqkJd0DMUDeqyRcccwPDJSy9HeZns6E+zQDCGaC/tmFwDUWy5BYpairWd7sdw436iOeTmQ2fJ8SQ9lBr9LGpk8NwDmkYqg14fnOraIhw70tiWv9Wn82mEv+OwY4iKphOv2ZXEBeJYitoT1LQmhnaVvNvax16TYIY3Mxh89Oy2gVkKCgvbR9q1NmAIiWmMTyCLWxF0bd6A6Q+dHDDaQZF0pDsQqe83rnoA0xuaJUF9dh+ahvW0bn0aVFIa8tWgiBEMXWxHEDuEyfCWFis9vf3uj1xJl0SV0ktE5oIRzaF/0cTQorAwRy0UpN1HxK1yB9aITCad/BJ9ERK8MXYnfzC65jn2zHuQMjBz9Aeig4sgLc4IgtGM2DzabsIkhYG3ygL1TYaXXSj5Mo2KDwOuaZ46C7B6qxlzcesPmSnM3KF1CBatRZQK5tjsMm5GnxXKKtqg/udGtOA2fELlNolFsojtpmO4A79TAnebRUpEsU2vP0da1x7yTD5+2NWg6dnvq7tA3c5b8qBK2cAMnCHS0gmjaN3RYeFhLYO55dHDdmx/DNyQQ1V/YEkuisy80=
- COMMIT=${TRAVIS_COMMIT::8}
- DOCKER_COMPOSE_VERSION=1.11.2
before_install:
- gem update --system
- gem install bundler
stages:
- build, test and releases
- name: build and publish docker
if: (branch = master OR tag IS present) and type != pull_request
jobs:
include:
- stage: build, test and releases
script:
- sudo mysql_upgrade -u root
- sudo service mysql restart
- mysql -e 'CREATE DATABASE IF NOT EXISTS gate_test;'
- gem install bundler
- bundle package --all
- bundle install --binstubs --local
- bundle exec rake db:migrate
- bundle exec rake spec
- bundle exec rake assets:precompile RAILS_ENV=production
before_deploy:
- "rm -rf $TRAVIS_BUILD_DIR/*.tar.gz"
- "tar zcf gate-$TRAVIS_TAG.tar.gz -C $TRAVIS_BUILD_DIR ./*"
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: VWDGnrtrECoeJBATfe71HdpvnD15IKTkHWq/cQDfo9FTrm005ngTusQpW0eim76tSTMcJ1OBLoE9aAkd4Szi00TWenNPaAWHtgodcvNXxjqyZEtznRmtZW/vSk2H+iwJxJZoPDMZqStjmmSoD0dA1t2GLGltFzeJ5Y409YeroLUsVdRcTJY0mvQYbuLt1aZCu76gY5nB01yH7ib4ykZllJQbkyX57TKBYSLoQVUQ3hqo9BLUoROknHSfFGBHjSN9D3zIqKoh0XDOuTnyMHB+zMGmjjJbHMx5Z2eW1NW1HvpqDUOPl8uRnUEoCCfujA7OUlGgdadRBeUJObzpNkpQUNLEh5zIIr9NAZzjunzYkMiMZIseTNflJ6HOajld2Bcgz3PcbzM8hcIFog5loE7CBLWEzDoOIY/B75NYuHPIzRzTbgw7jf8XdfypCNMm0RLWiCXiDmuDMcNPZT9NrrheNGFz1CDmWkwpJmUTIv8J13J2Ux9ex1NY9iSRD8rgJ+bLOfp/u1nJWjACki8zq2/vffm2oUWz/R7q23Keq5Itddpe3mJUyFjokTUZPNSAlC45rF+rgK4ka7yJb+ZZAOaq/N8iIfVkgnfviWtaPQzAWRkO8J8Wzt1GrfQpNlo2BMM6Cpy0iV9ANYqAVYerImAopMWlzQmjbtt8P+xmmYA0FIw=
file_glob: true
file: $TRAVIS_BUILD_DIR/*.tar.gz
on:
tags: true
repo: gate-sso/gate
- stage: build and publish docker
install: skip
script:
- gem install bundler
- bundle install
- bundle exec rake assets:precompile RAILS_ENV=production
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t gatesso/gate:latest .
- if [ -n "$TRAVIS_TAG" ]; then
docker tag gatesso/gate:latest gatesso/gate:$TRAVIS_TAG;
fi
- docker images
- docker push gatesso/gate