forked from usgs-coupled/phast3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (55 loc) · 2.13 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
#
# https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-database
# SRC 2020-12-02T18:39:55-07:00
#
image: ${CI_REGISTRY}/coupled/containers/buildpack-deps:bionic-scm
stages:
- trigger
before_script:
- eval $(ssh-agent -s)
- echo "${SSH_PRIVATE_KEY_ENC}" | base64 --decode | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan ${CI_SERVER_HOST} >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git config --global user.email "darth@empire.com"
- git config --global user.name "Darth Vader"
trigger-downstream:
stage: trigger
##
## Only run if on the master branch and the variable GROUP is set
##
## change this to
## only:
## - master@$GROUP/subtrees/phreeqc3-database
## and set GROUP to coupled before merge
only:
refs:
- master
variables:
- $GROUP
## Downstream Projects
## triggers and ids are stored at the group level
## iphreeqc https://code.chs.usgs.gov/coupled/iphreeqc
## iphreeqccom https://code.chs.usgs.gov/coupled/iphreeqccom
## phreeqcrm https://code.chs.usgs.gov/coupled/phreeqcrm
## phreeqc3 https://code.chs.usgs.gov/coupled/phreeqc3
## wphast https://code.chs.usgs.gov/coupled/wphast
script:
- echo triggering iphreeqc
- curl -X POST -F token=${IPHREEQC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${IPHREEQC_ID}/trigger/pipeline
- sleep 180
- echo triggering iphreeqccom
- curl -X POST -F token=${IPHREEQCCOM_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${IPHREEQCCOM_ID}/trigger/pipeline
- sleep 120
- echo triggering phreeqcrm
- curl -X POST -F token=${PHREEQCRM_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQCRM_ID}/trigger/pipeline
- sleep 120
- echo triggering phreeqc3
- curl -X POST -F token=${PHREEQC3_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQC3_ID}/trigger/pipeline
- sleep 360
- echo triggering wphast
- curl -X POST -F token=${WPHAST_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${WPHAST_ID}/trigger/pipeline
- sleep 180
## Upstream Projects
## none