From 4dc56faa3ebdfad7f18516fc29bf461ab065dfeb Mon Sep 17 00:00:00 2001 From: "service-bot-app[bot]" <189278048+service-bot-app[bot]@users.noreply.github.com> Date: Sat, 28 Dec 2024 01:26:11 +0000 Subject: [PATCH] chore: update repo semaphore config --- .semaphore/semaphore.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 0ecf4974d20..8bb785f12d2 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -60,6 +60,34 @@ blocks: - ci-tools ci-push-tag - mvn -Pjenkins -U -Dmaven.wagon.http.retryHandler.count=10 --batch-mode -DaltDeploymentRepository=confluent-codeartifact-internal::default::https://confluent-519856050701.d.codeartifact.us-west-2.amazonaws.com/maven/maven-snapshots/ -DrepositoryId=confluent-codeartifact-internal deploy -DskipTests + - name: CP Jar Build CI Gating + dependencies: [] + run: + # Run this block only for pull requests + when: "pull_request =~ '.*'" + task: + agent: + machine: + type: s1-prod-ubuntu20-04-arm64-0 + env_vars: + - name: COMPONENT_NAME + value: common + jobs: + - name: Trigger and wait for CP Jar Build Task + commands: + # Don't run this block if target branch for PR is not a nightly branch or master branch + # cp-jar-build today doesn't support other branches + - | + if [[ "$SEMAPHORE_GIT_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]] || [[ "$SEMAPHORE_GIT_BRANCH" == "master" ]] ; then \ + echo "PR is targeted to ${SEMAPHORE_GIT_BRANCH} branch which is CP nightly or master branch. Triggering cp-jar-build task."; \ + sem-trigger -p packaging \ + -t cp-jar-build \ + -b $SEMAPHORE_GIT_BRANCH \ + -d "|" -i "CUSTOM_BRANCH_COMPONENTS|${COMPONENT_NAME}=${SEMAPHORE_GIT_WORKING_BRANCH}" \ + -w; \ + else \ + echo "PR is targeted to ${SEMAPHORE_GIT_BRANCH} branch which is not CP nightly or master branch. Skipping cp-jar-build task."; \ + fi; after_pipeline: task: