-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint error when dependency with same is defined multiple times (#3068)
* Add lint for dependencies with same name Having multiple dependencies with the same name results in undefined behaviour. This change introduces a lint to ensure that no dependencies share the same name. Signed-off-by: Kim Christensen <[email protected]> --------- Signed-off-by: Kim Christensen <[email protected]>
- Loading branch information
1 parent
5beb467
commit e7fdd77
Showing
6 changed files
with
145 additions
and
4 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
40 changes: 40 additions & 0 deletions
40
tests/integration/testdata/bundles/bundle-with-samenamedeps-lint-error/porter.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,40 @@ | ||
# This bundle is designed to cause the porter lint/build commands to fail | ||
schemaType: Bundle | ||
schemaVersion: 1.0.1 | ||
name: exec-mixin-lint-error | ||
version: 0.1.0 | ||
description: "This bundle is designed to cause the porter lint/build commands to fail, use --no-lint to use it anyway" | ||
registry: "localhost:5000" | ||
|
||
mixins: | ||
- exec | ||
|
||
dependencies: | ||
requires: | ||
- bundle: | ||
reference: ghcr.io/getporter/porter-hello:v0.2.0 | ||
name: samename | ||
- bundle: | ||
reference: ghcr.io/getporter/porter-hello:v0.2.0 | ||
name: samename | ||
|
||
install: | ||
- exec: | ||
description: trigger a lint error | ||
command: echo | ||
arguments: | ||
- install | ||
|
||
upgrade: | ||
- exec: | ||
description: "World 2.0" | ||
command: echo | ||
arguments: | ||
- upgrade | ||
|
||
uninstall: | ||
- exec: | ||
description: "Uninstall Hello World" | ||
command: echo | ||
arguments: | ||
- uninstall |