From d00cd053e1ac6878b9c62db05be72711a7fd90d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Thu, 20 Feb 2020 16:45:04 +0000 Subject: [PATCH] tagging and pushing "latest" --- containers/agent-windows-jenkins/VERSION | Bin 8 -> 8 bytes containers/agent-windows/VERSION | Bin 8 -> 8 bytes containers/build_deploy.ps1 | 10 +++++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/containers/agent-windows-jenkins/VERSION b/containers/agent-windows-jenkins/VERSION index c7250cbdc15f21d024aa64ed135ba73e05b97b58..00b30ed0e8eb36b0939db9a62fc35db449d9be8e 100644 GIT binary patch literal 8 PcmezW&zOOifr|kE5NrZS literal 8 PcmezW&xnDSfr|kE5M}~L diff --git a/containers/agent-windows/VERSION b/containers/agent-windows/VERSION index c7250cbdc15f21d024aa64ed135ba73e05b97b58..00b30ed0e8eb36b0939db9a62fc35db449d9be8e 100644 GIT binary patch literal 8 PcmezW&zOOifr|kE5NrZS literal 8 PcmezW&xnDSfr|kE5M}~L diff --git a/containers/build_deploy.ps1 b/containers/build_deploy.ps1 index 6d34732..8c0608d 100644 --- a/containers/build_deploy.ps1 +++ b/containers/build_deploy.ps1 @@ -37,23 +37,31 @@ $container_version+=1 $agent_windows_version=Get-Content "../agent-windows/$VERSION_FILE" Write-Host "Building ${IMAGE_NAME}:${container_version}..." -Write-Host "Using windows-agent:${agent_windows_version}" +Write-Host "Using windows-agent ${agent_windows_version}" # TODO: get current Windows version number from host via "cmd /c ver" # to solve these issues: https://stackoverflow.com/questions/43123851/unable-to-run-cygwin-in-windows-docker-container/52273489#52273489 $windows_version="10.0.17763.1039" +Write-Host "Using windows version ${windows_version}" Invoke-Call -ScriptBlock { docker build . ` -t ${IMAGE_NAME}:${container_version} ` + -t ${IMAGE_NAME}:latest ` --build-arg windows_version=$windows_version ` --build-arg agent_windows_version=$agent_windows_version } Invoke-Call -ScriptBlock { docker tag ${IMAGE_NAME}:${container_version} ${QUALIFIED_NAME}:${container_version} } +Invoke-Call -ScriptBlock { + docker tag ${IMAGE_NAME}:latest ${QUALIFIED_NAME}:latest +} Invoke-Call -ScriptBlock { docker push ${QUALIFIED_NAME}:$container_version } +Invoke-Call -ScriptBlock { + docker push ${QUALIFIED_NAME}:latest +} $container_version | Out-File $VERSION_FILE Pop-Location \ No newline at end of file