fix create docker manifest script to work with more complex tags and with repeated use (#6852)

fix create docker manifest script to work with more complex tags and with repeated use
- add characters to validation pattern
- purge manifest after pushing as there is no other way to delete the manifest.
This commit is contained in:
Travis Plunk
2018-05-10 14:36:47 -07:00
committed by GitHub
parent 0f036d9939
commit 4af9f4edac
+4 -4
View File
@@ -8,17 +8,17 @@ param(
$ContainerRegistry,
[ValidateNotNullOrEmpty()]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
[string]
$ManifestTag = 'latest',
[ValidateNotNullOrEmpty()]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
[string]
$Image = 'powershell',
[ValidateNotNullOrEmpty()]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
[string[]]
$TagList = ('ubuntu-16.04', 'windowsservercore')
)
@@ -36,4 +36,4 @@ docker manifest create $ContainerRegistry/${Image}:$ManifestTag $manifestList
docker manifest inspect $ContainerRegistry/${Image}:$ManifestTag
# push the manifest
docker manifest push $ContainerRegistry/${Image}:$ManifestTag
docker manifest push --purge $ContainerRegistry/${Image}:$ManifestTag