From f89db0c0f830a5d5adfd197d9870b8ac703eb184 Mon Sep 17 00:00:00 2001 From: Carmine Vassallo Date: Wed, 28 Feb 2024 11:17:06 +0100 Subject: [PATCH] SONAR-21739 Dynamic trigger of GCP docker publication --- .cirrus.star | 3 ++- .cirrus.yml => .cirrus/tasks.yml | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename .cirrus.yml => .cirrus/tasks.yml (97%) diff --git a/.cirrus.star b/.cirrus.star index 28b17b70..f87fcc61 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -1,4 +1,5 @@ load("github.com/SonarSource/cirrus-modules@v2", "load_features") +load("cirrus", "env", "fs", "yaml") def main(ctx): - return load_features(ctx) + return yaml.dumps(load_features(ctx)) + fs.read(".cirrus/tasks.yml") diff --git a/.cirrus.yml b/.cirrus/tasks.yml similarity index 97% rename from .cirrus.yml rename to .cirrus/tasks.yml index a96b7187..8b145c33 100644 --- a/.cirrus.yml +++ b/.cirrus/tasks.yml @@ -11,8 +11,8 @@ env: WS_PRODUCTNAME: SonarSource/docker-sonarqube STAGING_IMAGE_NAME: sonarsource/sonarqube PUBLIC_IMAGE_NAME: sonarqube - GCLOUD_REGISTRY: gcr.io/sonarqube-marketplace-provider - GCLOUD_PRODUCT_NAME: sonarqube-dce + GCLOUD_REGISTRY: gcr.io/sonarsource-public + GCLOUD_PRODUCT_NAME: official-sonarqube-data-center-edition CURRENT_LTS_VERSION: 9.9.4 CURRENT_VERSION: 10.4.1 NEXT_VERSION: 10.5.0 @@ -25,7 +25,7 @@ vm_instance_template: &VM_TEMPLATE subnet_id: ${CIRRUS_AWS_SUBNET} multi_arch_build_gcp_task: - only_if: $CIRRUS_CRON == 'nightly-mend-scan' + only_if: $CIRRUS_CRON == 'nightly-mend-scan' || $TRIGGER == 'PUSH_GCP_IMAGES' ec2_instance: <<: *VM_TEMPLATE pull_public_images_script: