-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
36 lines (33 loc) · 1.05 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
variables:
# older versions of git have issues fetching.
GIT_STRATEGY: clone
OOD_PACKAGING_DEBUG: 'true'
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
OOD_PACKAGING_GPG_PASSPHRASE: /systems/osc_certs/gpg/ondemand/.gpgpass
before_script:
- docker info
- '[ -d tmp ] || mkdir tmp'
- git clone --branch main https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
stages:
- build
- deploy
rpm-build:
stage: build
rules:
- if: $CI_COMMIT_TAG
- if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"'
script:
- ./tmp/ondemand-packaging/bin/ood_packaging -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -T $CI_PROJECT_DIR
parallel:
matrix:
- OOD_PACKAGING_DIST: [el8]
artifacts:
paths:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
rpm-deploy:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c main ./tmp/output/*