From 57461f5f4557f4cf672c5d331b89b3d312b476de Mon Sep 17 00:00:00 2001 From: Hrithik Kulkarni <66294834+hk10111@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:08:19 +0530 Subject: [PATCH] CPBR-1660: Fix python version reset by servicebot (#4) * chore: update repo semaphore config * chore: update repo semaphore task * chore: update sonar-project.properties to reconfigure sonarqube scanning. * fix python version to 3.9 * upstream changed to dev registry --- .semaphore/cp_dockerfile_build.yml | 11 ++++------- .semaphore/semaphore.yml | 11 ++++------- service.yml | 4 ++-- sonar-project.properties | 8 ++++++++ 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 sonar-project.properties diff --git a/.semaphore/cp_dockerfile_build.yml b/.semaphore/cp_dockerfile_build.yml index 6b0c3a402d..22515c32fb 100644 --- a/.semaphore/cp_dockerfile_build.yml +++ b/.semaphore/cp_dockerfile_build.yml @@ -25,6 +25,7 @@ global_job_config: commands: - checkout - sem-version java 8 + - sem-version python 3.9 - . vault-setup - . cache-maven restore - pip install tox==3.28.0 @@ -62,11 +63,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 @@ -75,11 +72,11 @@ 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/" - - export DOCKER_UPSTREAM_REGISTRY=$DOCKER_PROD_REGISTRY + - export DOCKER_UPSTREAM_REGISTRY=$DOCKER_DEV_REGISTRY - export LATEST_TAG=$BRANCH_TAG-latest - export DOCKER_UPSTREAM_TAG="$LATEST_TAG" - export DOCKER_REPOS="confluentinc/cp-base-new confluentinc/cp-base-lite confluentinc/cp-jmxterm" diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index d25f1eff9b..e584cf1f51 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -25,6 +25,7 @@ global_job_config: commands: - checkout - sem-version java 8 + - sem-version python 3.9 - . vault-setup - . cache-maven restore - pip install tox==3.28.0 @@ -55,11 +56,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 @@ -68,11 +65,11 @@ 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/" - - export DOCKER_UPSTREAM_REGISTRY=$DOCKER_PROD_REGISTRY + - export DOCKER_UPSTREAM_REGISTRY=$DOCKER_DEV_REGISTRY - export LATEST_TAG=$BRANCH_TAG-latest - export DOCKER_UPSTREAM_TAG="$LATEST_TAG" - export DOCKER_REPOS="confluentinc/cp-base-new confluentinc/cp-base-lite confluentinc/cp-jmxterm" diff --git a/service.yml b/service.yml index 12704fbb22..a00264cdd7 100644 --- a/service.yml +++ b/service.yml @@ -1,6 +1,6 @@ name: common-docker -lang: unknown -lang_version: unknown +lang: python +lang_version: 3.9 git: enable: true semaphore: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000000..72d2b8091c --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,8 @@ +### service-bot sonarqube plugin managed file +sonar.coverage.exclusions=**/test/**/*,**/tests/**/*,**/mock/**/*,**/mocks/**/*,**/*mock*,**/*test* +sonar.cpd.exclusions=**/test/**/*,**/tests/**/*,**/mock/**/*,**/mocks/**/*,**/*mock*,**/*test* +sonar.exclusions=**/*.pb.*,**/mk-include/**/* +sonar.language=python +sonar.projectKey=airlock-common-docker +sonar.python.coverage.reportPaths=**/coverage.xml +sonar.sources=.