-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathecohealthalliance.gitlab-ci.yml
More file actions
43 lines (41 loc) · 1.03 KB
/
ecohealthalliance.gitlab-ci.yml
File metadata and controls
43 lines (41 loc) · 1.03 KB
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
stages:
- build-image
- fit
build-testing-image:
stage: build-image
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
DOCKER_HOST: tcp://docker:2375/
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
only:
changes:
- "DESCRIPTION"
- "Dockerfile"
when: always
run-drake:
stage: fit
image: $CI_REGISTRY_IMAGE:latest
cache:
key: "$CI_PROJECT_PATH"
paths:
- .drake/
artifacts:
name: "$CI_JOB_NAME"
paths:
- artifacts/
reports:
metrics: artifacts/metrics.txt
before_script:
- Rscript -e "remotes::install_deps()"
script:
- ./make.R
- zip -r artifacts/drake_cache.zip .drake
when: always