diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index d6e0296a11fc..0fb4813bf09b 100755 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -1,6 +1,12 @@ set GOPATH=%WORKSPACE% set MAGEFILE_CACHE=%WORKSPACE%\.magefile -set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;C:\tools\mingw64\bin;%PATH% + +REM Configure GCC for either 32 or 64 bits +set MINGW_ARCH=64 +IF NOT EXIST "%PROGRAMFILES(X86)%" ( + set MINGW_ARCH=32 +) +set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;C:\tools\mingw%MINGW_ARCH%\bin;%PATH% where /q curl IF ERRORLEVEL 1 ( @@ -35,9 +41,13 @@ if not exist C:\Python38\python.exe ( python --version where python -if not exist C:\tools\mingw64\bin\gcc.exe ( +where /q gcc +IF ERRORLEVEL 1 ( REM Install mingw 5.3.0 - choco install mingw -y -r --no-progress --version 5.3.0 || echo ERROR && exit /b + choco install mingw -y -r --no-progress --version 5.3.0 + IF NOT ERRORLEVEL 0 ( + exit /b 1 + ) ) gcc --version where gcc diff --git a/Jenkinsfile b/Jenkinsfile index be00ae1f4e94..5455a097f689 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -284,15 +284,17 @@ def withBeatsEnv(Map args = [:], Closure body) { testResults = '**/build/TEST*.xml' artifacts = '**/build/TEST*.out' } else { + // NOTE: to support Windows 7 32 bits the arch in the mingw and go context paths is required. + def mingwArch = is32() ? '32' : '64' + def goArch = is32() ? '386' : 'amd64' 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};${mingw64Path}" + goRoot = "${env.USERPROFILE}\\.gvm\\versions\\go${GO_VERSION}.windows.${goArch}" + path = "${env.WORKSPACE}\\bin;${goRoot}\\bin;${chocoPath};${chocoPython3Path};C:\\tools\\mingw${mingwArch}\\bin;${env.PATH}" magefile = "${env.WORKSPACE}\\.magefile" testResults = "**\\build\\TEST*.xml" artifacts = "**\\build\\TEST*.out" - gox_flags = '-arch amd64' + gox_flags = '-arch 386' } deleteDir() diff --git a/auditbeat/Jenkinsfile.yml b/auditbeat/Jenkinsfile.yml index 07acc93570cf..3ed44ddedf82 100644 --- a/auditbeat/Jenkinsfile.yml +++ b/auditbeat/Jenkinsfile.yml @@ -47,6 +47,7 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + #- "windows-7-32-bit" https://github.com/elastic/beats/issues/19831 #- "windows-2008-r2" https://github.com/elastic/beats/issues/19799 windows-2016: mage: "mage build unitTest" diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 25d31e2fface..658e3d60dbd3 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -79,4 +79,15 @@ stages: labels: - "windows-8" branches: true ## for all the branches - tags: true ## for all the tags \ No newline at end of file + tags: true ## for all the tags + windows-7-32: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-7-32-bit" + when: ## Override the top-level when. + comments: + - "/test filebeat for windows-7-32" + labels: + - "windows-7-32" + branches: true ## for all the branches + tags: true ## for all the tags diff --git a/heartbeat/Jenkinsfile.yml b/heartbeat/Jenkinsfile.yml index ba1b19d9215f..d068a7798ad0 100644 --- a/heartbeat/Jenkinsfile.yml +++ b/heartbeat/Jenkinsfile.yml @@ -100,3 +100,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tag + windows-7-32: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-7-32-bit" + when: ## Override the top-level when. + comments: + - "/test heartbeat for windows-7-32" + labels: + - "windows-7-32" + branches: true ## for all the branches + tags: true ## for all the tags diff --git a/metricbeat/Jenkinsfile.yml b/metricbeat/Jenkinsfile.yml index a06e886b17db..3d17e9c6ce28 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/Jenkinsfile.yml @@ -41,6 +41,7 @@ stages: platforms: ## override default labels in this specific stage. - "windows-2019" #- "windows-2008-r2" https://github.com/elastic/beats/issues/19800 + #- "windows-7-32-bit" https://github.com/elastic/beats/issues/19835 windows-2016: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. diff --git a/packetbeat/Jenkinsfile.yml b/packetbeat/Jenkinsfile.yml index 39b3682ffd04..a75bbd3bf609 100644 --- a/packetbeat/Jenkinsfile.yml +++ b/packetbeat/Jenkinsfile.yml @@ -100,3 +100,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + #windows-7-32: See https://github.com/elastic/beats/issues/22303 + # mage: "mage build unitTest" + # platforms: ## override default labels in this specific stage. + # - "windows-7-32-bit" + # when: ## Override the top-level when. + # comments: + # - "/test packetbeat for windows-7-32" + # labels: + # - "windows-7-32" + # branches: true ## for all the branches + # tags: true ## for all the tags diff --git a/winlogbeat/Jenkinsfile.yml b/winlogbeat/Jenkinsfile.yml index f56fa84567a9..56427c4f19b4 100644 --- a/winlogbeat/Jenkinsfile.yml +++ b/winlogbeat/Jenkinsfile.yml @@ -42,7 +42,7 @@ stages: - "windows-2012" branches: true ## for all the branches tags: true ## for all the tags - # windows-10: See https://github.com/elastic/beats/issues/22046 + #windows-10: See https://github.com/elastic/beats/issues/22046 # mage: "mage build unitTest" # platforms: ## override default labels in this specific stage. # - "windows-10" @@ -64,3 +64,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + #windows-7-32: See https://github.com/elastic/beats/issues/19829 + # mage: "mage build unitTest" + # platforms: ## override default labels in this specific stage. + # - "windows-7-32-bit" + # when: ## Override the top-level when. + # comments: + # - "/test winlogbeat for windows-7-32" + # labels: + # - "windows-7-32" + # branches: true ## for all the branches + # tags: true ## for all the tags diff --git a/x-pack/auditbeat/Jenkinsfile.yml b/x-pack/auditbeat/Jenkinsfile.yml index fc0c153300f0..7e40a4047ad7 100644 --- a/x-pack/auditbeat/Jenkinsfile.yml +++ b/x-pack/auditbeat/Jenkinsfile.yml @@ -101,3 +101,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + windows-7-32: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-7-32-bit" + when: ## Override the top-level when. + comments: + - "/test auditbeat for windows-7-32" + labels: + - "windows-7-32" + branches: true ## for all the branches + tags: true ## for all the tags diff --git a/x-pack/elastic-agent/Jenkinsfile.yml b/x-pack/elastic-agent/Jenkinsfile.yml index 96fdf9a435fc..890a2cbb4c4a 100644 --- a/x-pack/elastic-agent/Jenkinsfile.yml +++ b/x-pack/elastic-agent/Jenkinsfile.yml @@ -100,3 +100,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + #windows-7-32: See https://github.com/elastic/beats/issues/22316 + # mage: "mage build unitTest" + # platforms: ## override default labels in this specific stage. + # - "windows-7-32-bit" + # when: ## Override the top-level when. + # comments: + # - "/test x-pack/elastic-agent for windows-7-32" + # labels: + # - "windows-7-32" + # branches: true ## for all the branches + # tags: true ## for all the tags diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index dbb262ee7e61..b3ef5fad8c38 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -101,3 +101,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + #windows-7-32: See https://github.com/elastic/beats/issues/22315 + # mage: "mage build unitTest" + # platforms: ## override default labels in this specific stage. + # - "windows-7-32-bit" + # when: ## Override the top-level when. + # comments: + # - "/test x-pack/filebeat for windows-7-32" + # labels: + # - "windows-7-32" + # branches: true ## for all the branches + # tags: true ## for all the tags diff --git a/x-pack/functionbeat/Jenkinsfile.yml b/x-pack/functionbeat/Jenkinsfile.yml index 785b3960686d..184517642893 100644 --- a/x-pack/functionbeat/Jenkinsfile.yml +++ b/x-pack/functionbeat/Jenkinsfile.yml @@ -98,3 +98,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + windows-7-32: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-7-32-bit" + when: ## Override the top-level when. + comments: + - "/test x-pack/functionbeat for windows-7-32" + labels: + - "windows-7-32" + branches: true ## for all the branches + tags: true ## for all the tags diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index be79daee7189..5fe7cff41346 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -35,6 +35,7 @@ stages: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. - "windows-2019" + #- "windows-7-32-bit" https://github.com/elastic/beats/issues/19835 windows-2016: mage: "mage build unitTest" platforms: ## override default labels in this specific stage. diff --git a/x-pack/packetbeat/Jenkinsfile.yml b/x-pack/packetbeat/Jenkinsfile.yml index c696de51e0fd..08f666bc43ed 100644 --- a/x-pack/packetbeat/Jenkinsfile.yml +++ b/x-pack/packetbeat/Jenkinsfile.yml @@ -73,3 +73,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + windows-7-32: + mage: "mage build unitTest" + platforms: ## override default labels in this specific stage. + - "windows-7-32-bit" + when: ## Override the top-level when. + comments: + - "/test x-pack/packetbeat for windows-7-32" + labels: + - "windows-7-32" + branches: true ## for all the branches + tags: true ## for all the tags diff --git a/x-pack/winlogbeat/Jenkinsfile.yml b/x-pack/winlogbeat/Jenkinsfile.yml index 9e5cb052e107..405ce1aa1d47 100644 --- a/x-pack/winlogbeat/Jenkinsfile.yml +++ b/x-pack/winlogbeat/Jenkinsfile.yml @@ -73,3 +73,14 @@ stages: - "windows-8" branches: true ## for all the branches tags: true ## for all the tags + #windows-7-32: See https://github.com/elastic/beats/issues/19829 + # mage: "mage build unitTest" + # platforms: ## override default labels in this specific stage. + # - "windows-7-32-bit" + # when: ## Override the top-level when. + # comments: + # - "/test x-pack/winlogbeat for windows-7-32" + # labels: + # - "windows-7-32" + # branches: true ## for all the branches + # tags: true ## for all the tags