Skip to content

Commit

Permalink
Merge pull request #13 from confluentinc/servicebot
Browse files Browse the repository at this point in the history
Servicebot changes
  • Loading branch information
hk10111 authored Sep 30, 2024
2 parents b1bf4a3 + f9bfa6a commit f2aeb10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
18 changes: 7 additions & 11 deletions .semaphore/cp_dockerfile_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ global_job_config:
- export PACKAGING_BUILD_ARGS=" -DCONFLUENT_VERSION=$CONFLUENT_VERSION -DCONFLUENT_PLATFORM_LABEL=$PLATFORM_LABEL -DCONFLUENT_DEB_VERSION=$CONFLUENT_DEB_VERSION -DALLOW_UNSIGNED=$ALLOW_UNSIGNED"
- >-
if [[ $IS_RELEASE && $PACKAGING_BUILD_NUMBER ]]; then
if [[ $IS_BETA ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/jenkins-confluent-packages-beta-maven/$BRANCH_TAG/$PACKAGING_BUILD_NUMBER/maven"
elif [[ $IS_PREVIEW ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/jenkins-confluent-packages-alpha-maven/$BRANCH_NAME/$PACKAGING_BUILD_NUMBER/maven"
elif [[ $IS_RC ]]; then
if [[ $IS_RC ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/staging-confluent-packages-maven-654654529379-us-west-2/v$BRANCH_NAME/maven"
if [[ $PACKAGES_MAVEN_URL ]]; then
export MAVEN_PACKAGES_URL=$PACKAGES_MAVEN_URL
Expand All @@ -74,7 +70,7 @@ global_job_config:
# Overwrite maven global configuration
. vault-sem-get-secret maven-settings-cp-dockerfile
else
echo "This job is not a isBetaJob, isPreviewJob, isHotfixJob, or isRcJob (What we know how to handle) - and we don't know how to handle it"
echo "This job is not a isHotfixJob or isRcJob (What we know how to handle) - and we don't know how to handle it"
fi
- export DOCKER_DEV_REGISTRY="519856050701.dkr.ecr.us-west-2.amazonaws.com/docker/dev/"
- export DOCKER_PROD_REGISTRY="519856050701.dkr.ecr.us-west-2.amazonaws.com/docker/prod/"
Expand Down Expand Up @@ -112,7 +108,7 @@ blocks:
- export PACKAGING_BUILD_ARGS="$PACKAGING_BUILD_ARGS -DCONFLUENT_PACKAGES_REPO=$OS_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=ubi8
$PACKAGING_BUILD_ARGS
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
- . cache-maven store
- cve-scan
- >-
Expand All @@ -130,7 +126,7 @@ blocks:
- name: Deploy AMD confluentinc/cp-kafka-rest
dependencies: ["Build, Test, & Scan AMD"]
run:
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?-rc[0-9]+$'"
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?(-rc[0-9]+)?$'"
task:
jobs:
- name: Deploy AMD confluentinc/cp-kafka-rest ubi8
Expand Down Expand Up @@ -174,7 +170,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=ubi8
$PACKAGING_BUILD_ARGS
$PACKAGING_BUILD_ARGS -Ddependency.check.skip=true
- . cache-maven store
- for image in $ARM_DOCKER_DEV_FULL_IMAGES; do echo "Pushing $image" && docker push $image; done
epilogue:
Expand All @@ -186,7 +182,7 @@ blocks:
- name: Deploy ARM confluentinc/cp-kafka-rest
dependencies: ["Build & Test ARM"]
run:
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?-rc[0-9]+$'"
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?(-rc[0-9]+)?$'"
task:
agent:
machine:
Expand Down Expand Up @@ -216,7 +212,7 @@ blocks:
- name: Create Manifest and Maven Deploy
dependencies: ["Deploy AMD confluentinc/cp-kafka-rest", "Deploy ARM confluentinc/cp-kafka-rest"]
run:
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?-rc[0-9]+$'"
when: "branch = 'master' or branch =~ '^[0-9]+\\.[0-9]+\\.x$' or branch =~ '^[0-9]+\\.[0-9]+\\.[0-9]+(-cp[0-9]+)?(-rc[0-9]+)?$'"
task:
jobs:
- name: Create Manifest and Maven Deploy
Expand Down
6 changes: 3 additions & 3 deletions .semaphore/cp_dockerfile_promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ blocks:
export APPLIED="true"
fi
- >-
if [[ $UPDATE_LATEST_TAG ]]; then
if [[ $UPDATE_LATEST_TAG == "True" ]]; then
if [[ $APPLIED ]]; then
docker tag $DOCKER_REPO:$PROMOTED_TAG $DOCKER_REPO:latest$AMD_ARCH
docker push $DOCKER_REPO:latest$AMD_ARCH
Expand Down Expand Up @@ -104,7 +104,7 @@ blocks:
export APPLIED="true"
fi
- >-
if [[ $UPDATE_LATEST_TAG ]]; then
if [[ $UPDATE_LATEST_TAG == "True" ]]; then
if [[ $APPLIED ]]; then
docker tag $DOCKER_REPO:$PROMOTED_TAG $DOCKER_REPO:latest$ARM_ARCH
docker push $DOCKER_REPO:latest$ARM_ARCH
Expand All @@ -131,7 +131,7 @@ blocks:
export APPLIED="true"
fi
- >-
if [[ $UPDATE_LATEST_TAG ]]; then
if [[ $UPDATE_LATEST_TAG == "True" ]]; then
if [[ $APPLIED ]]; then
docker manifest create $DOCKER_REPO:latest $DOCKER_REPO:latest$AMD_ARCH $DOCKER_REPO:latest$ARM_ARCH
docker manifest push $DOCKER_REPO:latest
Expand Down
8 changes: 2 additions & 6 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ global_job_config:
- export PACKAGING_BUILD_ARGS=" -DCONFLUENT_VERSION=$CONFLUENT_VERSION -DCONFLUENT_PLATFORM_LABEL=$PLATFORM_LABEL -DCONFLUENT_DEB_VERSION=$CONFLUENT_DEB_VERSION -DALLOW_UNSIGNED=$ALLOW_UNSIGNED"
- >-
if [[ $IS_RELEASE && $PACKAGING_BUILD_NUMBER ]]; then
if [[ $IS_BETA ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/jenkins-confluent-packages-beta-maven/$BRANCH_TAG/$PACKAGING_BUILD_NUMBER/maven"
elif [[ $IS_PREVIEW ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/jenkins-confluent-packages-alpha-maven/$BRANCH_NAME/$PACKAGING_BUILD_NUMBER/maven"
elif [[ $IS_RC ]]; then
if [[ $IS_RC ]]; then
export MAVEN_PACKAGES_URL="https://s3.us-west-2.amazonaws.com/staging-confluent-packages-maven-654654529379-us-west-2/v$BRANCH_NAME/maven"
if [[ $PACKAGES_MAVEN_URL ]]; then
export MAVEN_PACKAGES_URL=$PACKAGES_MAVEN_URL
Expand All @@ -67,7 +63,7 @@ global_job_config:
# Overwrite maven global configuration
. vault-sem-get-secret maven-settings-cp-dockerfile
else
echo "This job is not a isBetaJob, isPreviewJob, isHotfixJob, or isRcJob (What we know how to handle) - and we don't know how to handle it"
echo "This job is not a isHotfixJob or isRcJob (What we know how to handle) - and we don't know how to handle it"
fi
- export DOCKER_DEV_REGISTRY="519856050701.dkr.ecr.us-west-2.amazonaws.com/docker/dev/"
- export DOCKER_PROD_REGISTRY="519856050701.dkr.ecr.us-west-2.amazonaws.com/docker/prod/"
Expand Down

0 comments on commit f2aeb10

Please sign in to comment.