From 9b3a417cfd52a0aa2ea8694e5f89faa4379c9cb1 Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 10:11:26 +0100 Subject: [PATCH 1/9] Test --- .cirrus.yml | 112 +--------------------------------------------------- 1 file changed, 2 insertions(+), 110 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3538fbd0e..98929c4de 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -214,10 +214,8 @@ qa_task: - build <<: *ONLY_PR_AND_MAINTAINED_BRANCHES <<: *ORCHESTRATOR_MONTHLY_CACHE_TEMPLATE - eks_container: - <<: *BUILDER_CONTAINER_DEFINITION - cpu: 6 - memory: 16G + ec2_instance: + <<: *WINVM_DEFINITION env: CLION_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.clion] GOLAND_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.goland] @@ -233,108 +231,11 @@ qa_task: DISPLAY: :10 JDK_VERSION: "17" SONARCLOUD_IT_PASSWORD: VAULT[development/team/sonarlint/kv/data/sonarcloud-it data.password] - clionKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/clion.key.b64 - variable_name: CLION_KEY - golandKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/goland.key.b64 - variable_name: GOLAND_KEY - datagripKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/datagrip.key.b64 - variable_name: DATAGRIP_KEY - ideaKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/idea.key.b64 - variable_name: IDEA_KEY - phpstormKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/phpstorm.key.b64 - variable_name: PHPSTORM_KEY - pycharmKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/pycharm.key.b64 - variable_name: PYCHARM_KEY - riderKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/rider.key.b64 - variable_name: RIDER_KEY - rubymineKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/rubymine.key.b64 - variable_name: RUBYMINE_KEY - webstormKey_file: - path: ${CIRRUS_WORKING_DIR}/its/build/idea-sandbox/config-uiTest/webstorm.key.b64 - variable_name: WEBSTORM_KEY matrix: - env: IDEA_VERSION: 'IC-2022.3.1' QA_CATEGORY: 'Idea2022' - TEST_SUITE: 'OpenInIdeTests' - - env: - IDEA_VERSION: 'IC-2022.3.1' - QA_CATEGORY: 'Idea2022' - TEST_SUITE: 'ConnectedAnalysisTests' - - env: - IDEA_VERSION: 'IC-2022.3.1' - QA_CATEGORY: 'Idea2022' - TEST_SUITE: 'ConfigurationTests' - - env: - IDEA_VERSION: 'IC-2022.3.1' - QA_CATEGORY: 'Idea2022' - TEST_SUITE: 'Standalone' - - env: - IDEA_VERSION: 'IC-2024.1.4' - QA_CATEGORY: 'Idea2024' - TEST_SUITE: 'OpenInIdeTests' - - env: - IDEA_VERSION: 'IC-2024.1.4' - QA_CATEGORY: 'Idea2024' - TEST_SUITE: 'ConnectedAnalysisTests' - - env: - IDEA_VERSION: 'IC-2024.1.4' - QA_CATEGORY: 'Idea2024' - TEST_SUITE: 'ConfigurationTests' - - env: - IDEA_VERSION: 'IC-2024.1.4' - QA_CATEGORY: 'Idea2024' TEST_SUITE: 'Standalone' - - env: - IDEA_VERSION: 'IU-2022.3.1' - QA_CATEGORY: 'IdeaUltimate2022' - - env: - IDEA_VERSION: 'IU-2024.1.4' - QA_CATEGORY: 'IdeaUltimate2024' - - env: - IDEA_VERSION: 'PY-2022.3.1' - QA_CATEGORY: 'PyCharmProfessional2022' - - env: - IDEA_VERSION: 'PY-2024.1.4' - QA_CATEGORY: 'PyCharmProfessional2024' - - env: - IDEA_VERSION: 'PC-2022.3.1' - QA_CATEGORY: 'PyCharmCommunity2022' - - env: - IDEA_VERSION: 'PC-2024.1.4' - QA_CATEGORY: 'PyCharmCommunity2024' - - env: - IDEA_VERSION: 'RD-2022.3.1' - QA_CATEGORY: 'Rider2022' - - env: - IDEA_VERSION: 'RD-2024.1.4' - QA_CATEGORY: 'Rider2024' - - env: - IDEA_VERSION: 'PS-2022.3.1' - QA_CATEGORY: 'PhpStorm2022' - - env: - IDEA_VERSION: 'PS-2024.1.4' - QA_CATEGORY: 'PhpStorm2024' - - env: - IDEA_VERSION: 'GO-2022.3.1' - QA_CATEGORY: 'GoLand2022' - - env: - IDEA_VERSION: 'GO-2024.1.4' - QA_CATEGORY: 'GoLand2024' - - env: - IDEA_VERSION: 'CL-2022.3.1' - QA_CATEGORY: 'CLion2022' - - env: - IDEA_VERSION: 'CL-2024.1.4' - QA_CATEGORY: 'CLion2024' <<: *SETUP_GRADLE_CACHE xvfb_background_script: | /etc/init.d/xvfb start @@ -346,15 +247,6 @@ qa_task: source set_gradle_build_version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" mkdir -p its/build/idea-sandbox/config-uiTest/ - base64 --decode its/build/idea-sandbox/config-uiTest/clion.key.b64 > its/build/idea-sandbox/config-uiTest/clion.key - base64 --decode its/build/idea-sandbox/config-uiTest/goland.key.b64 > its/build/idea-sandbox/config-uiTest/goland.key - base64 --decode its/build/idea-sandbox/config-uiTest/datagrip.key.b64 > its/build/idea-sandbox/config-uiTest/datagrip.key - base64 --decode its/build/idea-sandbox/config-uiTest/idea.key.b64 > its/build/idea-sandbox/config-uiTest/idea.key - base64 --decode its/build/idea-sandbox/config-uiTest/phpstorm.key.b64 > its/build/idea-sandbox/config-uiTest/phpstorm.key - base64 --decode its/build/idea-sandbox/config-uiTest/pycharm.key.b64 > its/build/idea-sandbox/config-uiTest/pycharm.key - base64 --decode its/build/idea-sandbox/config-uiTest/rider.key.b64 > its/build/idea-sandbox/config-uiTest/rider.key - base64 --decode its/build/idea-sandbox/config-uiTest/rubymine.key.b64 > its/build/idea-sandbox/config-uiTest/rubymine.key - base64 --decode its/build/idea-sandbox/config-uiTest/webstorm.key.b64 > its/build/idea-sandbox/config-uiTest/webstorm.key metacity --sm-disable --replace & sleep 10 # give metacity some time to start gradle :its:runIdeForUiTests --stacktrace -i -PijVersion=${IDEA_VERSION} -PslPluginDirectory=${CIRRUS_WORKING_DIR}/staged-plugin > ${CIRRUS_WORKING_DIR}/runIdeGradle.log & From 4de50d3ce341b1854611e7cf68a101b065159d58 Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 11:44:29 +0100 Subject: [PATCH 2/9] a --- .cirrus.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 98929c4de..71a80a586 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -217,16 +217,6 @@ qa_task: ec2_instance: <<: *WINVM_DEFINITION env: - CLION_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.clion] - GOLAND_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.goland] - DATAGRIP_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.datagrip] - IDEA_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.idea] - PHPSTORM_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.phpstorm] - PYCHARM_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.pycharm] - RIDER_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.rider] - RUBYMINE_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.rubymine] - WEBSTORM_KEY: VAULT[development/team/sonarlint/kv/data/ide.keys data.webstorm] - ARTIFACTORY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token] GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token] DISPLAY: :10 JDK_VERSION: "17" @@ -240,6 +230,8 @@ qa_task: xvfb_background_script: | /etc/init.d/xvfb start prepare_background_script: | + source cirrus-env QA + source .cirrus/use-gradle-wrapper.sh set -euo pipefail echo "Prepare env and start IDE ${IDEA_VERSION}" source cirrus-env QA From b7a073a091878d5fe1819b4333f2d534d0994085 Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 15:31:45 +0100 Subject: [PATCH 3/9] ab --- .cirrus.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 71a80a586..458e13f88 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -227,46 +227,29 @@ qa_task: QA_CATEGORY: 'Idea2022' TEST_SUITE: 'Standalone' <<: *SETUP_GRADLE_CACHE - xvfb_background_script: | - /etc/init.d/xvfb start prepare_background_script: | - source cirrus-env QA - source .cirrus/use-gradle-wrapper.sh set -euo pipefail - echo "Prepare env and start IDE ${IDEA_VERSION}" source cirrus-env QA source .cirrus/use-gradle-wrapper.sh + echo "Prepare env and start IDE ${IDEA_VERSION}" source set_gradle_build_version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" mkdir -p its/build/idea-sandbox/config-uiTest/ - metacity --sm-disable --replace & - sleep 10 # give metacity some time to start gradle :its:runIdeForUiTests --stacktrace -i -PijVersion=${IDEA_VERSION} -PslPluginDirectory=${CIRRUS_WORKING_DIR}/staged-plugin > ${CIRRUS_WORKING_DIR}/runIdeGradle.log & wait_ide_script: | echo "Wait for IDE to start" .cirrus/wait-for-endpoint.sh http://127.0.0.1:8082 -t 500 - recording_background_script: | - echo 'Recording tests on video' - ffmpeg -loglevel warning -f x11grab -video_size 1280x960 -i ${DISPLAY} -codec:v libx264 -r 12 ${CIRRUS_WORKING_DIR}/recording_${IDEA_VERSION}.mp4 run_its_script: | echo "Run ITs on ${IDEA_VERSION}" source .cirrus/use-gradle-wrapper.sh gradle :its:check --stacktrace -i -PijVersion=${IDEA_VERSION} -PslPluginDirectory=${CIRRUS_WORKING_DIR}/staged-plugin <<: *CLEANUP_GRADLE_CACHE_SCRIPT always: - stop_recording_script: | - pkill -SIGINT -f ffmpeg - while pgrep ffmpeg >/dev/null; do sleep 1; done - /etc/init.d/xvfb stop display_log_script: - cat ${CIRRUS_WORKING_DIR}/runIdeGradle.log - test_recording_artifacts: - path: "${CIRRUS_WORKING_DIR}/recording_${IDEA_VERSION}.mp4" log_artifacts: path: "its/build/idea-sandbox/system/log" on_failure: - xvfb_log_artifacts: - path: "${CIRRUS_WORKING_DIR}/Xvfb.out" reports_artifacts: path: "**/reports/**/*" junit_artifacts: From 0c45d1074ea98a0fcd0235153ea6a548861e095f Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 15:55:32 +0100 Subject: [PATCH 4/9] hop --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 458e13f88..5213df61c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -232,6 +232,7 @@ qa_task: source cirrus-env QA source .cirrus/use-gradle-wrapper.sh echo "Prepare env and start IDE ${IDEA_VERSION}" + gradle properties | grep 'version:' | tr --delete "[:space:]" | cut --delimiter=":" --fields=2 source set_gradle_build_version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" mkdir -p its/build/idea-sandbox/config-uiTest/ From 962e4f836c4ce9fe287262d007193f11f489736a Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 16:03:29 +0100 Subject: [PATCH 5/9] hophop --- .cirrus.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 5213df61c..120d88e3b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -232,6 +232,9 @@ qa_task: source cirrus-env QA source .cirrus/use-gradle-wrapper.sh echo "Prepare env and start IDE ${IDEA_VERSION}" + gradle properties + gradle properties | grep 'version:' + gradle properties | grep 'version:' | tr --delete "[:space:]" gradle properties | grep 'version:' | tr --delete "[:space:]" | cut --delimiter=":" --fields=2 source set_gradle_build_version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" From 0fa0167f8e16a54801424204b65bba5fe396bf4f Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 8 Nov 2024 16:14:57 +0100 Subject: [PATCH 6/9] hophophop --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 120d88e3b..a1482c9e1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -232,7 +232,7 @@ qa_task: source cirrus-env QA source .cirrus/use-gradle-wrapper.sh echo "Prepare env and start IDE ${IDEA_VERSION}" - gradle properties + gradle properties 2>&1 gradle properties | grep 'version:' gradle properties | grep 'version:' | tr --delete "[:space:]" gradle properties | grep 'version:' | tr --delete "[:space:]" | cut --delimiter=":" --fields=2 From 4d95e31c13173cf17b458a3d33486041a7ca57c1 Mon Sep 17 00:00:00 2001 From: Julien Carsique Date: Wed, 20 Nov 2024 11:26:44 +0100 Subject: [PATCH 7/9] SLI-1693 wip --- .cirrus.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index a1482c9e1..a6a028780 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -157,7 +157,7 @@ validate_windows_task: build_script: | source cirrus-env QA source .cirrus/use-gradle-wrapper.sh - ./gradlew :check + gradle :check <<: *CLEANUP_GRADLE_CACHE_SCRIPT on_failure: reports_artifacts: @@ -200,7 +200,7 @@ plugin_verifier_task: source .cirrus/use-gradle-wrapper.sh VERSIONS=$(curl -s -L https://jb.gg/intellij-platform-builds-list | jq '.[] | "\(.code) \(.releases[].version)"' | grep -Ew "${ALLOWED_IDE}" | grep "${IDEA_VERSION}" | tr -d '"' | awk '{k=$1} $2>a[k]{a[k]=$2} END{for (i in a) print i, a[i]}' | sort -u | sed 's/ /-/' | paste -s -d',') echo ${VERSIONS} - ./gradlew :runPluginVerifier -PverifierVersions=${VERSIONS} + gradle :runPluginVerifier -PverifierVersions=${VERSIONS} <<: *CLEANUP_GRADLE_CACHE_SCRIPT on_failure: reports_artifacts: @@ -221,6 +221,10 @@ qa_task: DISPLAY: :10 JDK_VERSION: "17" SONARCLOUD_IT_PASSWORD: VAULT[development/team/sonarlint/kv/data/sonarcloud-it data.password] + IDEA_HOME: "/C/Program Files/intellij" + RIDER_HOME: "/C/Program Files/rider" + RESHARPER_HOME: "/C/Program Files/resharper" + CLION_HOME: "/C/Program Files/clion" matrix: - env: IDEA_VERSION: 'IC-2022.3.1' @@ -232,17 +236,16 @@ qa_task: source cirrus-env QA source .cirrus/use-gradle-wrapper.sh echo "Prepare env and start IDE ${IDEA_VERSION}" - gradle properties 2>&1 - gradle properties | grep 'version:' - gradle properties | grep 'version:' | tr --delete "[:space:]" - gradle properties | grep 'version:' | tr --delete "[:space:]" | cut --delimiter=":" --fields=2 source set_gradle_build_version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" mkdir -p its/build/idea-sandbox/config-uiTest/ gradle :its:runIdeForUiTests --stacktrace -i -PijVersion=${IDEA_VERSION} -PslPluginDirectory=${CIRRUS_WORKING_DIR}/staged-plugin > ${CIRRUS_WORKING_DIR}/runIdeGradle.log & wait_ide_script: | echo "Wait for IDE to start" - .cirrus/wait-for-endpoint.sh http://127.0.0.1:8082 -t 500 + sleep 600s + curl --connect-timeout 1 --insecure -s -o /dev/null http://127.0.0.1:8082 + # TODO write windows version of wait-for-endpoint.sh + # .cirrus/wait-for-endpoint.sh http://127.0.0.1:8082 -t 500 run_its_script: | echo "Run ITs on ${IDEA_VERSION}" source .cirrus/use-gradle-wrapper.sh From 052639f217b1a03103b6903eff2ae450fdec92cb Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 22 Nov 2024 10:01:50 +0100 Subject: [PATCH 8/9] SLI-1693 Use 8083 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index a6a028780..34ebe67ba 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -245,7 +245,7 @@ qa_task: sleep 600s curl --connect-timeout 1 --insecure -s -o /dev/null http://127.0.0.1:8082 # TODO write windows version of wait-for-endpoint.sh - # .cirrus/wait-for-endpoint.sh http://127.0.0.1:8082 -t 500 + # .cirrus/wait-for-endpoint.sh http://127.0.0.1:8083 -t 500 run_its_script: | echo "Run ITs on ${IDEA_VERSION}" source .cirrus/use-gradle-wrapper.sh From 0c11ff06926a7790c8cb90fd634f0ccedb9c7118 Mon Sep 17 00:00:00 2001 From: Eray Felek Date: Fri, 6 Dec 2024 12:14:19 +0100 Subject: [PATCH 9/9] use right port --- .cirrus.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 34ebe67ba..9c3e97c52 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -236,16 +236,23 @@ qa_task: source cirrus-env QA source .cirrus/use-gradle-wrapper.sh echo "Prepare env and start IDE ${IDEA_VERSION}" + echo "Prepare env and start IDE ${IDEA_VERSION}" + powershell 'Get-Process | Select-Object Id, ProcessName, MainWindowTitle | Where-Object { $_.MainWindowTitle -ne '' }' source set_gradle_build_version + #echo "Prepare env and start IDE ${IDEA_VERSION}" + #echo gradle --version mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack -B -Dartifact=org.sonarsource.sonarlint.intellij:sonarlint-intellij:${PROJECT_VERSION}:zip "-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-plugin" + # echo ${CIRRUS_WORKING_DIR} + # echo ls ${CIRRUS_WORKING_DIR}/staged-plugin mkdir -p its/build/idea-sandbox/config-uiTest/ gradle :its:runIdeForUiTests --stacktrace -i -PijVersion=${IDEA_VERSION} -PslPluginDirectory=${CIRRUS_WORKING_DIR}/staged-plugin > ${CIRRUS_WORKING_DIR}/runIdeGradle.log & wait_ide_script: | echo "Wait for IDE to start" - sleep 600s + sleep 400s curl --connect-timeout 1 --insecure -s -o /dev/null http://127.0.0.1:8082 # TODO write windows version of wait-for-endpoint.sh - # .cirrus/wait-for-endpoint.sh http://127.0.0.1:8083 -t 500 + # .cirrus/wait-for-endpoint.sh http://127.0.0.1:8082 -t 10 + run_its_script: | echo "Run ITs on ${IDEA_VERSION}" source .cirrus/use-gradle-wrapper.sh