-
Notifications
You must be signed in to change notification settings - Fork 1.2k
apply service bot changes #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -46,13 +46,27 @@ global_job_config: | |||||
- docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY | ||||||
- export AMD_ARCH=.amd64 | ||||||
- export ARM_ARCH=.arm64 | ||||||
- export COMMUNITY_DOCKER_REPOS="" | ||||||
- | | ||||||
if [[ $SKIP_COMMUNITY == "True" ]]; then | ||||||
for skip_repo in $COMMUNITY_DOCKER_REPOS; do | ||||||
if [ "$skip_repo" = "$DOCKER_IMAGE" ]; then | ||||||
echo "Skipping promotion for $DOCKER_IMAGE as it is in COMMUNITY_DOCKER_REPOS list" | ||||||
export SEMAPHORE_JOB_RESULT=passed | ||||||
return 130 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using 'return' outside of a function may not work as expected. Use 'exit 130' if this command is not part of a function.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
fi | ||||||
done | ||||||
fi | ||||||
|
||||||
blocks: | ||||||
- name: Promote AMD | ||||||
dependencies: [] | ||||||
task: | ||||||
jobs: | ||||||
- name: Promote confluentinc/kafka-streams-examples ubi9 AMD | ||||||
env_vars: | ||||||
- name: DOCKER_IMAGE | ||||||
value: confluentinc/kafka-streams-examples | ||||||
commands: | ||||||
- export OS_TYPE="ubi9" | ||||||
- export DOCKER_REPO="confluentinc/kafka-streams-examples" | ||||||
|
@@ -85,6 +99,9 @@ blocks: | |||||
task: | ||||||
jobs: | ||||||
- name: Promote confluentinc/kafka-streams-examples ubi9 ARM | ||||||
env_vars: | ||||||
- name: DOCKER_IMAGE | ||||||
value: confluentinc/kafka-streams-examples | ||||||
commands: | ||||||
- export OS_TYPE="ubi9" | ||||||
- export DOCKER_REPO="confluentinc/kafka-streams-examples" | ||||||
|
@@ -117,6 +134,9 @@ blocks: | |||||
task: | ||||||
jobs: | ||||||
- name: Create Manifest confluentinc/kafka-streams-examples ubi9 | ||||||
env_vars: | ||||||
- name: DOCKER_IMAGE | ||||||
value: confluentinc/kafka-streams-examples | ||||||
commands: | ||||||
- export OS_TYPE="ubi9" | ||||||
- if [[ ! "$OS_TYPE" ]]; then export OS_TAG=""; elif [[ "$OS_TYPE" =~ $PROMOTE_OS_TYPE* ]]; then export OS_TAG="-$OS_TYPE"; fi | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -71,6 +71,28 @@ global_job_config: | |||||
- export LATEST_TAG=$BRANCH_TAG-latest | ||||||
- export DOCKER_UPSTREAM_TAG="$LATEST_TAG" | ||||||
- export DOCKER_REPOS="confluentinc/kafka-streams-examples" | ||||||
- export COMMUNITY_DOCKER_REPOS="" | ||||||
- | | ||||||
if [[ $SKIP_COMMUNITY == "True" ]]; then | ||||||
# Filter out community repos from DOCKER_REPOS | ||||||
DOCKER_REPOS=$(comm -23 <(echo "$DOCKER_REPOS" | tr ' ' '\n' | sort) <(echo "$COMMUNITY_DOCKER_REPOS" | tr ' ' '\n' | sort) | tr '\n' ' ' | xargs) | ||||||
export DOCKER_REPOS | ||||||
echo "DOCKER_REPOS after skipping community images - $DOCKER_REPOS" | ||||||
|
||||||
# Set Maven arguments for skipping community modules | ||||||
export MAVEN_EXTRA_ARGS="" | ||||||
|
||||||
# Check if current DOCKER_IMAGE is in community repos, skip job execution | ||||||
for skip_repo in $COMMUNITY_DOCKER_REPOS; do | ||||||
if [ "$skip_repo" = "$DOCKER_IMAGE" ]; then | ||||||
echo "Skipping build for $DOCKER_IMAGE as it is in COMMUNITY_DOCKER_REPOS list" | ||||||
export SEMAPHORE_JOB_RESULT=passed | ||||||
return 130 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using 'return' outside of a function may cause errors in a shell script. Consider using 'exit 130' if this script block is not within a function.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
fi | ||||||
done | ||||||
else | ||||||
export MAVEN_EXTRA_ARGS="" | ||||||
fi | ||||||
- export DOCKER_DEV_TAG="dev-$BRANCH_TAG-$BUILD_NUMBER" | ||||||
- export AMD_ARCH=.amd64 | ||||||
- export ARM_ARCH=.arm64 | ||||||
|
@@ -99,7 +121,7 @@ blocks: | |||||
- export PACKAGING_BUILD_ARGS="$PACKAGING_BUILD_ARGS -DCONFLUENT_PACKAGES_REPO=$PACKAGES_URL" | ||||||
- 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 | ||||||
-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=ubi9 | ||||||
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true | ||||||
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS | ||||||
- . cache-maven store | ||||||
- >- | ||||||
for dev_image in $AMD_DOCKER_DEV_FULL_IMAGES; | ||||||
|
@@ -131,7 +153,7 @@ blocks: | |||||
- ci-tools ci-update-version | ||||||
- 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 | ||||||
-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=ubi9 | ||||||
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true | ||||||
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true $MAVEN_EXTRA_ARGS | ||||||
- . cache-maven store | ||||||
- for image in $ARM_DOCKER_DEV_FULL_IMAGES; do echo "Pushing $image" && docker push $image; done | ||||||
epilogue: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'return' may be problematic if not within a function context. Replace it with 'exit 130' to ensure the script terminates correctly.
Copilot uses AI. Check for mistakes.