Skip to content

Commit

Permalink
Merge branch '7.7.x' into master by jainruchir
Browse files Browse the repository at this point in the history
  • Loading branch information
ConfluentSemaphore committed Jul 11, 2024
2 parents a4a46fb + 54b4edd commit b1f6efa
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
18 changes: 15 additions & 3 deletions .semaphore/cp_dockerfile_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,17 @@ global_job_config:
- export AMD_ARCH=.amd64
- export ARM_ARCH=.arm64
blocks:
- name: Build, Test, & Scan AMD
- name: Validation
dependencies: []
run:
when: "branch = 'master'"
task:
jobs:
- name: Validation
commands:
- . sem-pint -c
- name: Build, Test, & Scan AMD
dependencies: ["Validation"]
run:
# don't run the tests on non-functional changes...
when: "change_in('/', {exclude: ['/.deployed-versions/', '.github/']})"
Expand Down Expand Up @@ -145,7 +154,7 @@ blocks:
- docker tag $DEV_IMAGE_FULL $PROD_IMAGE_NAME:$LATEST_PUSH_TAG
- docker push $PROD_IMAGE_NAME:$LATEST_PUSH_TAG
- name: Build & Test ARM
dependencies: []
dependencies: ["Validation"]
run:
# don't run the tests on non-functional changes...
when: "change_in('/', {exclude: ['/.deployed-versions/', '.github/']})"
Expand Down Expand Up @@ -214,7 +223,10 @@ blocks:
- export DOCKER_PROD_IMAGE_NAME=$DOCKER_PROD_REGISTRY${DOCKER_REPOS// / $DOCKER_PROD_REGISTRY}
- ci-tools ci-update-version
- ci-tools ci-push-tag
- echo "Skipping Maven Deploy"
- |-
if [[ ! $IS_RELEASE && ! $IS_PREVIEW ]]; then
mvn -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -P jenkins,docker -DaltDeploymentRepository=confluent-codeartifact-internal::default::https://confluent-519856050701.d.codeartifact.us-west-2.amazonaws.com/maven/maven-snapshots/ -DrepositoryId=confluent-codeartifact-internal deploy -DskipTests -Ddocker.skip-build=true -Ddocker.skip-test=true
fi
# Create manifest
- >-
for image in $DOCKER_PROD_IMAGE_NAME;
Expand Down
15 changes: 8 additions & 7 deletions .semaphore/cp_dockerfile_promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ blocks:
commands:
- export OS_TYPE="ubi8"
- export DOCKER_REPO="confluentinc/cp-kcat"
- if [[ "$OS_TYPE" =~ "$PROMOTE_OS_TYPE*" || ! "$OS_TYPE" ]]; then export OS_TAG=""; else export OS_TAG="-$OS_TYPE"; fi
- export INTERNAL_IMAGE_TAG="$BRANCH_TAG-$PACKAGING_BUILD_NUMBER$OS_TAG"
- if [[ ! "$OS_TYPE" ]]; then export OS_TAG=""; elif [[ "$OS_TYPE" =~ $PROMOTE_OS_TYPE* ]]; then export OS_TAG="-$OS_TYPE"; fi
- export INTERNAL_IMAGE_TAG="$BRANCH_TAG-$PACKAGING_BUILD_NUMBER$OS_TAG$AMD_ARCH"
- export PROMOTED_TAG="$PROMOTED_TAG_PREFIX$OS_TAG$AMD_ARCH"
- docker pull $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG
- docker tag $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG $DOCKER_REPO:$PROMOTED_TAG
- docker run --rm $DOCKER_REPO:$PROMOTED_TAG sh -c "grep staging /etc/yum.repos.d/confluent.repo || grep staging /etc/apt/sources.list" || export STAGING_CHECK_SUCCEED="true"
- if [[ ! "$STAGING_CHECK_SUCCEED" ]]; then echo "Detected there was a staging repo in image $DOCKER_REPO:$PROMOTED_TAG refusing to promote." && exit 1; fi
- docker push $DOCKER_REPO:$PROMOTED_TAG
- >-
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ "ubi*" ]]; then
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ ubi* ]]; then
export APPLY_TAG=$CONFLUENT_VERSION$AMD_ARCH
docker tag $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG $DOCKER_REPO:$APPLY_TAG
docker push $DOCKER_REPO:$APPLY_TAG
Expand All @@ -88,16 +88,16 @@ blocks:
commands:
- export OS_TYPE="ubi8"
- export DOCKER_REPO="confluentinc/cp-kcat"
- if [[ "$OS_TYPE" =~ "$PROMOTE_OS_TYPE*" || ! "$OS_TYPE" ]]; then export OS_TAG=""; else export OS_TAG="-$OS_TYPE"; fi
- export INTERNAL_IMAGE_TAG="$BRANCH_TAG-$PACKAGING_BUILD_NUMBER$OS_TAG"
- if [[ ! "$OS_TYPE" ]]; then export OS_TAG=""; elif [[ "$OS_TYPE" =~ $PROMOTE_OS_TYPE* ]]; then export OS_TAG="-$OS_TYPE"; fi
- export INTERNAL_IMAGE_TAG="$BRANCH_TAG-$PACKAGING_BUILD_NUMBER$OS_TAG$ARM_ARCH"
- export PROMOTED_TAG="$PROMOTED_TAG_PREFIX$OS_TAG$ARM_ARCH"
- docker pull $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG
- docker tag $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG $DOCKER_REPO:$PROMOTED_TAG
- docker run --rm $DOCKER_REPO:$PROMOTED_TAG sh -c "grep staging /etc/yum.repos.d/confluent.repo || grep staging /etc/apt/sources.list" || export STAGING_CHECK_SUCCEED="true"
- if [[ ! "$STAGING_CHECK_SUCCEED" ]]; then echo "Detected there was a staging repo in image $DOCKER_REPO:$PROMOTED_TAG refusing to promote." && exit 1; fi
- docker push $DOCKER_REPO:$PROMOTED_TAG
- >-
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ "ubi*" ]]; then
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ ubi* ]]; then
export APPLY_TAG=$CONFLUENT_VERSION$ARM_ARCH
docker tag $DOCKER_PROD_REGISTRY$DOCKER_REPO:$INTERNAL_IMAGE_TAG $DOCKER_REPO:$APPLY_TAG
docker push $DOCKER_REPO:$APPLY_TAG
Expand All @@ -119,12 +119,13 @@ blocks:
- name: Create Manifest confluentinc/cp-kcat ubi8
commands:
- export OS_TYPE="ubi8"
- if [[ ! "$OS_TYPE" ]]; then export OS_TAG=""; elif [[ "$OS_TYPE" =~ $PROMOTE_OS_TYPE* ]]; then export OS_TAG="-$OS_TYPE"; fi
- export DOCKER_REPO="confluentinc/cp-kcat"
- export PROMOTED_TAG="$PROMOTED_TAG_PREFIX$OS_TAG"
- docker manifest create $DOCKER_REPO:$PROMOTED_TAG $DOCKER_REPO:$PROMOTED_TAG$AMD_ARCH $DOCKER_REPO:$PROMOTED_TAG$ARM_ARCH
- docker manifest push $DOCKER_REPO:$PROMOTED_TAG
- >-
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ "ubi*" ]]; then
if [[ ! "$OS_TYPE" ]] || [[ "$OS_TYPE" =~ ubi* ]]; then
docker manifest create $DOCKER_REPO:$CONFLUENT_VERSION $DOCKER_REPO:$CONFLUENT_VERSION$AMD_ARCH $DOCKER_REPO:$CONFLUENT_VERSION$ARM_ARCH
docker manifest push $DOCKER_REPO:$CONFLUENT_VERSION
export APPLIED="true"
Expand Down
13 changes: 11 additions & 2 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,17 @@ global_job_config:
- export AMD_ARCH=.amd64
- export ARM_ARCH=.arm64
blocks:
- name: Build, Test, & Scan AMD
- name: Validation
dependencies: []
run:
when: "branch = 'master'"
task:
jobs:
- name: Validation
commands:
- . sem-pint -c
- name: Build, Test, & Scan AMD
dependencies: ["Validation"]
run:
when: "pull_request =~ '.*'"
task:
Expand Down Expand Up @@ -110,7 +119,7 @@ blocks:
- artifact push workflow target/test-results
- artifact push workflow target --destination target-AMD
- name: Build & Test ARM
dependencies: []
dependencies: ["Validation"]
run:
when: "pull_request =~ '.*'"
task:
Expand Down

0 comments on commit b1f6efa

Please sign in to comment.