-
Notifications
You must be signed in to change notification settings - Fork 60
/
.gitlab-ci.yml
53 lines (47 loc) · 1.68 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
##############################################################################
# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and BLT
# project contributors. See the LICENSE file for details.
##############################################################################
variables:
PROJECT_ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
BUILD_ROOT: ${CI_PROJECT_DIR}
LLNL_SERVICE_USER: atk
CUSTOM_CI_BUILDS_DIR: /usr/workspace/atk/gitlab-runner
stages:
- allocate
- build
- release
####
# Template
.build_script:
script:
#Use pre-existing allocation if any
- JOBID=$(if [[ "$SYS_TYPE" == "toss_4_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi)
#BUILD + TEST
- echo -e "section_start:$(date +%s):build_and_test\r\e[0K
Build and test ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} .gitlab/build_and_test.sh
- echo -e "section_end:$(date +%s):build_and_test\r\e[0K"
artifacts:
reports:
junit: build/junit.xml
####
# Template
.run_project_integration_tests:
script:
- echo -e "section_start:$(date +%s):run_project_integration_tests\r\e[0K
Run project integration tests ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} .gitlab/run_project_integration_tests.sh
- echo -e "section_end:$(date +%s):build_and_test\r\e[0K"
artifacts:
reports:
junit: build/junit.xml
# This is where jobs are included
include:
- local: .gitlab/build_lassen.yml
- local: .gitlab/build_ruby.yml
- local: .gitlab/build_tioga.yml
# ID token requirement for Gitlab 17.0+
- project: 'lc-templates/id_tokens'
file: 'id_tokens.yml'