From 1590d2044199e904e5f0837656bf80efb9784862 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Thu, 13 Jan 2022 11:19:34 -0500 Subject: [PATCH] Use refactored ondemand-packaging --- .gitlab-ci.yml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd1996e..4cda477 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,42 +1,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 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/*