1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

feat(ci): add missing powershell scripts & fix related grunt code (#4345)

* feat(ci): add missing powershell scripts & fix related grunt code

* feat(ci): download binaries direct to dist directory

* feat(ci): correctly pass in binary versions

* feat(ci): fix powershell errors

* feat(ci): fix cmdlet syntax

* feat(ci): fix typo

* feat(ci): fix additonal typo
This commit is contained in:
itsconquest 2020-09-24 19:19:41 +12:00 committed by GitHub
parent d4c4c4e895
commit e479e41aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 8 deletions

View file

@ -194,8 +194,9 @@ function shell_download_docker_binary(p, a) {
return ['if [ -f dist/docker ]; then', 'echo "docker binary exists";', 'else', 'build/download_docker_binary.sh ' + ip + ' ' + ia + ' ' + binaryVersion + ';', 'fi'].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path dist/docker.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Docker binary exists"',
'powershell -Command "& {if (Test-Path -Path "dist/docker.exe") {',
'Write-Host "Skipping download, Docker binary exists"',
'return',
'} else {',
'& ".\\build\\download_docker_binary.ps1" -docker_version ' + binaryVersion + '',
'}}"',
@ -210,10 +211,11 @@ function shell_download_kompose_binary(p, a) {
return ['if [ -f dist/kompose ]; then', 'echo "kompose binary exists";', 'else', 'build/download_kompose_binary.sh ' + p + ' ' + a + ' ' + binaryVersion + ';', 'fi'].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path dist/kompose.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Docker binary exists"',
'powershell -Command "& {if (Test-Path -Path "dist/kompose.exe") {',
'Write-Host "Skipping download, Kompose binary exists"',
'return',
'} else {',
'& ".\\build\\download_kompose_binary.ps1" -docker_version ' + binaryVersion + '',
'& ".\\build\\download_kompose_binary.ps1" -kompose_version ' + binaryVersion + '',
'}}"',
].join(' ');
}
@ -226,10 +228,11 @@ function shell_download_kubectl_binary(p, a) {
return ['if [ -f dist/kubectl ]; then', 'echo "kubectl binary exists";', 'else', 'build/download_kubectl_binary.sh ' + p + ' ' + a + ' ' + binaryVersion + ';', 'fi'].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path dist/kubectl.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Docker binary exists"',
'powershell -Command "& {if (Test-Path -Path "dist/kubectl.exe") {',
'Write-Host "Skipping download, Kubectl binary exists"',
'return',
'} else {',
'& ".\\build\\download_kubectl_binary.ps1" -docker_version ' + binaryVersion + '',
'& ".\\build\\download_kubectl_binary.ps1" -kubectl_version ' + binaryVersion + '',
'}}"',
].join(' ');
}