-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathsubscribed-pipelines.yml
More file actions
80 lines (68 loc) · 2.07 KB
/
Copy pathsubscribed-pipelines.yml
File metadata and controls
80 lines (68 loc) · 2.07 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
###############################################################################
# Copyright (c) 2016-23, Lawrence Livermore National Security, LLC and RADIUSS
# project contributors. See the RAJA/LICENSE file for details.
#
# SPDX-License-Identifier: (MIT)
###############################################################################
# The template job to test whether a machine is up.
# Expects CI_MACHINE defined to machine name.
.machine-check:
stage: machine-checks
tags: [shell, oslic]
variables:
GIT_STRATEGY: none
script:
- |
if [[ $(jq '.[env.CI_MACHINE].total_nodes_up' /usr/global/tools/lorenz/data/loginnodeStatus) == 0 ]]
then
echo -e "\e[31mNo node available on ${CI_MACHINE}\e[0m"
curl --url "https://api.github.com/repos/${GITHUB_PROJECT_ORG}/${GITHUB_PROJECT_NAME}/statuses/${CI_COMMIT_SHA}" \
--header 'Content-Type: application/json' \
--header "authorization: Bearer ${GITHUB_TOKEN}" \
--data "{ \"state\": \"failure\", \"target_url\": \"${CI_PIPELINE_URL}\", \"description\": \"GitLab ${CI_MACHINE} down\", \"context\": \"ci/gitlab/${CI_MACHINE}\" }"
exit 1
fi
###
# Trigger a build-and-test pipeline for a machine.
# Comment the jobs for machines you don’t need.
###
# RUBY
ruby-up-check:
variables:
CI_MACHINE: "ruby"
extends: [.machine-check]
ruby-build-and-test:
variables:
CI_MACHINE: "ruby"
needs: [ruby-up-check]
extends: [.build-and-test]
# CORONA
corona-up-check:
variables:
CI_MACHINE: "corona"
extends: [.machine-check]
corona-build-and-test:
variables:
CI_MACHINE: "corona"
needs: [corona-up-check]
extends: [.build-and-test]
# TIOGA
tioga-up-check:
variables:
CI_MACHINE: "tioga"
extends: [.machine-check]
tioga-build-and-test:
variables:
CI_MACHINE: "tioga"
needs: [tioga-up-check]
extends: [.build-and-test]
# LASSEN
lassen-up-check:
variables:
CI_MACHINE: "lassen"
extends: [.machine-check]
lassen-build-and-test:
variables:
CI_MACHINE: "lassen"
needs: [lassen-up-check]
extends: [.build-and-test]