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

Cherry-pick to 7.10: [CI] support windows-7-32 bits (#19797) #22336

Merged
merged 4 commits into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 17 additions & 1 deletion .ci/scripts/install-tools.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
set GOPATH=%WORKSPACE%
set MAGEFILE_CACHE=%WORKSPACE%\.magefile
set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\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 (
Expand All @@ -25,3 +31,13 @@ if not exist C:\Python38\python.exe (
python --version
where python

where /q gcc
IF ERRORLEVEL 1 (
REM Install mingw 5.3.0
choco install mingw -y -r --no-progress --version 5.3.0
IF NOT ERRORLEVEL 0 (
exit /b 1
)
)
gcc --version
where gcc
10 changes: 6 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions auditbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 23 additions & 1 deletion filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,26 @@ stages:
labels:
- "windows-10"
branches: true ## for all the branches
tags: true ## for all the tags
tags: true ## for all the tags
windows-8:
v1v marked this conversation as resolved.
Show resolved Hide resolved
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test filebeat for windows-8"
labels:
- "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 filebeat for windows-7-32"
labels:
- "windows-7-32"
branches: true ## for all the branches
tags: true ## for all the tags
22 changes: 22 additions & 0 deletions heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tag
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test heartbeat for windows-8"
labels:
- "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
1 change: 1 addition & 0 deletions metricbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test packetbeat for windows-8"
labels:
- "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
24 changes: 23 additions & 1 deletion winlogbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -53,3 +53,25 @@ stages:
# - "windows-10"
# branches: true ## for all the branches
# tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test winlogbeat for windows-8"
labels:
- "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
22 changes: 22 additions & 0 deletions x-pack/auditbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/auditbeat for windows-8"
labels:
- "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
22 changes: 22 additions & 0 deletions x-pack/elastic-agent/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/elastic-agent for windows-8"
labels:
- "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
22 changes: 22 additions & 0 deletions x-pack/filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/filebeat for windows-8"
labels:
- "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
22 changes: 22 additions & 0 deletions x-pack/functionbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/functionbeat for windows-8"
labels:
- "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
1 change: 1 addition & 0 deletions x-pack/metricbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions x-pack/packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/packetbeat for windows-8"
labels:
- "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
22 changes: 22 additions & 0 deletions x-pack/winlogbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,25 @@ stages:
- "windows-2008"
branches: true ## for all the branches
tags: true ## for all the tags
windows-8:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
- "windows-8"
when: ## Override the top-level when.
comments:
- "/test x-pack/winlogbeat for windows-8"
labels:
- "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