-
Notifications
You must be signed in to change notification settings - Fork 106
/
.gitlab-ci.yml
105 lines (99 loc) · 4.03 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
before_script:
- docker info
- MAJOR_VERSION=$(echo "${CI_COMMIT_TAG#v}" | cut -d'.' -f1)
- MINOR_VERSION=$(echo "${CI_COMMIT_TAG#v}" | cut -d'.' -f2)
- '[ "x$CI_COMMIT_TAG" != "x" ] && OOD_PACKAGING_RELEASE="${MAJOR_VERSION}.${MINOR_VERSION}" || OOD_PACKAGING_RELEASE=main'
- bundle install --path vendor/bundle --without test
stages:
- build
- deploy
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
OOD_PACKAGING_DEBUG: 'true'
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand-sha512.sec
OOD_PACKAGING_GPG_PASSPHRASE: /systems/osc_certs/gpg/ondemand/.gpgpass
build-nightly:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
script:
- bundle exec rake package:build[$OOD_PACKAGING_DIST,$OOD_PACKAGING_ARCH,true]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
# Ubuntu 24.04 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [ubuntu-24.04]
OOD_PACKAGING_ARCH: [x86_64, ppc64le]
# Amazon 2023 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [amzn2023]
OOD_PACKAGING_ARCH: [x86_64]
timeout: 4h
artifacts:
paths:
- dist
name: "$CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA"
build:
stage: build
rules:
- if: $CI_COMMIT_TAG
# Re-enable once Gitlab instance using plugin to integrate with Github
# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"'
- if: '$CI_COMMIT_BRANCH !~ /^(master|release_[0-9]\.[0-9])$/ && $CI_COMMIT_TAG == null'
script:
- bundle exec rake package:build[$OOD_PACKAGING_DIST,$OOD_PACKAGING_ARCH]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
# Ubuntu 24.04 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [ubuntu-24.04]
OOD_PACKAGING_ARCH: [x86_64, ppc64le]
# Amazon 2023 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [amzn2023]
OOD_PACKAGING_ARCH: [x86_64]
timeout: 4h
artifacts:
paths:
- dist
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
deploy-nightly:
stage: deploy
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
script:
- mkdir tmp
- echo "Clone ondemand-packaging branch ${OOD_PACKAGING_RELEASE}"
- git clone --single-branch --branch $OOD_PACKAGING_RELEASE https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c nightly ./dist/*
deploy-build:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- mkdir tmp
- echo "Clone ondemand-packaging branch ${OOD_PACKAGING_RELEASE}"
- git clone --single-branch --branch $OOD_PACKAGING_RELEASE https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c build -r $CI_COMMIT_TAG ./dist/*
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- mkdir tmp
- echo "Clone ondemand-packaging branch ${OOD_PACKAGING_RELEASE}"
- git clone --single-branch --branch $OOD_PACKAGING_RELEASE https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c main ./dist/*