Skip to content

Commit 7e3bdc2

Browse files
Merge branch '7.6.x' into 7.7.x by wadhwa1
2 parents 82d07c8 + e08f4ef commit 7e3bdc2

File tree

4 files changed

+98
-12
lines changed

4 files changed

+98
-12
lines changed

.semaphore/cp_dockerfile_build.yml

+34-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: v1.0
77
name: build-test-release
88
agent:
99
machine:
10-
type: s1-prod-ubuntu20-04-amd64-1
10+
type: s1-prod-ubuntu24-04-amd64-1
1111

1212
fail_fast:
1313
cancel:
@@ -78,6 +78,28 @@ global_job_config:
7878
- export LATEST_TAG=$BRANCH_TAG-latest
7979
- export DOCKER_UPSTREAM_TAG="$LATEST_TAG"
8080
- export DOCKER_REPOS="confluentinc/kafka-streams-examples"
81+
- export COMMUNITY_DOCKER_REPOS=""
82+
- |
83+
if [[ $SKIP_COMMUNITY == "True" ]]; then
84+
# Filter out community repos from DOCKER_REPOS
85+
DOCKER_REPOS=$(comm -23 <(echo "$DOCKER_REPOS" | tr ' ' '\n' | sort) <(echo "$COMMUNITY_DOCKER_REPOS" | tr ' ' '\n' | sort) | tr '\n' ' ' | xargs)
86+
export DOCKER_REPOS
87+
echo "DOCKER_REPOS after skipping community images - $DOCKER_REPOS"
88+
89+
# Set Maven arguments for skipping community modules
90+
export MAVEN_EXTRA_ARGS=""
91+
92+
# Check if current DOCKER_IMAGE is in community repos, skip job execution
93+
for skip_repo in $COMMUNITY_DOCKER_REPOS; do
94+
if [ "$skip_repo" = "$DOCKER_IMAGE" ]; then
95+
echo "Skipping build for $DOCKER_IMAGE as it is in COMMUNITY_DOCKER_REPOS list"
96+
export SEMAPHORE_JOB_RESULT=passed
97+
return 130
98+
fi
99+
done
100+
else
101+
export MAVEN_EXTRA_ARGS=""
102+
fi
81103
- export DOCKER_DEV_TAG="dev-$BRANCH_TAG-$BUILD_NUMBER"
82104
- export AMD_ARCH=.amd64
83105
- export ARM_ARCH=.arm64
@@ -107,7 +129,7 @@ blocks:
107129
- export PACKAGING_BUILD_ARGS="$PACKAGING_BUILD_ARGS -DCONFLUENT_PACKAGES_REPO=$PACKAGES_URL"
108130
- mvn -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -P jenkins,docker clean package dependency:analyze validate -U -Ddocker.registry=$DOCKER_DEV_REGISTRY -Ddocker.upstream-registry=$DOCKER_UPSTREAM_REGISTRY
109131
-DBUILD_NUMBER=$BUILD_NUMBER -DGIT_COMMIT=$GIT_COMMIT -Ddocker.tag=$DOCKER_DEV_TAG$OS_TAG$AMD_ARCH -Ddocker.upstream-tag=$DOCKER_UPSTREAM_TAG$OS_TAG -Darch.type=$AMD_ARCH -Ddocker.os_type=ubi8
110-
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
132+
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS
111133
- . cache-maven store
112134
- >-
113135
for dev_image in $AMD_DOCKER_DEV_FULL_IMAGES;
@@ -128,6 +150,9 @@ blocks:
128150
task:
129151
jobs:
130152
- name: Deploy AMD confluentinc/kafka-streams-examples ubi8
153+
env_vars:
154+
- name: DOCKER_IMAGE
155+
value: confluentinc/kafka-streams-examples
131156
commands:
132157
- export OS_TAG="-ubi8"
133158
- export PROD_IMAGE_NAME=${DOCKER_PROD_REGISTRY}confluentinc/kafka-streams-examples
@@ -156,7 +181,7 @@ blocks:
156181
task:
157182
agent:
158183
machine:
159-
type: s1-prod-ubuntu20-04-arm64-1
184+
type: s1-prod-ubuntu24-04-arm64-1
160185
jobs:
161186
- name: Build & Test ubi8
162187
commands:
@@ -167,7 +192,7 @@ blocks:
167192
- ci-tools ci-update-version
168193
- mvn -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -P jenkins,docker clean package dependency:analyze validate -U -Ddocker.registry=$DOCKER_DEV_REGISTRY -Ddocker.upstream-registry=$DOCKER_UPSTREAM_REGISTRY
169194
-DBUILD_NUMBER=$BUILD_NUMBER -DGIT_COMMIT=$GIT_COMMIT -Ddocker.tag=$DOCKER_DEV_TAG$OS_TAG$ARM_ARCH -Ddocker.upstream-tag=$DOCKER_UPSTREAM_TAG$OS_TAG -Darch.type=$ARM_ARCH -Ddocker.os_type=ubi8
170-
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
195+
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS
171196
- . cache-maven store
172197
- for image in $ARM_DOCKER_DEV_FULL_IMAGES; do echo "Pushing $image" && docker push $image; done
173198
epilogue:
@@ -183,9 +208,12 @@ blocks:
183208
task:
184209
agent:
185210
machine:
186-
type: s1-prod-ubuntu20-04-arm64-1
211+
type: s1-prod-ubuntu24-04-arm64-1
187212
jobs:
188213
- name: Deploy ARM confluentinc/kafka-streams-examples ubi8
214+
env_vars:
215+
- name: DOCKER_IMAGE
216+
value: confluentinc/kafka-streams-examples
189217
commands:
190218
- export OS_TAG="-ubi8"
191219
- export PROD_IMAGE_NAME=${DOCKER_PROD_REGISTRY}confluentinc/kafka-streams-examples
@@ -244,7 +272,7 @@ after_pipeline:
244272
task:
245273
agent:
246274
machine:
247-
type: s1-prod-ubuntu20-04-arm64-0
275+
type: s1-prod-ubuntu24-04-arm64-0
248276
jobs:
249277
- name: Metrics
250278
commands:

