From 3026ca964fb8a25dc5661624228ec74bab4bf600 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 28 Sep 2020 10:23:22 +0100 Subject: [PATCH 1/3] [CI] Support Windows-2012 in pipeline 2.0 --- auditbeat/Jenkinsfile.yml | 1 + filebeat/Jenkinsfile.yml | 1 + heartbeat/Jenkinsfile.yml | 1 + metricbeat/Jenkinsfile.yml | 1 + packetbeat/Jenkinsfile.yml | 1 + winlogbeat/Jenkinsfile.yml | 1 + x-pack/auditbeat/Jenkinsfile.yml | 1 + x-pack/elastic-agent/Jenkinsfile.yml | 1 + x-pack/filebeat/Jenkinsfile.yml | 1 + x-pack/functionbeat/Jenkinsfile.yml | 1 + x-pack/metricbeat/Jenkinsfile.yml | 1 + x-pack/packetbeat/Jenkinsfile.yml | 1 + x-pack/winlogbeat/Jenkinsfile.yml | 1 + 13 files changed, 13 insertions(+) diff --git a/auditbeat/Jenkinsfile.yml b/auditbeat/Jenkinsfile.yml index 873e2c319f3..decee8d9e30 100644 --- a/auditbeat/Jenkinsfile.yml +++ b/auditbeat/Jenkinsfile.yml @@ -32,3 +32,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 45b032accfb..998253637b1 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -31,3 +31,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/heartbeat/Jenkinsfile.yml b/heartbeat/Jenkinsfile.yml index b8668715c3c..21e16586d52 100644 --- a/heartbeat/Jenkinsfile.yml +++ b/heartbeat/Jenkinsfile.yml @@ -30,3 +30,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/metricbeat/Jenkinsfile.yml b/metricbeat/Jenkinsfile.yml index 1219a27af77..32c3d2c8358 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/Jenkinsfile.yml @@ -38,3 +38,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/packetbeat/Jenkinsfile.yml b/packetbeat/Jenkinsfile.yml index 416e69a203b..01301640992 100644 --- a/packetbeat/Jenkinsfile.yml +++ b/packetbeat/Jenkinsfile.yml @@ -30,3 +30,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/winlogbeat/Jenkinsfile.yml b/winlogbeat/Jenkinsfile.yml index 74eb55586d0..7a126b0704c 100644 --- a/winlogbeat/Jenkinsfile.yml +++ b/winlogbeat/Jenkinsfile.yml @@ -19,3 +19,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/auditbeat/Jenkinsfile.yml b/x-pack/auditbeat/Jenkinsfile.yml index 86f0832d3f2..eec21b1db4b 100644 --- a/x-pack/auditbeat/Jenkinsfile.yml +++ b/x-pack/auditbeat/Jenkinsfile.yml @@ -31,3 +31,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/elastic-agent/Jenkinsfile.yml b/x-pack/elastic-agent/Jenkinsfile.yml index 8f99e11da3c..69ada6126cd 100644 --- a/x-pack/elastic-agent/Jenkinsfile.yml +++ b/x-pack/elastic-agent/Jenkinsfile.yml @@ -30,3 +30,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index d3d5e6d862e..e73bae821fd 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -31,3 +31,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/functionbeat/Jenkinsfile.yml b/x-pack/functionbeat/Jenkinsfile.yml index f3428ae7cc8..939dff48a8b 100644 --- a/x-pack/functionbeat/Jenkinsfile.yml +++ b/x-pack/functionbeat/Jenkinsfile.yml @@ -30,3 +30,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index 2448d43d85b..d1d7c8a221c 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -33,3 +33,4 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/packetbeat/Jenkinsfile.yml b/x-pack/packetbeat/Jenkinsfile.yml index 8496265e0ac..b76aef525e0 100644 --- a/x-pack/packetbeat/Jenkinsfile.yml +++ b/x-pack/packetbeat/Jenkinsfile.yml @@ -18,3 +18,4 @@ stages: withModule: true platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" diff --git a/x-pack/winlogbeat/Jenkinsfile.yml b/x-pack/winlogbeat/Jenkinsfile.yml index 396d1f03a7c..6d5bba0fb6c 100644 --- a/x-pack/winlogbeat/Jenkinsfile.yml +++ b/x-pack/winlogbeat/Jenkinsfile.yml @@ -18,3 +18,4 @@ stages: withModule: true platforms: ## override default labels in this specific stage. - "windows-2019" + - "windows-2012-r2" From 89f4b051b2e1cc636ee600e92e72a4663f8a1a37 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 8 Oct 2020 14:42:35 +0100 Subject: [PATCH 2/3] Fix merge conflict --- x-pack/metricbeat/Jenkinsfile.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index 58cd8b1ae2f..60a593c488d 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -35,9 +35,6 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" -<<<<<<< HEAD - - "windows-2012-r2" -======= windows-2016: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. @@ -49,4 +46,14 @@ stages: - "windows-2016" branches: true ## for all the branches tags: true ## for all the tags ->>>>>>> upstream/master + windows-2012: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-2012-r2" + when: ## Override the top-level when. + comments: + - "/test x-pack/metricbeat for windows-2012" + labels: + - "windows-2012" + branches: true ## for all the branches + tags: true ## for all the tags From f95db3c68758dff863f09758483e6430e1447c10 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 8 Oct 2020 15:21:56 +0100 Subject: [PATCH 3/3] Add PATH since gcc is not in the default PATH in the workers --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 17041987b27..d3e0449498a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -230,9 +230,10 @@ def withBeatsEnv(Map args = [:], Closure body) { artifacts = '**/build/TEST*.out' } else { def chocoPath = 'C:\\ProgramData\\chocolatey\\bin' + def mingw64Path = 'C:\\tools\\mingw64\\bin' def chocoPython3Path = 'C:\\Python38;C:\\Python38\\Scripts' goRoot = "${env.USERPROFILE}\\.gvm\\versions\\go${GO_VERSION}.windows.amd64" - path = "${env.WORKSPACE}\\bin;${goRoot}\\bin;${chocoPath};${chocoPython3Path};${env.PATH}" + path = "${env.WORKSPACE}\\bin;${goRoot}\\bin;${chocoPath};${chocoPython3Path};${env.PATH};${mingw64Path}" magefile = "${env.WORKSPACE}\\.magefile" testResults = "**\\build\\TEST*.xml" artifacts = "**\\build\\TEST*.out"