Skip to content

Commit

Permalink
Use same gitlab-ci as ondemand
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Mar 4, 2020
1 parent c58238f commit a920495
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,44 @@ stages:
- build
- deploy

rpm-build:
variables:
GIT_STRATEGY: clone

rpm-build-el7:
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 -C -d el7 $CI_PROJECT_DIR/packaging
artifacts:
paths:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"

rpm-build-el8:
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
- ./tmp/ondemand-packaging/build.sh -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -u -v -C -d el8 $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:
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
except:
variables:
- $CI_COMMIT_TAG =~ /.*_.*/
script:
- if [[ "$CI_COMMIT_TAG" =~ .*_.* ]]; then export SECTION=ci; fi
- $RLS_SCRIPT --debug --pkey $RLS_KEY -c $SECTION $RLS_OUTPUT
- ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c main ./tmp/output/*

0 comments on commit a920495

Please sign in to comment.