-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitlab-ci.yml
35 lines (31 loc) · 1.24 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
stages:
- tools
- journal
variables:
COMPOSE_FILES: --file docker-compose.yml --file docker-compose-gitlab.yml
.common:
tags:
- shell
tools:
stage: tools
extends:
- .common
script:
- docker login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
- docker run -v "$(pwd):/workdir" -v /var/run/docker.sock:/var/run/docker.sock --env CI_COMMIT_REF_NAME="${CI_COMMIT_REF_NAME}" --env CI_PIPELINE_IID="${CI_PIPELINE_IID}" --env CI_COMMIT_TAG="${CI_COMMIT_TAG}" --env CI_REGISTRY_USER="${CI_REGISTRY_USER}" --env CI_REGISTRY_PASSWORD="${CI_REGISTRY_PASSWORD}" --env CI_REGISTRY="${CI_REGISTRY}" --env CI_PROJECT_PATH="${CI_PROJECT_PATH}" ${CI_REGISTRY}/ci-utilities/ci-commands/gitlab-docker-compose-ci gitlab-docker-compose ${COMPOSE_FILES} --cache-from main tools
nature-scirep:
extends: .common
stage: journal
variables:
KNITR_DRAFT_MODE: "FALSE"
cache:
key: knitr
paths:
- cache
script:
- docker login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
- docker-compose ${COMPOSE_FILES} run paper
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}-nature-scirep"
paths:
- output