Skip to content

Commit

Permalink
Build windows docker image for server 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpiprava committed Sep 9, 2019
1 parent 9e5bef5 commit 7b68341
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
25 changes: 21 additions & 4 deletions .gocd/build.gocd.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GoCD.script {
}
}
}
job('windows') {
job('windows-2016') {
elasticProfileId = 'azure-windows-server-container'
timeout = 90
tasks {
Expand All @@ -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)']
}
}
}

}
}
}
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b68341

Please sign in to comment.