diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6073aef717..60963c35cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file + - (./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!"