-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
38 lines (34 loc) · 1.08 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
variables:
# older versions of git have issues fetching.
GIT_STRATEGY: clone
before_script:
- docker info
- '[ -d tmp ] || mkdir tmp'
- git clone https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
- cp /systems/osc_certs/gpg/ondemand/.gpgpass $CI_PROJECT_DIR/tmp/ondemand-packaging/
- cp /systems/osc_certs/gpg/ondemand/ondemand.sec $CI_PROJECT_DIR/tmp/ondemand-packaging/
stages:
- build
- deploy
rpm-build:
stage: build
only:
- tags
script:
- ./tmp/ondemand-packaging/build.sh -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -u -v $CI_PROJECT_DIR/packaging
artifacts:
paths:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
rpm-deploy:
variables:
RLS_SCRIPT: "./tmp/ondemand-packaging/release.py"
RLS_KEY: "/systems/osc_certs/ssh/ondemand-packaging/id_rsa"
RLS_OUTPUT: "./tmp/output/*"
SECTION: "main"
stage: deploy
only:
- tags
script:
- if [[ "$CI_COMMIT_TAG" =~ .*_.* ]]; then export SECTION=ci; fi
- $RLS_SCRIPT --debug --pkey $RLS_KEY -c $SECTION $RLS_OUTPUT