From 9d6f110c316723204a51ad57eea04cf99366f467 Mon Sep 17 00:00:00 2001 From: GabinL21 Date: Wed, 6 Nov 2024 13:40:07 +0100 Subject: [PATCH] SONARPHP-1523 Reformat files --- .cirrus/modules/env.star | 32 ++++---- .cirrus/modules/promote.star | 42 +++++----- .cirrus/modules/qa.star | 148 +++++++++++++++++------------------ 3 files changed, 111 insertions(+), 111 deletions(-) diff --git a/.cirrus/modules/env.star b/.cirrus/modules/env.star index aedb21458..8bd09bde9 100644 --- a/.cirrus/modules/env.star +++ b/.cirrus/modules/env.star @@ -1,24 +1,24 @@ load( - "github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master", - "artifactory_env", - "cirrus_env", - "gradle_signing_env", - "next_env", - "gradle_env", + "github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master", + "artifactory_env", + "cirrus_env", + "gradle_signing_env", + "next_env", + "gradle_env", ) def project_version_env(): - return { - "PROJECT_VERSION_CACHE_DIR": "project-version", - } + return { + "PROJECT_VERSION_CACHE_DIR": "project-version", + } def env(): - vars = artifactory_env() - vars |= cirrus_env(depth=1) - vars |= gradle_env() - vars |= gradle_signing_env() - vars |= next_env() - vars |= project_version_env() - return {"env": vars} + vars = artifactory_env() + vars |= cirrus_env(depth=1) + vars |= gradle_env() + vars |= gradle_signing_env() + vars |= next_env() + vars |= project_version_env() + return {"env": vars} diff --git a/.cirrus/modules/promote.star b/.cirrus/modules/promote.star index 0bf7f3062..b98992f02 100644 --- a/.cirrus/modules/promote.star +++ b/.cirrus/modules/promote.star @@ -1,31 +1,31 @@ -load("github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master","promotion_env") +load("github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master", "promotion_env") load("github.com/SonarSource/cirrus-modules/cloud-native/platform.star@analysis/master", "base_image_container_builder") load("github.com/SonarSource/cirrus-modules/cloud-native/cache.star@analysis/master", "project_version_cache") load("github.com/SonarSource/cirrus-modules/cloud-native/conditions.star@analysis/master", "is_branch_qa_eligible") def promote_script(): - return [ - "source cirrus-env PROMOTE", - "cirrus_jfrog_promote multi", - "source ${PROJECT_VERSION_CACHE_DIR}/evaluated_project_version.txt", - "github-notify-promotion", - ] + return [ + "source cirrus-env PROMOTE", + "cirrus_jfrog_promote multi", + "source ${PROJECT_VERSION_CACHE_DIR}/evaluated_project_version.txt", + "github-notify-promotion", + ] def promote_task(): - return { - "promote_task": { - "only_if": is_branch_qa_eligible(), - "depends_on": [ - "build", - "qa_os_win", - "qa_ruling", - "qa_plugin" - ], - "env": promotion_env(), - "eks_container": base_image_container_builder(cpu=1, memory="2G"), - "project_version_cache": project_version_cache(), - "script": promote_script() - } + return { + "promote_task": { + "only_if": is_branch_qa_eligible(), + "depends_on": [ + "build", + "qa_os_win", + "qa_ruling", + "qa_plugin" + ], + "env": promotion_env(), + "eks_container": base_image_container_builder(cpu=1, memory="2G"), + "project_version_cache": project_version_cache(), + "script": promote_script() } + } diff --git a/.cirrus/modules/qa.star b/.cirrus/modules/qa.star index ae76b7035..c27d50512 100644 --- a/.cirrus/modules/qa.star +++ b/.cirrus/modules/qa.star @@ -5,13 +5,13 @@ load("github.com/SonarSource/cirrus-modules/cloud-native/conditions.star@analysi load("github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master", "artifactory_reader_env") load("build.star", "profile_report_artifacts") load( - "github.com/SonarSource/cirrus-modules/cloud-native/cache.star@analysis/master", - "gradle_cache", - "cleanup_gradle_script", - "gradle_wrapper_cache", - "orchestrator_cache", - "set_orchestrator_home_script", - "mkdir_orchestrator_home_script", + "github.com/SonarSource/cirrus-modules/cloud-native/cache.star@analysis/master", + "gradle_cache", + "cleanup_gradle_script", + "gradle_wrapper_cache", + "orchestrator_cache", + "set_orchestrator_home_script", + "mkdir_orchestrator_home_script", ) QA_PLUGIN_GRADLE_TASK = "its:plugin:tests:integrationTest" @@ -20,12 +20,12 @@ QA_QUBE_LATEST_RELEASE = "LATEST_RELEASE" def on_failure(): - return default_gradle_on_failure() | { - "junit_artifacts": { - "path": "**/test-results/**/*.xml", - "format": "junit" - } + return default_gradle_on_failure() | { + "junit_artifacts": { + "path": "**/test-results/**/*.xml", + "format": "junit" } + } # @@ -33,27 +33,27 @@ def on_failure(): # def qa_win_script(): - return [ - "git config --global core.autocrlf input", - "source cirrus-env CI", - "./gradlew ${GRADLE_COMMON_FLAGS} test" - ] + return [ + "git config --global core.autocrlf input", + "source cirrus-env CI", + "./gradlew ${GRADLE_COMMON_FLAGS} test" + ] def qa_os_win_task(): - return { - "qa_os_win_task": { - "only_if": is_branch_qa_eligible(), - "depends_on": "build", - "ec2_instance": ec2_instance_builder(), - "env": artifactory_reader_env(), - "gradle_cache": gradle_cache(), - "gradle_wrapper_cache": gradle_wrapper_cache(), - "build_script": qa_win_script(), - "on_success": profile_report_artifacts(), - "on_failure": on_failure(), - } + return { + "qa_os_win_task": { + "only_if": is_branch_qa_eligible(), + "depends_on": "build", + "ec2_instance": ec2_instance_builder(), + "env": artifactory_reader_env(), + "gradle_cache": gradle_cache(), + "gradle_wrapper_cache": gradle_wrapper_cache(), + "build_script": qa_win_script(), + "on_success": profile_report_artifacts(), + "on_failure": on_failure(), } + } # @@ -61,20 +61,20 @@ def qa_os_win_task(): # def qa_task(env, run_its_script): - return { - "only_if": is_branch_qa_eligible(), - "depends_on": "build", - "eks_container": base_image_container_builder(cpu=4, memory="10G"), - "env": env, - "gradle_cache": gradle_cache(), - "gradle_wrapper_cache": gradle_wrapper_cache(), - "set_orchestrator_home_script": set_orchestrator_home_script(), - "mkdir_orchestrator_home_script": mkdir_orchestrator_home_script(), - "orchestrator_cache": orchestrator_cache(), - "run_its_script": run_its_script, - "on_failure": on_failure(), - "cleanup_gradle_script": cleanup_gradle_script(), - } + return { + "only_if": is_branch_qa_eligible(), + "depends_on": "build", + "eks_container": base_image_container_builder(cpu=4, memory="10G"), + "env": env, + "gradle_cache": gradle_cache(), + "gradle_wrapper_cache": gradle_wrapper_cache(), + "set_orchestrator_home_script": set_orchestrator_home_script(), + "mkdir_orchestrator_home_script": mkdir_orchestrator_home_script(), + "orchestrator_cache": orchestrator_cache(), + "run_its_script": run_its_script, + "on_failure": on_failure(), + "cleanup_gradle_script": cleanup_gradle_script(), + } # @@ -82,15 +82,15 @@ def qa_task(env, run_its_script): # def qa_plugin_env(): - return { - "GRADLE_TASK": QA_PLUGIN_GRADLE_TASK, - "KEEP_ORCHESTRATOR_RUNNING": "true", - "matrix": [ - {"SQ_VERSION": QA_QUBE_LATEST_RELEASE}, - {"SQ_VERSION": "DEV"}, - ], - "GITHUB_TOKEN": "VAULT[development/github/token/licenses-ro token]", - } + return { + "GRADLE_TASK": QA_PLUGIN_GRADLE_TASK, + "KEEP_ORCHESTRATOR_RUNNING": "true", + "matrix": [ + {"SQ_VERSION": QA_QUBE_LATEST_RELEASE}, + {"SQ_VERSION": "DEV"}, + ], + "GITHUB_TOKEN": "VAULT[development/github/token/licenses-ro token]", + } def qa_plugin_script(): @@ -103,9 +103,9 @@ def qa_plugin_script(): def qa_plugin_task(): - return { - "qa_plugin_task": qa_task(qa_plugin_env(), qa_plugin_script()) - } + return { + "qa_plugin_task": qa_task(qa_plugin_env(), qa_plugin_script()) + } # @@ -113,22 +113,22 @@ def qa_plugin_task(): # def qa_ruling_env(): - return { - "GRADLE_TASK": QA_RULING_GRADLE_TASK, - "SQ_VERSION": QA_QUBE_LATEST_RELEASE, - "KEEP_ORCHESTRATOR_RUNNING": "true", - "matrix": [ - {"PHP_PROJECT": "Flysystem"}, - {"PHP_PROJECT": "Monica"}, - {"PHP_PROJECT": "PhpCodeSniffer"}, - {"PHP_PROJECT": "PhpMailer"}, - {"PHP_PROJECT": "Psysh"}, - {"PHP_PROJECT": "PhpWord"}, - {"PHP_PROJECT": "RubixML"}, - {"PHP_PROJECT": "PhpSpreadsheet"}, - ], - "GITHUB_TOKEN": "VAULT[development/github/token/licenses-ro token]", - } + return { + "GRADLE_TASK": QA_RULING_GRADLE_TASK, + "SQ_VERSION": QA_QUBE_LATEST_RELEASE, + "KEEP_ORCHESTRATOR_RUNNING": "true", + "matrix": [ + {"PHP_PROJECT": "Flysystem"}, + {"PHP_PROJECT": "Monica"}, + {"PHP_PROJECT": "PhpCodeSniffer"}, + {"PHP_PROJECT": "PhpMailer"}, + {"PHP_PROJECT": "Psysh"}, + {"PHP_PROJECT": "PhpWord"}, + {"PHP_PROJECT": "RubixML"}, + {"PHP_PROJECT": "PhpSpreadsheet"}, + ], + "GITHUB_TOKEN": "VAULT[development/github/token/licenses-ro token]", + } def qa_ruling_script(): @@ -141,9 +141,9 @@ def qa_ruling_script(): def qa_ruling_task(): - return { - "qa_ruling_task": qa_task(qa_ruling_env(), qa_ruling_script()) - } + return { + "qa_ruling_task": qa_task(qa_ruling_env(), qa_ruling_script()) + } #