diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4b974d020..3c1a0d3d33 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,26 +46,9 @@ pool: stages: - - stage: ES_S3_UP - displayName: 'Upload missing ROR ES dependencies' - dependsOn: [ ] - condition: and(succeeded(), ne(variables['Build.Reason'], 'Manual')) - jobs: - - job: - steps: - - script: | - # Translate back env vars to avoid cyclical reference :/ - export aws_access_key_id=$var_aws_access_key_id - export aws_secret_access_key=$var_aws_secret_access_key - ci/upload_es_artifacts.sh - continueOnError: true - env: - var_aws_access_key_id: $(aws_access_key_id) - var_aws_secret_access_key: $(aws_secret_access_key) - - stage: OPTIONAL_CHECKS displayName: 'Optional checks' - dependsOn: [ ES_S3_UP ] + dependsOn: [ ] condition: and(succeeded(), ne(variables['Build.Reason'], 'Manual')) jobs: - job: CVE_CHECK @@ -114,7 +97,7 @@ stages: - stage: REQUIRED_CHECKS displayName: 'Required checks' - dependsOn: [ ES_S3_UP ] + dependsOn: [ ] condition: and(succeeded(), ne(variables['Build.Reason'], 'Manual')) jobs: - job: @@ -138,7 +121,7 @@ stages: - stage: TEST displayName: 'Run all tests' - dependsOn: [ ES_S3_UP ] + dependsOn: [ ] condition: and( succeeded(), @@ -373,138 +356,138 @@ stages: ####################################################### ##### Integration tests for ES 9.x on PRs ####################################################### - - job: - condition: - and( - succeeded(), - ne(variables.isEpic, true), - ne(variables.isDevelop, true), - ne(variables.isMaster, true), - not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) - ) - container: openjdk:22-jdk-slim - timeoutInMinutes: 120 - steps: - - checkout: self - fetchDepth: 1 - clean: false - persistCredentials: true - - script: | - # Translate back env vars to avoid cyclical reference :/ - export aws_access_key_id=$var_aws_access_key_id - export aws_secret_access_key=$var_aws_secret_access_key - - echo "[TEST] executing ROR_TASK = $ROR_TASK" - ci/run-pipeline.sh - env: - var_aws_access_key_id: $(aws_access_key_id) - var_aws_secret_access_key: $(aws_secret_access_key) - - task: PublishTestResults@2 - condition: failed() - inputs: - testRunTitle: "$(ROR_TASK) results" - testResultsFiles: "**/TEST*xml" - mergeTestResults: true - strategy: - maxParallel: 99 - matrix: - IT_es92x: - ROR_TASK: integration_es92x - IT_es90x: - ROR_TASK: integration_es90x +# - job: +# condition: +# and( +# succeeded(), +# ne(variables.isEpic, true), +# ne(variables.isDevelop, true), +# ne(variables.isMaster, true), +# not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) +# ) +# container: openjdk:22-jdk-slim +# timeoutInMinutes: 120 +# steps: +# - checkout: self +# fetchDepth: 1 +# clean: false +# persistCredentials: true +# - script: | +# # Translate back env vars to avoid cyclical reference :/ +# export aws_access_key_id=$var_aws_access_key_id +# export aws_secret_access_key=$var_aws_secret_access_key +# +# echo "[TEST] executing ROR_TASK = $ROR_TASK" +# ci/run-pipeline.sh +# env: +# var_aws_access_key_id: $(aws_access_key_id) +# var_aws_secret_access_key: $(aws_secret_access_key) +# - task: PublishTestResults@2 +# condition: failed() +# inputs: +# testRunTitle: "$(ROR_TASK) results" +# testResultsFiles: "**/TEST*xml" +# mergeTestResults: true +# strategy: +# maxParallel: 99 +# matrix: +# IT_es92x: +# ROR_TASK: integration_es92x +# IT_es90x: +# ROR_TASK: integration_es90x ####################################################### ##### Integration tests for ES 8.x on PRs ####################################################### - - job: - condition: - and( - succeeded(), - ne(variables.isEpic, true), - ne(variables.isDevelop, true), - ne(variables.isMaster, true), - not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) - ) - container: openjdk:22-jdk-slim - timeoutInMinutes: 120 - steps: - - checkout: self - fetchDepth: 1 - clean: false - persistCredentials: true - - script: | - # Translate back env vars to avoid cyclical reference :/ - export aws_access_key_id=$var_aws_access_key_id - export aws_secret_access_key=$var_aws_secret_access_key - - echo "[TEST] executing ROR_TASK = $ROR_TASK" - ci/run-pipeline.sh - env: - var_aws_access_key_id: $(aws_access_key_id) - var_aws_secret_access_key: $(aws_secret_access_key) - - task: PublishTestResults@2 - condition: failed() - inputs: - testRunTitle: "$(ROR_TASK) results" - testResultsFiles: "**/TEST*xml" - mergeTestResults: true - strategy: - maxParallel: 99 - matrix: - IT_es818x: - ROR_TASK: integration_es818x - IT_es816x: - ROR_TASK: integration_es816x - IT_es810x: - ROR_TASK: integration_es810x - IT_es80x: - ROR_TASK: integration_es80x +# - job: +# condition: +# and( +# succeeded(), +# ne(variables.isEpic, true), +# ne(variables.isDevelop, true), +# ne(variables.isMaster, true), +# not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) +# ) +# container: openjdk:22-jdk-slim +# timeoutInMinutes: 120 +# steps: +# - checkout: self +# fetchDepth: 1 +# clean: false +# persistCredentials: true +# - script: | +# # Translate back env vars to avoid cyclical reference :/ +# export aws_access_key_id=$var_aws_access_key_id +# export aws_secret_access_key=$var_aws_secret_access_key +# +# echo "[TEST] executing ROR_TASK = $ROR_TASK" +# ci/run-pipeline.sh +# env: +# var_aws_access_key_id: $(aws_access_key_id) +# var_aws_secret_access_key: $(aws_secret_access_key) +# - task: PublishTestResults@2 +# condition: failed() +# inputs: +# testRunTitle: "$(ROR_TASK) results" +# testResultsFiles: "**/TEST*xml" +# mergeTestResults: true +# strategy: +# maxParallel: 99 +# matrix: +# IT_es818x: +# ROR_TASK: integration_es818x +# IT_es816x: +# ROR_TASK: integration_es816x +# IT_es810x: +# ROR_TASK: integration_es810x +# IT_es80x: +# ROR_TASK: integration_es80x ####################################################### ##### Integration tests for ES <= 7.x on PRs ####################################################### - - job: - condition: - and( - succeeded(), - ne(variables.isEpic, true), - ne(variables.isDevelop, true), - ne(variables.isMaster, true), - not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) - ) - timeoutInMinutes: 120 - steps: - - checkout: self - fetchDepth: 1 - clean: false - persistCredentials: true - - script: | - # Translate back env vars to avoid cyclical reference :/ - export aws_access_key_id=$var_aws_access_key_id - export aws_secret_access_key=$var_aws_secret_access_key - - echo "[TEST] executing ROR_TASK = $ROR_TASK" - ci/run-pipeline.sh - env: - var_aws_access_key_id: $(aws_access_key_id) - var_aws_secret_access_key: $(aws_secret_access_key) - - task: PublishTestResults@2 - condition: failed() - inputs: - testRunTitle: "$(ROR_TASK) results" - testResultsFiles: "**/TEST*xml" - mergeTestResults: true - strategy: - maxParallel: 99 - matrix: - IT_es717x: - ROR_TASK: integration_es717x - IT_es710x: - ROR_TASK: integration_es710x - IT_es70x: - ROR_TASK: integration_es70x - IT_es67x: - ROR_TASK: integration_es67x +# - job: +# condition: +# and( +# succeeded(), +# ne(variables.isEpic, true), +# ne(variables.isDevelop, true), +# ne(variables.isMaster, true), +# not(and(eq(variables['Build.Reason'], 'Manual'), startsWith('${{ parameters.actionToPerform }}', 'run_all_tests'))) +# ) +# timeoutInMinutes: 120 +# steps: +# - checkout: self +# fetchDepth: 1 +# clean: false +# persistCredentials: true +# - script: | +# # Translate back env vars to avoid cyclical reference :/ +# export aws_access_key_id=$var_aws_access_key_id +# export aws_secret_access_key=$var_aws_secret_access_key +# +# echo "[TEST] executing ROR_TASK = $ROR_TASK" +# ci/run-pipeline.sh +# env: +# var_aws_access_key_id: $(aws_access_key_id) +# var_aws_secret_access_key: $(aws_secret_access_key) +# - task: PublishTestResults@2 +# condition: failed() +# inputs: +# testRunTitle: "$(ROR_TASK) results" +# testResultsFiles: "**/TEST*xml" +# mergeTestResults: true +# strategy: +# maxParallel: 99 +# matrix: +# IT_es717x: +# ROR_TASK: integration_es717x +# IT_es710x: +# ROR_TASK: integration_es710x +# IT_es70x: +# ROR_TASK: integration_es70x +# IT_es67x: +# ROR_TASK: integration_es67x ####################################################### ##### Integration tests on Windows on master/develop diff --git a/ci/upload_es_artifacts.sh b/ci/upload_es_artifacts.sh index 810e16f25a..6f269a7a18 100755 --- a/ci/upload_es_artifacts.sh +++ b/ci/upload_es_artifacts.sh @@ -4,8 +4,6 @@ set -xe echo ">>> ($0) UPLOADING ES ARTIFACTS ..." -./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=9.2.1 -./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=9.1.7 #./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.9.2 #./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.9.1 #./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.9.0 diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index 8fad505a9f..801ad8ff64 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -66,8 +66,9 @@ object WindowsEsSetup extends LazyLogging { val destBetterFile = File(destination.toNIO) file.copyTo(destBetterFile, overwrite = true) case PluginInstallationStep.RunCommand(_, windowsCommand) => - logger.info(s"Step ${index + 1}/$numberOfSteps: run command $windowsCommand") - os.proc("cmd", "/c", windowsCommand).call( + val commandWithSanitizedPaths = windowsCommand.replace("\\", "/") + logger.info(s"Step ${index + 1}/$numberOfSteps: run command $commandWithSanitizedPaths") + os.proc("cmd", "/c", commandWithSanitizedPaths).call( cwd = esPath(elasticsearch.config.clusterName, elasticsearch.config.nodeName), stdout = os.ProcessOutput.Readlines(line => logger.info(s"[Step ${index + 1}/$numberOfSteps cmd] $line")), stderr = os.ProcessOutput.Readlines(line => logger.error(s"[Step ${index + 1}/$numberOfSteps cmd] $line")),