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

[CI] Use MacOS for ARM64 #24419

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 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
5 changes: 4 additions & 1 deletion .ci/scripts/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ fi
echo "UNMET DEP: Installing Go"
mkdir -p "${HOME}/bin"

curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-${OS}-${GVM_ARCH_SUFFIX}"
curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.3.1-rc1/gvm-${OS}-${GVM_ARCH_SUFFIX}"
ls -ltrah "${GVM_CMD} || true"
ls -ltrah bin || true
file "${GVM_CMD}" || true
chmod +x "${GVM_CMD}"

${GVM_CMD} "${GO_VERSION}" |cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE}
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/install-tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ mkdir %WORKSPACE%\bin
IF EXIST "%PROGRAMFILES(X86)%" (
REM Force the gvm installation.
SET GVM_BIN=gvm.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.1-rc1/gvm-windows-amd64.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
exit /b 1
)
) ELSE (
REM Windows 7 workers got a broken gvm installation.
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-386.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.1-rc1/gvm-windows-386.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pipeline {
booleanParam(name: 'runAllStages', defaultValue: false, description: 'Allow to run all stages.')
booleanParam(name: 'armTest', defaultValue: false, description: 'Allow ARM stages.')
booleanParam(name: 'macosTest', defaultValue: false, description: 'Allow macOS stages.')
booleanParam(name: 'macosArmTest', defaultValue: false, description: 'Allow macOS on ARM stages.')
string(name: 'PYTEST_ADDOPTS', defaultValue: '', description: 'Additional options to pass to pytest. Use PYTEST_ADDOPTS="-k pattern" to only run tests matching the specified pattern. For retries you can use `--reruns 3 --reruns-delay 15`')
}
stages {
Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (-Not (Test-Path $gopath_beats)) {
if (-Not (Get-Command "gvm" -ErrorAction SilentlyContinue)) {
echo "Installing gvm to manage go version"
[Net.ServicePointManager]::SecurityProtocol = "tls12"
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe -Outfile C:\\Windows\\System32\\gvm.exe
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v0.3.1-rc1/gvm-windows-amd64.exe -Outfile C:\\Windows\\System32\\gvm.exe
C:\\Windows\\System32\\gvm.exe --format=powershell #{GO_VERSION} | Invoke-Expression
go version

Expand Down Expand Up @@ -125,7 +125,7 @@ def gvmProvision(arch="amd64", os="linux")
return <<SCRIPT
mkdir -p ~/bin
if [ ! -e "~/bin/gvm" ]; then
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-#{os}-#{arch}
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.3.1-rc1/gvm-#{os}-#{arch}
chmod +x ~/bin/gvm
~/bin/gvm #{GO_VERSION}
echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
Expand Down
14 changes: 14 additions & 0 deletions auditbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test auditbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test filebeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test heartbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
13 changes: 13 additions & 0 deletions metricbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ stages:
- "macosTest"
branches: true ## for all the branches
tags: true ## for all the tags
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test metricbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test packetbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/auditbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/auditbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/elastic-agent/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/elastic-agent for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/filebeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/filebeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/functionbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/functionbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/heartbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
# TODO: there are windows test failures already reported
# https://github.com/elastic/beats/issues/23957 and https://github.com/elastic/beats/issues/23958
# waiting for being fixed.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/metricbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/metricbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
platforms: ## override default labels in this specific stage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ stages:
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
macosArm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
- "macosx&&arm64"
when: ## Override the top-level when.
comments:
- "/test x-pack/packetbeat for macosArm"
labels:
- "macOSArm"
parameters:
- "macosArmTest"
branches: true ## for all the branches
tags: true ## for all the tags
stage: extended
windows:
mage: "mage build unitTest"
withModule: true
Expand Down