.semaphore/cp_dockerfile_promote.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: v1.0
77
name: build-test-release
88
agent:
99
machine:
10-
type: s1-prod-ubuntu20-04-amd64-1
10+
type: s1-prod-ubuntu24-04-amd64-1
1111

1212
fail_fast:
1313
cancel:
@@ -46,13 +46,27 @@ global_job_config:
4646
- docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY
4747
- export AMD_ARCH=.amd64
4848
- export ARM_ARCH=.arm64
49+
- export COMMUNITY_DOCKER_REPOS=""
50+
- |
51+
if [[ $SKIP_COMMUNITY == "True" ]]; then
52+
for skip_repo in $COMMUNITY_DOCKER_REPOS; do
53+
if [ "$skip_repo" = "$DOCKER_IMAGE" ]; then
54+
echo "Skipping promotion for $DOCKER_IMAGE as it is in COMMUNITY_DOCKER_REPOS list"
55+
export SEMAPHORE_JOB_RESULT=passed
56+
return 130
57+
fi
58+
done
59+
fi
4960
5061
blocks:
5162
- name: Promote AMD
5263
dependencies: []
5364
task:
5465
jobs:
5566
- name: Promote confluentinc/kafka-streams-examples ubi8 AMD
67+
env_vars:
68+
- name: DOCKER_IMAGE
69+
value: confluentinc/kafka-streams-examples
5670
commands:
5771
- export OS_TYPE="ubi8"
5872
- export DOCKER_REPO="confluentinc/kafka-streams-examples"
@@ -85,6 +99,9 @@ blocks:
8599
task:
86100
jobs:
87101
- name: Promote confluentinc/kafka-streams-examples ubi8 ARM
102+
env_vars:
103+
- name: DOCKER_IMAGE
104+
value: confluentinc/kafka-streams-examples
88105
commands:
89106
- export OS_TYPE="ubi8"
90107
- export DOCKER_REPO="confluentinc/kafka-streams-examples"
@@ -117,6 +134,9 @@ blocks:
117134
task:
118135
jobs:
119136
- name: Create Manifest confluentinc/kafka-streams-examples ubi8
137+
env_vars:
138+
- name: DOCKER_IMAGE
139+
value: confluentinc/kafka-streams-examples
120140
commands:
121141
- export OS_TYPE="ubi8"
122142
- if [[ ! "$OS_TYPE" ]]; then export OS_TAG=""; elif [[ "$OS_TYPE" =~ $PROMOTE_OS_TYPE* ]]; then export OS_TAG="-$OS_TYPE"; fi

.semaphore/semaphore.yml

+27-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: v1.0
77
name: build-test-release
88
agent:
99
machine:
10-
type: s1-prod-ubuntu20-04-amd64-1
10+
type: s1-prod-ubuntu24-04-amd64-1
1111

