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 all commits
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
16 changes: 13 additions & 3 deletions .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;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 (
Expand Down Expand Up @@ -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
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
13 changes: 12 additions & 1 deletion filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,15 @@ stages:
labels:
- "windows-8"
branches: true ## for all the branches
tags: true ## for all the tags
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
11 changes: 11 additions & 0 deletions heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
11 changes: 11 additions & 0 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 12 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 @@ -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
11 changes: 11 additions & 0 deletions x-pack/auditbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions x-pack/elastic-agent/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions x-pack/filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions x-pack/functionbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
11 changes: 11 additions & 0 deletions x-pack/packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions x-pack/winlogbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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