Skip to content

Commit

Permalink
[CI][BUILD] fail if choco failed (elastic#20343)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Aug 6, 2020
1 parent 44fc8e3 commit adddc89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .ci/scripts/install-tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;C:\tools\mingw64\bin;%PAT

where /q curl
IF ERRORLEVEL 1 (
choco install curl -y --no-progress --skipdownloadcache
choco install curl -y --no-progress --skipdownloadcache
)
mkdir %WORKSPACE%\bin

Expand All @@ -28,16 +28,22 @@ go get github.com/magefile/mage
mage -version
where mage

if not exist C:\Python38\python.exe (
REM Install python 3.8.
choco install python -y -r --no-progress --version 3.8.2 || echo ERROR && exit /b
IF NOT EXIST C:\Python38\python.exe (
REM Install python 3.8
choco install python -y -r --no-progress --version 3.8.5
IF NOT ERRORLEVEL 0 (
exit /b 1
)
)
python --version
where python

if not exist C:\tools\mingw64\bin\gcc.exe (
IF NOT EXIST C:\tools\mingw64\bin\gcc.exe (
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
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,9 @@ def installTools() {
retryWithSleep(retries: i, seconds: 5, backoff: true){ sh(label: "Install Terraform ${TERRAFORM_VERSION}", script: ".ci/scripts/install-terraform.sh") }
retryWithSleep(retries: i, seconds: 5, backoff: true){ sh(label: "Install Mage", script: "make mage") }
} else {
// Install python3 with the specific step, even though install-tools.bat will verify if it's there anyway.
// TODO: as soon as python3 is installed in the CI Workers we will be able to remove the line below.
installTools([ [tool: 'python3', version: '3.8', exclude: 'rc'] ])
retryWithSleep(retries: i, seconds: 5, backoff: true){ bat(label: "Install Go/Mage/Python ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") }
}
}
Expand Down

0 comments on commit adddc89

Please sign in to comment.