Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLI-1758 Feature/ef/sli 1693 windows other tab tests #1255

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 20 additions & 139 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
slack_notification_script: |
source slack-failure-notification

validate_task:

Check warning on line 116 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L116

task "validate" depends on task "build", but their only_if conditions are different

Check warning on line 116 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L116

task "validate" depends on task "build", but their only_if conditions are different

Check warning on line 116 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L116

task "validate" depends on task "build", but their only_if conditions are different
# name: "Run UTs and trigger SonarQube analysis"
depends_on:
- build
Expand All @@ -139,7 +139,7 @@
slack_notification_script: |
source slack-failure-notification

validate_windows_task:

Check warning on line 142 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L142

task "validate_windows" depends on task "build", but their only_if conditions are different

Check warning on line 142 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L142

task "validate_windows" depends on task "build", but their only_if conditions are different

Check warning on line 142 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L142

task "validate_windows" depends on task "build", but their only_if conditions are different
# name: "Run unit tests on Windows"
depends_on:
- build
Expand All @@ -157,7 +157,7 @@
build_script: |
source cirrus-env QA
source .cirrus/use-gradle-wrapper.sh
./gradlew :check
gradle :check
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
on_failure:
reports_artifacts:
Expand Down Expand Up @@ -200,7 +200,7 @@
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:
Expand All @@ -208,181 +208,62 @@
slack_notification_script: |
source slack-failure-notification

qa_task:

Check warning on line 211 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L211

task "qa" depends on task "build", but their only_if conditions are different

Check warning on line 211 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L211

task "qa" depends on task "build", but their only_if conditions are different

Check warning on line 211 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L211

task "qa" depends on task "build", but their only_if conditions are different
# name: "Run ITs"
depends_on:
- 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]
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"
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
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'
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
prepare_background_script: |
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}"
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/
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 &
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
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:8082 -t 10

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:
Expand All @@ -391,7 +272,7 @@
slack_notification_script: |
source slack-failure-notification

inspect_orchestrator_cache_task:

Check warning on line 275 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L275

task "inspect_orchestrator_cache" depends on task "build", but their only_if conditions are different

Check warning on line 275 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L275

task "inspect_orchestrator_cache" depends on task "build", but their only_if conditions are different

Check warning on line 275 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L275

task "inspect_orchestrator_cache" depends on task "build", but their only_if conditions are different
<<: *ONLY_PR_AND_MAINTAINED_BRANCHES
depends_on: build
eks_container:
Expand Down Expand Up @@ -435,7 +316,7 @@
slack_notification_script: |
source slack-failure-notification

promote_task:

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "mend_scan", but their only_if conditions are different

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "build", but their only_if conditions are different

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "mend_scan", but their only_if conditions are different

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "build", but their only_if conditions are different

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "mend_scan", but their only_if conditions are different

Check warning on line 319 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L319

task "promote" depends on task "build", but their only_if conditions are different
depends_on:
- build
- validate
Expand Down