-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
79 lines (73 loc) · 2.45 KB
/
.gitlab-ci.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
stages:
- build
- deploy
build_and_test:
stage: build
script:
- cd src
- dotnet restore App.sln
- dotnet build App.sln
- dotnet test App.sln
- cd Web.Api/VueClient
- npm run test:unit
deploy_production:
stage: deploy
variables:
VIRTUAL_HOST: onso.colab.duke.edu
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f ./src/docker-compose.yml build
- docker-compose -f ./src/docker-compose.yml push
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml pull
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml up -d
environment:
name: production
url: https://onso.colab.duke.edu/
when: manual
only:
- master
deploy_staging:
stage: deploy
variables:
VIRTUAL_HOST: onso-staging.colab.duke.edu
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f ./src/docker-compose.yml build
- docker-compose -f ./src/docker-compose.yml push
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml pull
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml up -d
environment:
name: staging
url: https://onso-staging.colab.duke.edu/
only:
- dev
deploy_dev:
stage: deploy
variables:
VIRTUAL_HOST: onso-dev.colab.duke.edu
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f ./src/docker-compose.yml build
- docker-compose -f ./src/docker-compose.yml push
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml pull
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml up -d
environment:
name: dev
url: https://onso-dev.colab.duke.edu/
only:
- /^ev\d\/sprint\d$/
deploy_cannon:
stage: deploy
variables:
VIRTUAL_HOST: onso-cannon.colab.duke.edu
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f ./src/docker-compose.yml build
- docker-compose -f ./src/docker-compose.yml push
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml pull
- docker-compose -H "ssh://[email protected]" -f ./src/docker-compose.yml up -d
environment:
name: cannon
url: https://onso-cannon.colab.duke.edu/
only:
- feature/bcman