Compare commits

..

10 Commits

Author SHA1 Message Date
TP Honey 3593c4165c Merge pull request #353 from drone-plugins/v20.10.9.1
release prep for 20.10.9.1
2022-01-13 11:30:36 +00:00
Eoin McAfee 3922dcfea5 release prep for 20.10.9.1 2022-01-13 11:08:47 +00:00
Shubham Agrawal 47dc8555ad Fix ECR & GCR docker publish on windows (#352) 2022-01-12 22:32:57 +05:30
TP Honey 0ffe085ddc Merge pull request #351 from drone-plugins/win_fix
Fix windows docker builds
2022-01-10 10:02:17 +00:00
Shubham Agrawal 80d227e138 Fix windows docker builds 2022-01-08 00:31:45 +05:30
TP Honey 64b6aa187d Merge pull request #350 from drone-plugins/fix_win_pipeline
Fix powershell script to publish windows images
2022-01-07 10:27:13 +00:00
Shubham Agrawal 74ec8ac761 Fix powershell script to publish windows images 2022-01-07 11:41:11 +05:30
TP Honey 368583a464 Merge pull request #348 from drone-plugins/serialize_win_1809
Serialize windows 1809 pipelines
2022-01-06 14:03:37 +00:00
Shubham Agrawal 28175f4003 Serialize windows 1809 pipelines 2022-01-06 13:28:00 +05:30
Shubham Agrawal 85e715fd5d Support for windows images for tags (#346) 2022-01-05 23:28:27 +05:30
22 changed files with 521 additions and 167 deletions
+350 -140
View File
@@ -40,7 +40,7 @@ trigger:
---
kind: pipeline
type: ssh
name: windows-1809
name: windows-1809-docker
platform:
os: windows
@@ -53,90 +53,197 @@ server:
from_secret: windows_username
steps:
- name: build-docker
commands:
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1809-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64"
}
docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:$tag .
docker push plugins/docker:$tag
- name: build_latest
environment:
CGO_ENABLED: "0"
VERSION: 1809
REGISTRY: docker
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-gcr
commands:
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1809-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64"
}
docker build -f docker/gcr/Dockerfile.windows.1809 -t plugins/gcr:$tag .
docker push plugins/gcr:$tag
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
CGO_ENABLED: "0"
VERSION: 1809
REGISTRY: docker
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-ecr
commands:
- go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1809-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64"
}
docker build -f docker/ecr/Dockerfile.windows.1809 -t plugins/ecr:$tag .
docker push plugins/ecr:$tag
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-acr
commands:
- go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1809-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64"
}
docker build -f docker/acr/Dockerfile.windows.1809 -t plugins/acr:$tag .
docker push plugins/acr:$tag
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
trigger:
event:
- push
- tag
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
- testing
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1909
name: windows-1809-ecr
platform:
os: windows
server:
host: windows.1809.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1809
REGISTRY: ecr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1809
REGISTRY: ecr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
- windows-1809-docker
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1809-gcr
platform:
os: windows
server:
host: windows.1809.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1809
REGISTRY: gcr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1809
REGISTRY: gcr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
- windows-1809-ecr
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1809-acr
platform:
os: windows
server:
host: windows.1809.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1809
REGISTRY: acr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1809
REGISTRY: acr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
- windows-1809-gcr
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1909-docker
platform:
os: windows
@@ -149,86 +256,190 @@ server:
from_secret: windows_username
steps:
- name: build-docker
commands:
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1909-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1909-amd64"
}
docker build -f docker/docker/Dockerfile.windows.1909 -t plugins/docker:$tag .
docker push plugins/docker:$tag
- name: build_latest
environment:
CGO_ENABLED: "0"
VERSION: 1909
REGISTRY: docker
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-gcr
commands:
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1909-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1909-amd64"
}
docker build -f docker/gcr/Dockerfile.windows.1909 -t plugins/gcr:$tag .
docker push plugins/gcr:$tag
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
CGO_ENABLED: "0"
VERSION: 1909
REGISTRY: docker
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-ecr
commands:
- go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1909-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1909-amd64"
}
docker build -f docker/ecr/Dockerfile.windows.1909 -t plugins/ecr:$tag .
docker push plugins/ecr:$tag
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
- name: build-acr
commands:
- go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
- docker login -u $env:USERNAME -p $env:PASSWORD
- |
$tag="windows-1909-amd64"
if (Test-Path env:DRONE_SEMVER_SHORT) {
$tag="$env:DRONE_SEMVER_SHORT-windows-1909-amd64"
}
docker build -f docker/acr/Dockerfile.windows.1909 -t plugins/acr:$tag .
docker push plugins/acr:$tag
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
trigger:
event:
- push
- tag
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1909-ecr
platform:
os: windows
server:
host: windows.1909.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1909
REGISTRY: ecr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1909
REGISTRY: ecr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1909-gcr
platform:
os: windows
server:
host: windows.1909.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1909
REGISTRY: gcr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1909
REGISTRY: gcr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
type: ssh
name: windows-1909-acr
platform:
os: windows
server:
host: windows.1909.amd64.plugins.drone.ci
password:
from_secret: windows_password
user:
from_secret: windows_username
steps:
- name: build_latest
environment:
VERSION: 1909
REGISTRY: acr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/latest.ps1
when:
event: [ push ]
- name: build_tag
environment:
VERSION: 1909
REGISTRY: acr
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
commands:
- powershell.exe scripts/windows/tag.ps1
when:
event: [ tag ]
depends_on:
- testing
trigger:
ref:
- refs/heads/master
- refs/tags/*
---
kind: pipeline
name: linux-amd64-docker
@@ -444,8 +655,8 @@ trigger:
- "refs/tags/**"
depends_on:
- windows-1809
- windows-1909
- windows-1809-docker
- windows-1909-docker
- linux-amd64-docker
- linux-arm64-docker
- linux-arm-docker
@@ -650,8 +861,8 @@ trigger:
- "refs/tags/**"
depends_on:
- windows-1809
- windows-1909
- windows-1809-gcr
- windows-1909-gcr
- linux-amd64-gcr
- linux-arm64-gcr
- linux-arm-gcr
@@ -856,8 +1067,8 @@ trigger:
- "refs/tags/**"
depends_on:
- windows-1809
- windows-1909
- windows-1809-ecr
- windows-1909-ecr
- linux-amd64-ecr
- linux-arm64-ecr
- linux-arm-ecr
@@ -1265,11 +1476,10 @@ trigger:
- "refs/tags/**"
depends_on:
- windows-1809
- windows-1909
- windows-1809-acr
- windows-1909-acr
- linux-amd64-acr
- linux-arm64-acr
- linux-arm-acr
...
+17 -1
View File
@@ -1,11 +1,27 @@
# Changelog
## [v20.10.9](https://github.com/drone-plugins/drone-docker/tree/v20.10.9) (2021-11-02)
## [v20.10.9.1](https://github.com/drone-plugins/drone-docker/tree/v20.10.9.1) (2022-01-13)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.10.9...v20.10.9.1)
**Implemented enhancements:**
- Serialize windows 1809 pipelines [\#348](https://github.com/drone-plugins/drone-docker/pull/348) ([shubham149](https://github.com/shubham149))
- Support for windows images for tags [\#346](https://github.com/drone-plugins/drone-docker/pull/346) ([shubham149](https://github.com/shubham149))
**Fixed bugs:**
- Fix ECR & GCR docker publish on windows [\#352](https://github.com/drone-plugins/drone-docker/pull/352) ([shubham149](https://github.com/shubham149))
- Fix windows docker builds [\#351](https://github.com/drone-plugins/drone-docker/pull/351) ([shubham149](https://github.com/shubham149))
- Fix powershell script to publish windows images [\#350](https://github.com/drone-plugins/drone-docker/pull/350) ([shubham149](https://github.com/shubham149))
## [v20.10.9](https://github.com/drone-plugins/drone-docker/tree/v20.10.9) (2021-11-03)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.9...v20.10.9)
**Merged pull requests:**
- bump to version 20.10.9: [\#342](https://github.com/drone-plugins/drone-docker/pull/342) ([eoinmcafee00](https://github.com/eoinmcafee00))
- Upgrade Docker dind to 20.10.9 for 64bit platforms [\#334](https://github.com/drone-plugins/drone-docker/pull/334) ([gzm0](https://github.com/gzm0))
## [v19.03.9](https://github.com/drone-plugins/drone-docker/tree/v19.03.9) (2021-10-13)
+5 -2
View File
@@ -7,6 +7,9 @@ import (
"strings"
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
docker "github.com/drone-plugins/drone-docker"
)
func main() {
@@ -40,12 +43,12 @@ func main() {
os.Setenv("DOCKER_PASSWORD", password)
// invoke the base docker plugin binary
cmd := exec.Command("drone-docker")
cmd := exec.Command(docker.GetDroneDockerExecCmd())
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
if err != nil {
os.Exit(1)
logrus.Fatal(err)
}
}
+29 -20
View File
@@ -2,6 +2,7 @@ package main
import (
"os"
"runtime"
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
@@ -267,26 +268,26 @@ func run(c *cli.Context) error {
Config: c.String("docker.config"),
},
Build: docker.Build{
Remote: c.String("remote.url"),
Name: c.String("commit.sha"),
Dockerfile: c.String("dockerfile"),
Context: c.String("context"),
Tags: c.StringSlice("tags"),
Args: c.StringSlice("args"),
ArgsEnv: c.StringSlice("args-from-env"),
Target: c.String("target"),
Squash: c.Bool("squash"),
Pull: c.BoolT("pull-image"),
CacheFrom: c.StringSlice("cache-from"),
Compress: c.Bool("compress"),
Repo: c.String("repo"),
Labels: c.StringSlice("custom-labels"),
LabelSchema: c.StringSlice("label-schema"),
AutoLabel: c.BoolT("auto-label"),
Link: c.String("link"),
NoCache: c.Bool("no-cache"),
AddHost: c.StringSlice("add-host"),
Quiet: c.Bool("quiet"),
Remote: c.String("remote.url"),
Name: c.String("commit.sha"),
Dockerfile: c.String("dockerfile"),
Context: c.String("context"),
Tags: c.StringSlice("tags"),
Args: c.StringSlice("args"),
ArgsEnv: c.StringSlice("args-from-env"),
Target: c.String("target"),
Squash: c.Bool("squash"),
Pull: c.BoolT("pull-image"),
CacheFrom: c.StringSlice("cache-from"),
Compress: c.Bool("compress"),
Repo: c.String("repo"),
Labels: c.StringSlice("custom-labels"),
LabelSchema: c.StringSlice("label-schema"),
AutoLabel: c.BoolT("auto-label"),
Link: c.String("link"),
NoCache: c.Bool("no-cache"),
AddHost: c.StringSlice("add-host"),
Quiet: c.Bool("quiet"),
},
Daemon: docker.Daemon{
Registry: c.String("docker.registry"),
@@ -327,3 +328,11 @@ func run(c *cli.Context) error {
return plugin.Exec()
}
func GetExecCmd() string {
if runtime.GOOS == "windows" {
return "C:/bin/drone-docker.exe"
}
return "drone-docker"
}
+5 -2
View File
@@ -11,12 +11,15 @@ import (
"strings"
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ecr"
docker "github.com/drone-plugins/drone-docker"
)
const defaultRegion = "us-east-1"
@@ -110,11 +113,11 @@ func main() {
os.Setenv("DOCKER_PASSWORD", password)
// invoke the base docker plugin binary
cmd := exec.Command("drone-docker")
cmd := exec.Command(docker.GetDroneDockerExecCmd())
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err = cmd.Run(); err != nil {
os.Exit(1)
logrus.Fatal(err)
}
}
+5 -2
View File
@@ -8,6 +8,9 @@ import (
"strings"
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
docker "github.com/drone-plugins/drone-docker"
)
// gcr default username
@@ -54,12 +57,12 @@ func main() {
os.Setenv("DOCKER_PASSWORD", password)
// invoke the base docker plugin binary
cmd := exec.Command("drone-docker")
cmd := exec.Command(docker.GetDroneDockerExecCmd())
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil {
os.Exit(1)
logrus.Fatal(err)
}
}
+9
View File
@@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"time"
)
@@ -416,3 +417,11 @@ func commandRmi(tag string) *exec.Cmd {
func trace(cmd *exec.Cmd) {
fmt.Fprintf(os.Stdout, "+ %s\n", strings.Join(cmd.Args, " "))
}
func GetDroneDockerExecCmd() string {
if runtime.GOOS == "windows" {
return "C:/bin/drone-docker.exe"
}
return "drone-docker"
}
+35
View File
@@ -0,0 +1,35 @@
# this script is used by the continuous integration server to
# build and publish the docker image for a commit to master.
$ErrorActionPreference = "Stop"
$env:GOOS="windows"
$env:GOARCH="amd64"
$env:CGO_ENABLED="0"
if (-not (Test-Path env:VERSION)) {
$env:VERSION="1809"
}
if (-not (Test-Path env:REGISTRY)) {
$env:REGISTRY="docker"
}
echo $env:GOOS
echo $env:GOARCH
echo $env:VERSION
echo $env:REGISTRY
# build the binary
Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}";
go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
# build and publish the docker image
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
Write-Host "+ docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64 .";
docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64 .
Write-Host "+ docker push plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64"
docker push plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64
# remove images from local cache
Write-Host "+ docker rmi plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64"
docker rmi plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64
+66
View File
@@ -0,0 +1,66 @@
# this script is used by the continuous integration server to
# build and publish the docker image for a tagged revsision.
$ErrorActionPreference = "Stop"
$env:GOOS="windows"
$env:GOARCH="amd64"
$env:CGO_ENABLED="0"
if (-not (Test-Path env:VERSION)) {
$env:VERSION="1809"
}
if (-not (Test-Path env:DRONE_SEMVER_SHORT)) {
echo "missing semver"
exit 1
}
if (-not (Test-Path env:REGISTRY)) {
$env:REGISTRY="docker"
}
# define the image tags
$env:IMAGE_PATCH="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_SHORT}-windows-${env:VERSION}-amd64"
$env:IMAGE_MAJOR="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_MAJOR}-windows-${env:VERSION}-amd64"
$env:IMAGE_MINOR="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_MAJOR}.${env:DRONE_SEMVER_MINOR}-windows-${env:VERSION}-amd64"
echo "build environment:"
echo $env:GOOS
echo $env:GOARCH
echo $env:VERSION
# build the binary
Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}"
go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
# authenticate with the docker registry
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
echo "building images:"
echo ${env:IMAGE_PATCH}
echo ${env:IMAGE_MINOR}
echo ${env:IMAGE_MAJOR}
# build and tag the docker images
Write-Host "+ docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t ${env:IMAGE_PATCH} ."
docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t ${env:IMAGE_PATCH} .
Write-Host "+ docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MAJOR}"
docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MAJOR}
Write-Host "+ docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MINOR}"
docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MINOR}
# publish the docker images
Write-Host "+ docker push ${env:IMAGE_MAJOR}"
docker push ${env:IMAGE_MAJOR}
Write-Host "+ docker push ${env:IMAGE_MINOR}"
docker push ${env:IMAGE_MINOR}
Write-Host "+ docker push ${env:IMAGE_PATCH}"
docker push ${env:IMAGE_PATCH}
# remove images after from local cache
Write-Host "+ docker rmi ${env:IMAGE_MAJOR}"
docker rmi ${env:IMAGE_MAJOR}
Write-Host "+ docker rmi ${env:IMAGE_MINOR}"
docker rmi ${env:IMAGE_MINOR}
Write-Host "+ docker rmi ${env:IMAGE_PATCH}"
docker rmi ${env:IMAGE_PATCH}