This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
54 lines (54 loc) · 4.46 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
language: node_js
node_js:
- 10.15.0
services:
- docker
jobs:
include:
- stage: test
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm install
script:
- npm run unit
- stage: deploy-dev
if: branch = master AND type = push
before_script:
- docker pull philm/ansible_playbook
- git clone -b master https://github.com/biojs/biojs-backend-ansible.git
- openssl aes-256-cbc -K $encrypted_89f8a6cbe683_key -iv $encrypted_89f8a6cbe683_iv
-in deployment-key.enc -out ~/.ssh/id_rsa -d
script:
- docker run -it -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v "$(pwd)/biojs-backend-ansible":/ansible/playbooks
-e DB_USER=$DB_USER
-e DB_PASSWORD=$DB_PASSWORD
-e GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET
-e GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID
philm/ansible_playbook dev-deploy.yml
--private-key=~/.ssh/id_rsa -u ubuntu -i dev_hosts
- stage: deploy-production
if: branch = production AND type = push
before_script:
- docker pull philm/ansible_playbook
- git clone -b production https://github.com/biojs/biojs-backend-ansible.git
- openssl aes-256-cbc -K $encrypted_89f8a6cbe683_key -iv $encrypted_89f8a6cbe683_iv
-in deployment-key.enc -out ~/.ssh/id_rsa -d
script:
- docker run -it -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v "$(pwd)/biojs-backend-ansible":/ansible/playbooks
-e DB_USER=$DB_USER
-e DB_PASSWORD=$DB_PASSWORD
-e GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET
-e GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID
philm/ansible_playbook production-deploy.yml
--private-key=~/.ssh/id_rsa -u ubuntu -i production_hosts
notifications:
email: true
env:
global:
- secure: r3HCwCd5xPZtJBxXPNLMoi6B4EE5XzpeDMZl0kt+5o7H/L9C70TB+gADahxE/MXXORJVAAEVETcWNZDvAFxz7hFXEpnCtkhe+QPAcAPPma6IWve7HVdt5/dW1wYt2/nauHFZU40R2VgLcJR487TiI911nOnJSRnL3Wea3RdwtdDpIWH4jndQYxdzQY5Pso+g12+BZflWbDqXNg3zRt4gKLW2wz3DKXigVC5De43fEID2okmjLVJmqjPYr1lh1eEroytW64icMpVq7J8Hxc0WED0w9WDqG5MAlfPuj2GvEEEh0CFchv15SeJXkrcv/32IPuCqJthnw4Pp/F67YeYLAOPKI2N5ihyc9qCs6/mTSrSn+M3I1mgVqJwZqS7Sf1aHWAB+d42WOAPvzsGP2XZqfnl14z9z708nV7aleMRBJgclnmAIeaCsVDXZRvrxpNWuYz0WWfWfRV2fhmWkPvpY1hqlPxpcCiCEZ7s2HDb5zumX89rfzjFRrFqzL2DRFOJbczKYaIeCpWFPuMQ0C0FmjAfugpTcmTNQ0VGiM4HoeGz6f7M5CEf/WYBe5Ul7MLsu3i5XmttSUk6w2qPBwUNe7cFmFlTpch1HSCx1W/cqaCnc5xapIhTI627GZ/d2L0bQ1pmPcjzOfOksNwM74VSZSfEMDh1hsHWY0L/9yOtalQg=
- secure: iY6aA7xsztmRP1YXvJhro2ys/N0f/84/fofU6Z659G7AtREqcWHqVE9yGVnjp6gRd1klaxuz5VBZ0DoxWQkLZle2wlf+HH7mPG/qPPvvhjt+L9eMbH4RHRy/COwo1CRD3e+PIpRE8Y6pMnWFZXnF3yPGfz9yfdTa0zuEKUnEW0IdiUSxeEbv2ycg+dAsQjsna4cfmFsNqkdU1RZ3tGANkLs8rINzeY1OuWPhlpubMZpDV+gIqjS1rBbvbVVTuRING4e0rLI/O09fAIPuppOR0OUWZ1rQh1ePMaLam2tbpKwFP60g3kUdk519X++/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