diff --git a/.gocd/build.gocd.groovy b/.gocd/build.gocd.groovy index 5632406..4488b0a 100644 --- a/.gocd/build.gocd.groovy +++ b/.gocd/build.gocd.groovy @@ -83,7 +83,7 @@ GoCD.script { } } } - job('windows') { + job('windows-2016') { elasticProfileId = 'azure-windows-server-container' timeout = 90 tasks { @@ -94,14 +94,31 @@ GoCD.script { commandLine = ['powershell', 'git fetch --all'] } exec { - commandLine = ['powershell', 'docker build -f Dockerfile.windowsservercore -t gocddev/gocd-dev-build:windows-$(git tag --points-at HEAD --sort=version:refname | tail -n1) .'] + commandLine = ['powershell', 'docker build -f Dockerfile.windowsservercore2016 -t gocddev/gocd-dev-build:windows2016-$(git tag --points-at HEAD --sort=version:refname | tail -n1) .'] } exec { - commandLine = ['powershell', 'docker push gocddev/gocd-dev-build:windows-$(git tag --points-at HEAD --sort=version:refname | tail -n1)'] + commandLine = ['powershell', 'docker push gocddev/gocd-dev-build:windows2016-$(git tag --points-at HEAD --sort=version:refname | tail -n1)'] + } + } + } + job('windows-2019') { + elasticProfileId = 'azure-windows-server-container-2019' + timeout = 90 + tasks { + exec { + commandLine = ['powershell', 'docker login --username "%DOCKERHUB_USERNAME%" --password "%DOCKERHUB_PASSWORD%"'] + } + exec { + commandLine = ['powershell', 'git fetch --all'] + } + exec { + commandLine = ['powershell', 'docker build -f Dockerfile.windowsservercore2019 -t gocddev/gocd-dev-build:windows2019-$(git tag --points-at HEAD --sort=version:refname | tail -n1) .'] + } + exec { + commandLine = ['powershell', 'docker push gocddev/gocd-dev-build:windows2019-$(git tag --points-at HEAD --sort=version:refname | tail -n1)'] } } } - } } } diff --git a/Dockerfile.windowsservercore b/Dockerfile.windowsservercore2016 similarity index 100% rename from Dockerfile.windowsservercore rename to Dockerfile.windowsservercore2016 diff --git a/README.md b/README.md index 1307a18..f801156 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ To build images a new image, create a new tag and push to this repository. - ```docker build . -t gocddev/gocd-dev-build:centos6-v2.0.29 -f Dockerfile.centos6``` - ```docker build . -t gocddev/gocd-dev-build:centos7-v2.0.29 -f Dockerfile.centos7``` -- ```docker build . -t gocddev/gocd-dev-build:windows-v2.0.29 -f Dockerfile.windowsservercore``` +- ```docker build . -t gocddev/gocd-dev-build:windows2016-v2.0.29 -f Dockerfile.windowsservercore2016``` +- ```docker build . -t gocddev/gocd-dev-build:windows2019-v2.0.29 -f Dockerfile.windowsservercore2019``` - ```docker build . -t gocddev/gocd-dev-build-dind:19.1.0 -f Dockerfile.dind``` # License