Skip to content

Commit 8bbd705

Browse files
chore: update repo semaphore config (#10984)
1 parent dd12cff commit 8bbd705

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.semaphore/semaphore.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,34 @@ blocks:
6262
- mvn -Ddocker.skip=true -U -Dmaven.wagon.http.retryHandler.count=10 --batch-mode
6363
-DaltDeploymentRepository=confluent-codeartifact-internal::default::https://confluent-519856050701.d.codeartifact.us-west-2.amazonaws.com/maven/maven-snapshots/
6464
-DrepositoryId=confluent-codeartifact-internal deploy -DskipTests
65+
- name: CP Jar Build CI Gating
66+
dependencies: []
67+
run:
68+
# Run this block only for pull requests
69+
when: "pull_request =~ '.*'"
70+
task:
71+
agent:
72+
machine:
73+
type: s1-prod-ubuntu24-04-arm64-00
74+
env_vars:
75+
- name: COMPONENT_NAME
76+
value: ksqldb
77+
jobs:
78+
- name: Trigger and wait for CP Jar Build Task
79+
commands:
80+
# Don't run this block if target branch for PR is not a nightly branch or master branch
81+
# cp-jar-build today doesn't support other branches
82+
- |
83+
if [[ "$SEMAPHORE_GIT_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]] || [[ "$SEMAPHORE_GIT_BRANCH" == "master" ]] ; then \
84+
echo "PR is targeted to ${SEMAPHORE_GIT_BRANCH} branch which is CP nightly or master branch. Triggering cp-jar-build task."; \
85+
sem-trigger -p packaging \
86+
-t cp-jar-build \
87+
-b $SEMAPHORE_GIT_BRANCH \
88+
-d "|" -i "CUSTOM_BRANCH_COMPONENTS|${COMPONENT_NAME}=${SEMAPHORE_GIT_WORKING_BRANCH}" \
89+
-w; \
90+
else \
91+
echo "PR is targeted to ${SEMAPHORE_GIT_BRANCH} branch which is not CP nightly or master branch. Skipping cp-jar-build task."; \
92+
fi;
6593
6694
after_pipeline:
6795
task:

0 commit comments

Comments
 (0)