forked from OSC/bc_osc_rstudio_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (37 loc) · 1.13 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
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-ci:
stage: deploy
only:
- tags
script:
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c ci ./tmp/output/*
rpm-deploy:
stage: deploy
only:
- tags
except:
variables:
- $CI_COMMIT_TAG =~ /.*_.*/
script:
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c main ./tmp/output/*