-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci-prod.yml
73 lines (67 loc) · 2.09 KB
/
.gitlab-ci-prod.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
image: humancellatlas/dss-build-box
# The Docker image `humancellatlas/dss-build-box` is created through a manual process from
# `${DSS_HOME}/allspark.Dockerfile`. See the contents of `${DSS_HOME}/allspark.Dockerfile`
# creation and usage instructions.
variables:
GIT_SUBMODULE_STRATEGY: normal
DSS_ES_TIMEOUT: 30
DSS_UNITTEST_OPTS: "-v"
GITHUB_API: "https://api.github.com"
stages:
- deploy
- fusillade
- test
before_script:
- date && date -u
# TODO: figure out how to get the gitlab-runner to not clone the repo as root - Brian H
- cp -r /HumanCellAtlas/data-store ~/data-store && cd ~/data-store
- git reset --hard HEAD
- virtualenv ~/venv
- source ~/venv/bin/activate
- pip install -r requirements-dev.txt
- source environment
- source environment.prod
- scripts/dss-ops.py secrets get application_secrets.json > application_secrets.json
- scripts/dss-ops.py secrets get gcp-credentials.json > gcp-credentials.json
- export GOOGLE_APPLICATION_CREDENTIALS=$(pwd -P)/gcp-credentials.json
setup_fusillade:
stage: fusillade
script:
- git clone -b master https://github.com/HumanCellAtlas/dcp-fusillade.git
- cd dcp-fusillade
# currently, there is no environment.prod in the dcp-fusillade repo
- source environment # && source environment.prod
- cd ..
- source environment
- if [[ -f "environment.$CI_COMMIT_REF_NAME" ]]; then
- source environment.$CI_COMMIT_REF_NAME
- fi
- cat ./roles.json | sed "s/\${stage}/${DSS_DEPLOYMENT_STAGE}/g" > temp-roles.json
- FUS_STAGE=$DSS_DEPLOYMENT_STAGE
- python -m json.tool ./temp-roles.json > /dev/null || exit 1
- dcp-fusillade/scripts/setup_fusillade.py --file temp-roles.json --force $FUS_STAGE
- scripts/check_fusillade.py $FUS_STAGE
except:
- schedules
only:
- prod
deploy:
stage: deploy
script:
- make plan-infra
- make deploy
- scripts/set_version.sh
environment:
name: prod
url: https://dss.data.humancellatlas.org
only:
- prod
when: manual
test:
stage: test
script:
- make smoketest-prod
dependencies:
- deploy
only:
- prod