-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support custom templating in image section during lint
Images are validated for valid digests during linting. If the image digest is templating and no default value exist in the bundle definition the linting will fail, because the digest will be invalid. One gotcha here is that if only part of the digest is templated linting will still fail. Signed-off-by: Kim Christensen <[email protected]>
- Loading branch information
1 parent
3829380
commit 87c12d9
Showing
8 changed files
with
148 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
schemaVersion: 1.0.0 | ||
name: porter-hello | ||
version: 0.1.0 | ||
description: "A bundle with a custom action" | ||
registry: "localhost:5000" | ||
|
||
custom: | ||
digest: "sha256:6b5a28ccbb76f12ce771a23757880c6083234255c5ba191fca1c5db1f71c1687" | ||
|
||
images: | ||
something: | ||
description: "an image" | ||
imageType: "docker" | ||
repository: "getporter/boo" | ||
digest: "${ bundle.custom.digest }" | ||
|
||
mixins: | ||
- exec | ||
|
||
install: | ||
- exec: | ||
description: "Install Hello World" | ||
command: echo | ||
arguments: | ||
- "Hello world" | ||
|
||
upgrade: | ||
- exec: | ||
description: "World 2.0" | ||
command: bash | ||
flags: | ||
c: echo World 2.0 | ||
|
||
uninstall: | ||
- exec: | ||
description: "Uninstall Hello World" | ||
command: bash | ||
flags: | ||
c: echo Goodbye World |
36 changes: 36 additions & 0 deletions
36
pkg/porter/testdata/porter-image-custom-data-no-default.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
schemaVersion: 1.0.0 | ||
name: porter-hello | ||
version: 0.1.0 | ||
description: "A bundle with a custom action" | ||
registry: "localhost:5000" | ||
|
||
images: | ||
something: | ||
description: "an image" | ||
imageType: "docker" | ||
repository: "getporter/boo" | ||
digest: "${ bundle.custom.digest }" | ||
|
||
mixins: | ||
- exec | ||
|
||
install: | ||
- exec: | ||
description: "Install Hello World" | ||
command: echo | ||
arguments: | ||
- "Hello world" | ||
|
||
upgrade: | ||
- exec: | ||
description: "World 2.0" | ||
command: bash | ||
flags: | ||
c: echo World 2.0 | ||
|
||
uninstall: | ||
- exec: | ||
description: "Uninstall Hello World" | ||
command: bash | ||
flags: | ||
c: echo Goodbye World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters