Skip to content

Commit

Permalink
SONAR-24200 Add new required annotation in DCE for GCP apps
Browse files Browse the repository at this point in the history
  • Loading branch information
carminevassallo committed Jan 23, 2025
1 parent 5f78296 commit 7e5b19e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .cirrus/multi-arch-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export DOCKER_BUILDKIT=1
for i in $(seq 1 3); do
if docker buildx build --platform linux/amd64,linux/arm64 --tag "$1:$2" --label "com.googleapis.cloudmarketplace.product.service.name=services/sonarqube-dce" --push $3; then
if docker buildx build --platform linux/amd64,linux/arm64 --tag "$1:$2" --push $3; then
echo "[Success]: Buildx, attempt ${i}"
exit 0
fi
Expand Down
20 changes: 0 additions & 20 deletions .cirrus/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ multi_arch_build_gcp_prod_task:
- echo -e "FROM ${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_MINOR_VERSION}\nLABEL com.googleapis.cloudmarketplace.product.service.name=services/sonarqube-dce" | docker build -t ${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_MINOR_VERSION} -
- docker push "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_VERSION}"
- docker push "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_MINOR_VERSION}"
- docker inspect "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}:${CURRENT_VERSION}"
- docker inspect "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}:${CURRENT_MINOR_VERSION}"
- docker inspect "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_VERSION}"
- docker inspect "${GCLOUD_REGISTRY}/${GCLOUD_PRODUCT_NAME}/sonarqube-dce-search:${CURRENT_MINOR_VERSION}"

multi_arch_build_gcp_staging_task:
only_if: $CIRRUS_CRON == 'nightly-mend-scan' || $TRIGGER == 'PUSH_GCP_STAGING_IMAGES'
Expand All @@ -90,8 +86,6 @@ multi_arch_build_gcp_staging_task:
- echo "Build and promote the ${STAGING_IMAGE_NAME}:${NEXT_VERSION} and ${STAGING_IMAGE_NAME}:${NEXT_MINOR_VERSION} image supporting two architectures, linux/amd64 and linux/arm64"
- .cirrus/multi-arch-build.sh ${STAGING_IMAGE_NAME} $NEXT_VERSION ${version}
- .cirrus/multi-arch-build.sh ${STAGING_IMAGE_NAME} $NEXT_MINOR_VERSION ${version}
- docker inspect ${STAGING_IMAGE_NAME}:${NEXT_VERSION}
- docker inspect ${STAGING_IMAGE_NAME}:${NEXT_MINOR_VERSION}

multi_arch_build_task_template: &multi_arch_build_task_template
ec2_instance:
Expand Down Expand Up @@ -138,20 +132,6 @@ multi_arch_build_2025_x_task:
- version: ${NEXT_VERSION}/datacenter/search
tag: ${NEXT_VERSION}-datacenter-search

multi_arch_build_task_template: &multi_arch_build_task_template
ec2_instance:
<<: *VM_TEMPLATE
login_script:
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
setup_script:
- docker run -t --rm --privileged tonistiigi/binfmt --install all
- docker buildx create --name multibuilder --driver docker-container
- docker buildx use multibuilder
- docker buildx inspect --bootstrap
build_script:
- echo "Build the ${STAGING_IMAGE_NAME}:${tag} image supporting two architectures, linux/amd64 and linux/arm64"
- .cirrus/multi-arch-build.sh ${STAGING_IMAGE_NAME} ${tag} ${version}

multi_arch_build_community_build_task:
<<: *multi_arch_build_task_template
skip: "!changesInclude('community-build/*') && !changesInclude('.cirrus/*')"
Expand Down
1 change: 1 addition & 0 deletions 2025.1/datacenter/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=false
LABEL io.openshift.tags=sonarqube,static-code-analysis,code-quality,clean-code
LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube
LABEL com.googleapis.cloudmarketplace.product.service.name=services/sonarqube-dce

ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US:en' \
Expand Down
1 change: 1 addition & 0 deletions 2025.1/datacenter/search/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=false
LABEL io.openshift.tags=sonarqube,static-code-analysis,code-quality,clean-code
LABEL org.opencontainers.image.url=https://github.com/SonarSource/docker-sonarqube
LABEL com.googleapis.cloudmarketplace.product.service.name=services/sonarqube-dce

ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US:en' \
Expand Down

0 comments on commit 7e5b19e

Please sign in to comment.