-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update examples with new action definition
- Loading branch information
1 parent
b98a591
commit b18b547
Showing
14 changed files
with
34 additions
and
75 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,45 +1,23 @@ | ||
# Defines where to look for components | ||
componentPaths: ["services", "libraries"] | ||
|
||
# how many levels below component paths to search | ||
componentPaths: ["components"] | ||
componentSearchDepth: 2 | ||
|
||
# how many threads to run | ||
concurrency: 2 | ||
|
||
# Default configuration for components, overriding a top level property is a replace | ||
defaultConfiguration: | ||
# inputs define paths to files whose content will be summed into $INPUTS_HASH per component | ||
inputs: | ||
- type: "Files" | ||
paths: ["$ROOT/.knega.root.yml"] | ||
# git ls files * | ||
- type: "GitFiles" | ||
paths: ["*"] | ||
|
||
# outputs define artifacts to check, if all artifacts the action can be skipped for that component with knega changed <action> | ||
outputs: | ||
# Docker image example | ||
- type: "OCI" | ||
repository: "some-registry.com/some-category/$COMPONENT_NAME" | ||
repository: "localhost:5000/$COMPONENT_NAME" | ||
tag: "$INPUTS_HASH" | ||
# Helm chart example | ||
- type: "OCI" | ||
repository: "some-registry.com/charts/some-category/$COMPONENT_NAME" | ||
# chart version needs to comply with semver | ||
tag: "1.0.0-$INPUTS_HASH" | ||
|
||
# actions define collections of commands to be executed with knega changed/all <action> | ||
actions: | ||
# name defines command name, ie knega changed build in this case | ||
- name: "build" | ||
# commands are executed with component directory as working directory, root scripts can be run using $ROOT | ||
# $ROOT, $COMPONENT_NAME and $INPUTS_HASH available as environment variables during execution | ||
commands: [ | ||
"$ROOT/scripts/build.sh | ||
] | ||
# example knega all release to execute these commands for all components | ||
- name: "release" | ||
commands: [ | ||
"$ROOT/scripts/release.sh | ||
] | ||
build: | ||
commands: | ||
# - 'echo "Component name: $COMPONENT_NAME"' | ||
# - 'echo "Root path: $ROOT"' | ||
# - 'echo "Inputs hash: $INPUTS_HASH"' | ||
- $ROOT/scripts/build.sh |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
name: "test-no-build-1" | ||
|
||
actions: | ||
build: | ||
commands: [] | ||
test: | ||
commands: | ||
- 'echo "test action executed in $COMPONENT_NAME"' |
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,10 @@ | ||
name: "test-no-output-1" | ||
|
||
outputs: [] | ||
|
||
actions: | ||
build: | ||
commands: [] | ||
test: | ||
commands: | ||
- 'echo "test action executed in $COMPONENT_NAME"' |
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,6 @@ | ||
name: "with-test-1" | ||
|
||
actions: | ||
test: | ||
commands: | ||
- 'echo "test action executed in $COMPONENT_NAME"' |
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 @@ | ||
FROM alpine |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.