-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
39 lines (36 loc) · 1.59 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
# This CI runs on NERSC
variables:
# Cori queue submission options.
SCHEDULER_PARAMETERS: "-C haswell -M escori -q xfer -N1 -t 01:00:00 -A m1727"
GIT_SUBMODULE_STRATEGY: recursive
# How is this workflow triggered?
workflow:
rules:
# Can only be initiated via a trigger token.
- if: $CI_PIPELINE_SOURCE == "trigger"
when: always
# The CI job.
example:
# Running on Cori.
tags: [cori]
script:
# Script loads desc-python Conda environment and runs tests.
- curl -O https://portal.nersc.gov/cfs/lsst/txpipe/data/example.tar.gz
- tar -zxvf example.tar.gz
- shifter --image=joezuntz/txpipe ceci examples/metadetect/pipeline.yml
# Trigger the status repository CI workflow to report results.
- >
curl -X POST --fail
--form "variables[GITLAB_STATUS_REPO]=$GITLAB_STATUS_REPO"
--form "variables[GITLAB_TARGET_REPO]=$GITLAB_TARGET_REPO"
--form "variables[GITLAB_MIRROR_REPO]=$GITLAB_MIRROR_REPO"
--form "variables[GITHUB_SOURCE_REPO]=$GITHUB_SOURCE_REPO"
--form "variables[GITHUB_SOURCE_BRANCH]=$GITHUB_SOURCE_BRANCH"
--form "variables[GITLAB_TARGET_PROJECT_NUMBER]=$GITLAB_TARGET_PROJECT_NUMBER"
--form "variables[GITLAB_MIRROR_PROJECT_NUMBER]=$GITLAB_MIRROR_PROJECT_NUMBER"
--form "variables[GITLAB_STATUS_PROJECT_NUMBER]=$GITLAB_STATUS_PROJECT_NUMBER"
--form "variables[GITLAB_STATUS_CONTEXT]=$GITLAB_STATUS_CONTEXT"
--form "variables[GITHUB_SHA]=$GITHUB_SHA"
--form token=$STATUS_TRIGGER_TOKEN
--form ref=main
https://software.nersc.gov/api/v4/projects/$GITLAB_STATUS_PROJECT_NUMBER/trigger/pipeline