forked from atharmarajah/Activity-CE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (46 loc) · 2.14 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
# Language used usually but in or case we wish to not run
# the default pip install command hence just setting the
# language to minimal will work.
language: minimal
notifications:
slack:
if: branch = dev OR branch = staging
on_pull_requests: false
secure: OzJ+zoqdrsgO0Fx2cfat1EyfcqwkBi5WJ9zRr5cEZxb6Y3mlkiURuzE1jgLyvOwzJln0H+eWNlUZ6sy9ijpoEdKDJtAftkOkbQuk1WWG+kzbZ2zhMxKP32B0Cemy44VP3aHljPmzQQN58Pfl+IO1GbxGSaGN/DUPW8NXdKC7+I3RlGHoh0pVoqsnJgNKzf2G9uAfVMujs7Mhc9n6qoUNFp8kRHgphOAEP0+B5ioG6/lei2WKhEPzn582ElHODFSfyg/TSzH4lFHAudgZQ6roA5b4CQRfUUg1hLC4m9NBBTFBMXk1IACWt1rBp9ufgKRrRCVs1n1w9JSITXB5c6cmONQuv6IgjIuJuqd+bH9sqxl5Hd/FBemkNXS5jcQ+IgGiO8sMGgvZ+ZCb1rgQdUH6vUykOgHpiIgfDbOXQf5uE/o7yiSVKh/QncbRZ96pStV2HR5KOyYK7d27UBmtRnA9GtNK0EAw+GpQfu4/jn6gaBpSoArpbLpKt8NksYfDcpyo//xLCrxN0u8VdLdayCXcJ2OaFw9imd5NDB55GV4BfxG3JOQnUNA1pAdSZWPmvb8COTfHPeAxyU24qGgURU0xLppCkz3QybSjIjtR55bLAuoqhfKEBsaJhWoYQP6XEG8/eZm18swqZQG4QEVEOEWkPLnxwRPjk9KkJiPYphlCkdI=
jobs:
include:
#@--- Stage to run tests ---@#
- state: Build_and_test
name: "Tests Stage"
sudo: required
- script:
- chmod +x ci-scripts/run_tests.sh
- ./ci-scripts/run_tests.sh
#@--- Stage to create the infrastructure ---@#
- stage: Infrastructure
name: "Setup_Infrastructure"
- script:
- export VER="0.12.21"
- wget https://releases.hashicorp.com/terraform/${VER}/terraform_${VER}_linux_amd64.zip
- unzip terraform_${VER}_linux_amd64.zip
- sudo mv terraform /usr/local/bin/
- chmod +x ci-scripts/create_infrastructure.sh && ./ci-scripts/create_infrastructure.sh
#@--- Stage to build and push image ---@#
- stage: Build docker Image
services:
- docker
name: "Build image"
- script:
- chmod +x ci-scripts/build_docker_image.sh
- ./ci-scripts/build_docker_image.sh
#@--- Stage to deploy application ---@#
- stage: Deploy
services:
- docker
name: "Deploy to DO"
sudo: required
- script:
- export FILE_PATH="/home/travis/.docker/config.json"
- chmod +x ci-scripts/deployment.sh
- sudo apt-get install snapd -y
- ./ci-scripts/deployment.sh