Skip to content

Commit

Permalink
Use refactored ondemand-packaging (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Jan 13, 2022
1 parent a123099 commit 8fda96d
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
variables:
# older versions of git have issues fetching.
GIT_STRATEGY: clone

# 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 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/
- git clone --branch main https://github.com/OSC/ondemand-packaging.git tmp/ondemand-packaging
stages:
- build
- deploy

rpm-build:
stage: build
only:
- tags
rules:
- if: $CI_COMMIT_TAG
- if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"'
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
- ./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: [el7, el8]
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 =~ /.*_.*/
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/*

0 comments on commit 8fda96d

Please sign in to comment.