-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
55 lines (50 loc) · 1.99 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
54
##############################################################################
# Copyright (c) 2019-2021, Lawrence Livermore National Security, LLC and
# RADIUSS project contributors. See the COPYRIGHT file for details.
#
# SPDX-License-Identifier: (MIT)
##############################################################################
#[create-unique-path--]
variables:
# Use the umdev LLNL service user to run CI. This prevents from running
# pipelines as an actual user.
LLNL_SERVICE_USER: bradiuss
# Use the service user workspace. Solves permission issues, stores everything
# at the same location whoever triggers a pipeline.
CUSTOM_CI_BUILDS_DIR: /usr/workspace/bradiuss/gitlab-runner
# Unique paths
MY_SPACK_PARENT_DIR: ${CUSTOM_CI_BUILDS_DIR}/llnl-stack-${CI_PIPELINE_ID}
MY_SPACK_PATH: ${CUSTOM_CI_BUILDS_DIR}/llnl-stack-${CI_PIPELINE_ID}/spack
MY_SPACK_USER_CACHE: /dev/shm/llnl-stack-${CI_PIPELINE_ID}-${CI_JOB_ID}/spack-cache
SPACK_USER_CACHE_PATH: ${CUSTOM_CI_BUILDS_DIR}/llnl-stack-${CI_PIPELINE_ID}/spack-user-cache
#[--create-unique-path]
SPACK_DISABLE_LOCAL_CONFIG: ""
MY_SPACK_DEBUG: ""
stages:
- setup
- generate
- build
- clean
include:
- project: 'lc-templates/id_tokens'
file: 'id_tokens.yml'
- local: .gitlab/core-ci.yml
rules:
- if: $MY_ENV_NAME != null
- local: spack-environments/${MY_ENV_NAME}/pipeline.yml
rules:
- if: $MY_ENV_NAME != null
# Run a simple jobs to display instructions when no env name was specified.
no-env-name:
tags: [shell, oslic]
rules:
- if: $MY_ENV_NAME == null
when: always
- when: never
stage: setup
script:
echo -e "\e[31mVariable \"MY_ENV_NAME\" was not set.\e[0m"
echo -e "\e[31m\"MY_ENV_NAME\" is required and should point to an existing directory in spack-environments.\e[0m"
echo -e "\e[31m\"MY_ENV_NAME\" can only be defined in GitLab UI (see documentation).\e[0m"
echo -e "\e[31mAvailable environments \e[0m"
echo -e "\e[31$(ls --ignore empty spack-environments)\e[0m"