Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use refactored ondemand-packaging #21

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 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

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/*