Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build.ps1 fails when there is only one image to build #603

Open
3 tasks done
jflheureux opened this issue May 3, 2021 · 1 comment
Open
3 tasks done

Build.ps1 fails when there is only one image to build #603

jflheureux opened this issue May 3, 2021 · 1 comment

Comments

@jflheureux
Copy link
Collaborator

jflheureux commented May 3, 2021

ISSUE

After filtering the available images to build, if there is only one image left, the script fails to convert it as an ArrayList.

The line that fails is: https://github.com/Sitecore/docker-images/blob/master/Build.ps1#L278

See "Steps to reproduce the behavior" for a sample command that makes the script fail.

  • I have tried with the latest version of Docker for Windows (Stable or Edge) or Docker Enterprise.
  • Windows version is at least 1809 / ltsc2019.
  • Windows has the latest updates installed.

Expected behavior

The script do not fail and build the one image.

Actual behavior

The script fails with an exception:

C:\projects\Sitecore.Docker-Images\Build.ps1 : Cannot convert value "@{WindowsAssetImage=;Path=C:\projects\Sitecore.Docker-Images\build\windows\dependencies\sitecore-certificates; BuildOptions=System.Object[];Topology=; Sources=System.Object[]; Base=System.Object[]; Experimental=False; Deprecated=False;Tag=sitecore-certificates:latest-nanoserver-1809;DockerFilePath=C:\projects\Sitecore.Docker-Images\build\windows\dependencies\sitecore-certificates\Dockerfile; Priority=;Include=False}" to type "System.Collections.ArrayList". Error: "Cannot convert the "@{WindowsAssetImage=;Path=C:\projects\Sitecore.Docker-Images\build\windows\dependencies\sitecore-certificates; BuildOptions=System.Object[];Topology=; Sources=System.Object[]; Base=System.Object[]; Experimental=False; Deprecated=False;Tag=sitecore-certificates:latest-nanoserver-1809;DockerFilePath=C:\projects\Sitecore.Docker-Images\build\windows\dependencies\sitecore-certificates\Dockerfile; Priority=;Include=False}" value of type "System.Management.Automation.PSCustomObject" to type "System.Collections.ArrayList"."
At line:1 char:7
+ .\Build.ps1 -SitecoreVersion "10.1.0" -IncludeExperimental
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (:) [Build.ps1], ArgumentTransformationMetadataException
    + FullyQualifiedErrorId : RuntimeException,Build.ps1

Steps to reproduce the behavior

  1. Run .\Build.ps1 -SitecoreVersion "10.1.0" -IncludeExperimental
@Antonytm
Copy link

It works with

.\Build.ps1 -SitecoreVersion ["10.1.0"]

But, yes, it will be nice to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants