Closed stevensbkang closed 5 years ago
Sorry to hear that. Well, test coverage is zero 😢 So, thanks for the feedback. Can you share the command line that caused this problem so I can dig into it?
As a workaround, pin the version and install it like this
npm install -g rebase-docker-image@0.4.0
Feel free to ping me when a new version is released, more than happy to test it out!
This is our .ps1 script that we use for our CI process:
Set-Location -Path "$($env:BUILD_SOURCESDIRECTORY)"
Set-Item -Path env:DOCKER_USER -Value (Get-ChildItem env:SECRET_CONTAINER_USERNAME).Value
Set-Item -Path env:DOCKER_PASS -Value (Get-ChildItem env:SECRET_CONTAINER_PASSWORD).Value
npm install -g rebase-docker-image
if ($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) {
$container_image_tag = "pr$($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)-windows-amd64"
$container_image_tag_1709 = "pr$($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)-windows1709-amd64"
$container_image_tag_1803 = "pr$($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)-windows1803-amd64"
$container_image_tag_1809 = "pr$($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)-windows1809-amd64"
$container_image_tag_1903 = "pr$($ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)-windows1903-amd64"
} else {
$container_image_tag = "$($ENV:BUILD_SOURCEBRANCHNAME)-windows-amd64"
$container_image_tag_1709 = "$($ENV:BUILD_SOURCEBRANCHNAME)-windows1709-amd64"
$container_image_tag_1803 = "$($ENV:BUILD_SOURCEBRANCHNAME)-windows1803-amd64"
$container_image_tag_1809 = "$($ENV:BUILD_SOURCEBRANCHNAME)-windows1809-amd64"
$container_image_tag_1903 = "$($ENV:BUILD_SOURCEBRANCHNAME)-windows1903-amd64"
}
docker build -t "portainerci/portainer:$($container_image_tag)" -f "$($env:BUILD_SOURCESDIRECTORY)\build\windows2016\nanoserver\Dockerfile" .
docker push "portainerci/portainer:$($container_image_tag)"
rebase-docker-image "portainerci/portainer:$($container_image_tag)" -t "portainerci/portainer:$($container_image_tag_1709)" -b microsoft/nanoserver:1709
rebase-docker-image "portainerci/portainer:$($container_image_tag)" -t "portainerci/portainer:$($container_image_tag_1803)" -b microsoft/nanoserver:1803
rebase-docker-image "portainerci/portainer:$($container_image_tag)" -t "portainerci/portainer:$($container_image_tag_1809)" -b mcr.microsoft.com/windows/nanoserver:1809
rebase-docker-image "portainerci/portainer:$($container_image_tag)" -t "portainerci/portainer:$($container_image_tag_1903)" -b mcr.microsoft.com/windows/nanoserver:1903
As a workaround, I just forced rebase version to be 0.4.0
:)
Hi @ssbkang
It's fixed in 0.4.2
, but I can recommend to use the -s
parameter and specify the base image that you use in the build\windows2016\nanoserver\Dockerfile
. Without -s
the tool guesses the base image and uses just the os.version
(eg. 10.0.14393.2551) as tag name for the source base image.
BTW: You should be able to use mcr.microsoft.com/windows/nanoserver
everywhere as all tags, even the old 2016 and 1709 are available on MCR.
Fixed with 0d57aa0615b53048613aa01c87013397a2eed6b5
Thanks a lot for the fix @StefanScherer :-)
@StefanScherer we've just finalised our CI and all fixed, including 1903 support - thanks a lot for your help!
Hi @StefanScherer, hope things are well with you :)
As of this morning, our Portainer CI Windows image build started failing, and reliased that new version of rebase was released. Would you be able to take a quick look at it please?
Please let me know if you need more details.
Thanks a lot!