From cb92722f0ecddd4acf1d651853d62d5ee8e7a734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 7 Oct 2020 09:54:41 +0200 Subject: [PATCH 1/2] fix: set versions ony for PRs We want to use default versions per branch when running after a merge --- .ci/packaging.groovy | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.ci/packaging.groovy b/.ci/packaging.groovy index 301ead43bab..9ff00c2d591 100644 --- a/.ci/packaging.groovy +++ b/.ci/packaging.groovy @@ -245,19 +245,25 @@ def triggerE2ETests(String suite) { def branchName = isPR() ? "${env.CHANGE_TARGET}" : "${env.JOB_BASE_NAME}" def e2eTestsPipeline = "e2e-tests/e2e-testing-mbp/${branchName}" + + def parameters = [ + booleanParam(name: 'forceSkipGitChecks', value: true), + booleanParam(name: 'forceSkipPresubmit', value: true), + booleanParam(name: 'notifyOnGreenBuilds', value: !isPR()) + string(name: 'runTestsSuites', value: suite), + string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_E2E_TESTS_NAME), + string(name: 'GITHUB_CHECK_REPO', value: env.REPO), + string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT), + ] + if (isPR()) { + def version = "pr-${env.CHANGE_ID}" + parameters.push(booleanParam(name: 'USE_CI_SNAPSHOTS', value: true)) + parameters.push(string(name: 'ELASTIC_AGENT_VERSION', value: "${version}")) + parameters.push(string(name: 'METRICBEAT_VERSION', value: "${version}")) + } + build(job: "${e2eTestsPipeline}", - parameters: [ - booleanParam(name: 'forceSkipGitChecks', value: true), - booleanParam(name: 'forceSkipPresubmit', value: true), - booleanParam(name: 'notifyOnGreenBuilds', value: !isPR()), - booleanParam(name: 'USE_CI_SNAPSHOTS', value: true), - string(name: 'ELASTIC_AGENT_VERSION', value: "pr-${env.CHANGE_ID}"), - string(name: 'METRICBEAT_VERSION', value: "pr-${env.CHANGE_ID}"), - string(name: 'runTestsSuites', value: suite), - string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_E2E_TESTS_NAME), - string(name: 'GITHUB_CHECK_REPO', value: env.REPO), - string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT), - ], + parameters: parameters, propagate: false, wait: false ) From 8f079cb0d56b20bcb7eb6e5ba76da4c19815963e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 7 Oct 2020 10:21:13 +0200 Subject: [PATCH 2/2] fix: add trailing comma Co-authored-by: Victor Martinez --- .ci/packaging.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/packaging.groovy b/.ci/packaging.groovy index 9ff00c2d591..26916372b70 100644 --- a/.ci/packaging.groovy +++ b/.ci/packaging.groovy @@ -249,7 +249,7 @@ def triggerE2ETests(String suite) { def parameters = [ booleanParam(name: 'forceSkipGitChecks', value: true), booleanParam(name: 'forceSkipPresubmit', value: true), - booleanParam(name: 'notifyOnGreenBuilds', value: !isPR()) + booleanParam(name: 'notifyOnGreenBuilds', value: !isPR()), string(name: 'runTestsSuites', value: suite), string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_E2E_TESTS_NAME), string(name: 'GITHUB_CHECK_REPO', value: env.REPO),