1212
fail_fast:
1313
cancel:
@@ -71,6 +71,28 @@ global_job_config:
7171
- export LATEST_TAG=$BRANCH_TAG-latest
7272
- export DOCKER_UPSTREAM_TAG="$LATEST_TAG"
7373
- export DOCKER_REPOS="confluentinc/kafka-streams-examples"
74+
- export COMMUNITY_DOCKER_REPOS=""
75+
- |
76+
if [[ $SKIP_COMMUNITY == "True" ]]; then
77+
# Filter out community repos from DOCKER_REPOS
78+
DOCKER_REPOS=$(comm -23 <(echo "$DOCKER_REPOS" | tr ' ' '\n' | sort) <(echo "$COMMUNITY_DOCKER_REPOS" | tr ' ' '\n' | sort) | tr '\n' ' ' | xargs)
79+
export DOCKER_REPOS
80+
echo "DOCKER_REPOS after skipping community images - $DOCKER_REPOS"
81+
82+
# Set Maven arguments for skipping community modules
83+
export MAVEN_EXTRA_ARGS=""
84+
85+
# Check if current DOCKER_IMAGE is in community repos, skip job execution
86+
for skip_repo in $COMMUNITY_DOCKER_REPOS; do
87+
if [ "$skip_repo" = "$DOCKER_IMAGE" ]; then
88+
echo "Skipping build for $DOCKER_IMAGE as it is in COMMUNITY_DOCKER_REPOS list"
89+
export SEMAPHORE_JOB_RESULT=passed
90+
return 130
91+
fi
92+
done
93+
else
94+
export MAVEN_EXTRA_ARGS=""
95+
fi
7496
- export DOCKER_DEV_TAG="dev-$BRANCH_TAG-$BUILD_NUMBER"
7597
- export AMD_ARCH=.amd64
7698
- export ARM_ARCH=.arm64
@@ -99,7 +121,7 @@ blocks:
99121
- export PACKAGING_BUILD_ARGS="$PACKAGING_BUILD_ARGS -DCONFLUENT_PACKAGES_REPO=$PACKAGES_URL"
100122
- mvn -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -P jenkins,docker clean package dependency:analyze validate -U -Ddocker.registry=$DOCKER_DEV_REGISTRY -Ddocker.upstream-registry=$DOCKER_UPSTREAM_REGISTRY
101123
-DBUILD_NUMBER=$BUILD_NUMBER -DGIT_COMMIT=$GIT_COMMIT -Ddocker.tag=$DOCKER_DEV_TAG$OS_TAG$AMD_ARCH -Ddocker.upstream-tag=$DOCKER_UPSTREAM_TAG$OS_TAG -Darch.type=$AMD_ARCH -Ddocker.os_type=ubi8
102-
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
124+
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS
103125
- . cache-maven store
104126
- >-
105127
for dev_image in $AMD_DOCKER_DEV_FULL_IMAGES;
@@ -120,7 +142,7 @@ blocks:
120142
task:
121143
agent:
122144
machine:
123-
type: s1-prod-ubuntu20-04-arm64-1
145+
type: s1-prod-ubuntu24-04-arm64-1
124146
jobs:
125147
- name: Build & Test ubi8
126148
commands:
@@ -131,7 +153,7 @@ blocks:
131153
- ci-tools ci-update-version
132154
- mvn -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -P jenkins,docker clean package dependency:analyze validate -U -Ddocker.registry=$DOCKER_DEV_REGISTRY -Ddocker.upstream-registry=$DOCKER_UPSTREAM_REGISTRY
133155
-DBUILD_NUMBER=$BUILD_NUMBER -DGIT_COMMIT=$GIT_COMMIT -Ddocker.tag=$DOCKER_DEV_TAG$OS_TAG$ARM_ARCH -Ddocker.upstream-tag=$DOCKER_UPSTREAM_TAG$OS_TAG -Darch.type=$ARM_ARCH -Ddocker.os_type=ubi8
134-
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
156+
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS
135157
- . cache-maven store
136158
- for image in $ARM_DOCKER_DEV_FULL_IMAGES; do echo "Pushing $image" && docker push $image; done
137159
epilogue:
@@ -144,7 +166,7 @@ after_pipeline:
144166
task:
145167
agent:
146168
machine:
147-
type: s1-prod-ubuntu20-04-arm64-0
169+
type: s1-prod-ubuntu24-04-arm64-0
148170
jobs:
149171
- name: Metrics
150172
commands:

service.yml

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ semaphore:
99
enable: true
1010
pipeline_type: cp-dockerfile
1111
docker_repos: ['confluentinc/kafka-streams-examples']
12+
community_docker_repos: []
13+
community_maven_modules: []
1214
maven_phase: 'package' # streams examples integration-test needs host-based networking, won't work in CI as-is
1315
maven_skip_deploy: true
1416
build_arm: true
@@ -40,6 +42,13 @@ semaphore:
4042
- name: CONFLUENT_DEB_VERSION
4143
required: false
4244
default_value: '1'
45+
- name: SKIP_COMMUNITY
46+
required: false
47+
default_value: 'False'
48+
description: 'Skip building community docker images'
49+
options:
50+
- 'True'
51+
- 'False'
4352
- name: cp-dockerfile-promote
4453
branch: master
4554
pipeline_file: .semaphore/cp_dockerfile_promote.yml
@@ -58,3 +67,10 @@ semaphore:
5867
options:
5968
- 'deb'
6069
- 'ubi'
70+
- name: SKIP_COMMUNITY
71+
required: false
72+
default_value: 'False'
73+
description: 'Skip publishing community docker images'
74+
options:
75+
- 'True'
76+
- 'False'

0 commit comments

Comments
 (0)