ignore gitlab-ci

This commit is contained in:
Louis Abel 2024-05-16 00:48:56 -07:00
parent 5f6007ba0f
commit 1a473840ce
Signed by: label
GPG key ID: 2A6975660E424560

View file

@ -1,24 +0,0 @@
variables:
DOWNSTREAM_BRANCH: "rhel-10.0-beta"
default:
image: images.paas.redhat.com/osci/compose-utils:latest
push-to-rhel:
tags:
- docker
rules:
- if: $CI_PROJECT_ID == "24620603" && $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train" && $CI_COMMIT_BRANCH == "centos-10-stream"
script:
- echo "Trying to sync to new rhel"
- git remote add rhel_origin https://@gitlab.cee.redhat.com/rhel/release-engineering/pungi-redhat.git
- git fetch rhel_origin $DOWNSTREAM_BRANCH
- git fetch origin centos-10-stream
- ref=$(git rev-parse origin/centos-10-stream)
- git checkout rhel_origin/$DOWNSTREAM_BRANCH; git checkout -b update-$ref rhel_origin/$DOWNSTREAM_BRANCH
- "[[ $CI_COMMIT_SHA != $(git rev-parse origin/centos-10-stream) ]] && echo \"Pipeline doesn't have the latest revision of centos-10-stream branch, skipping\" && exit 1"
- merge_diff=`git merge-tree $(git merge-base rhel_origin/$DOWNSTREAM_BRANCH origin/centos-10-stream) rhel_origin/$DOWNSTREAM_BRANCH origin/centos-10-stream`
- echo "$merge_diff"
- git merge -m "Sync from centos - HEAD at $CI_COMMIT_MESSAGE" origin/centos-10-stream
- git push "https://gitlab-sync-token:$ACCESS_TOKEN_PUNGI@gitlab.cee.redhat.com/rhel/release-engineering/pungi-redhat.git" update-$ref -o merge_request.create -o merge_request.target=$DOWNSTREAM_BRANCH -o merge_request.merge_when_pipeline_succeeds
- while true; do if [ "$(curl -s https://gitlab.cee.redhat.com/api/v4/projects/83087/pipelines?sha=$ref | jq -r '.[0].status')" == "passed" ]; then echo "Downstream pipeline passed" && break; fi; done