Skip to content

Commit

Permalink
merge into single step
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfranz committed Aug 1, 2019
1 parent 4bbf9e5 commit 1bb878e
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,17 @@ before_script:
- 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
- build_and_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 $CI_PROJECT_DIR/packaging
artifacts:
paths:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"


rpm-deploy:
rpm-build_and_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
stage: build_and_deploy
only:
- tags
script:
- if [[ "$CI_COMMIT_TAG" =~ .*_.* ]]; then export SECTION=ci; fi
- $RLS_SCRIPT --pkey $RLS_KEY -c $SECTION $RLS_OUTPUT
- (./tmp/ondemand-packaging/build.sh -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -u $CI_PROJECT_DIR/packaging) && ($RLS_SCRIPT --pkey $RLS_KEY -c $SECTION $RLS_OUTPUT) || echo "Fail!"

0 comments on commit 1bb878e

Please sign in to comment.