-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update README for the updated task-generator
- reflect the move of the trusted-artifacts task generator to the task-generator directory in the README - add a README into every task-generator subdirectory
- Loading branch information
Showing
3 changed files
with
42 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,4 @@ | ||
# Task generator | ||
Task generator is a tool used for generating various versions of tasks. | ||
|
||
## Buildah remote task generation | ||
The Buildah task builds source code into a container image and pushes the image into container registry using the Buildah tool. | ||
While the standard Buildah task runs directly on the cluster, the remote task is run on a remote host. | ||
This must be used in combination with the Multi Arch Controller, which provides the credentials and host name used to perform the build. | ||
|
||
The remote versions of the Buildah task are programmatically generated by this script from the buildah task to keep them in sync. The generated remote tasks should not be manually modified. | ||
|
||
### Arguments | ||
- `buildah-task` - The location of the buildah task YAML file (required) | ||
- `remote-task` - The location of the buildah-remote task YAML file to overwrite (required) | ||
- `task-version` - The version of the task to overwrite, e.g. `0.2` (required) | ||
|
||
Example usage: | ||
``` | ||
go run remote/main.go \ | ||
--buildah-task ../task/buildah/0.2/buildah.yaml \ | ||
--remote-task ../task/buildah-remote/0.2/buildah-remote.yaml \ | ||
--task-version 0.2 | ||
``` | ||
The Task generator is a collection of tools used for generating various versions of tasks. | ||
|
||
Each tool has its own subdirectory with a README. |
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,21 @@ | ||
# Buildah remote task generation | ||
The Buildah task builds source code into a container image and pushes the image into container registry using the Buildah tool. | ||
While the standard Buildah task runs directly on the cluster, the remote task is run on a remote host. | ||
This must be used in combination with the Multi Arch Controller, which provides the credentials and host name used to perform the build. | ||
|
||
The remote versions of the Buildah task are programmatically generated by this script from the buildah task to keep them in sync. The generated remote tasks should not be manually modified. | ||
|
||
This tool is used by the `hack/generate-buildah-remote.sh` script. | ||
|
||
## Arguments | ||
- `buildah-task` - The location of the buildah task YAML file (required) | ||
- `remote-task` - The location of the buildah-remote task YAML file to overwrite (required) | ||
- `task-version` - The version of the task to overwrite, e.g. `0.2` (required) | ||
|
||
Example usage: | ||
``` | ||
go run remote/main.go \ | ||
--buildah-task ../task/buildah/0.2/buildah.yaml \ | ||
--remote-task ../task/buildah-remote/0.2/buildah-remote.yaml \ | ||
--task-version 0.2 | ||
``` |
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,17 +1,30 @@ | ||
# Trusted Artifacts variants generator | ||
|
||
## Description and usage | ||
## Description | ||
|
||
The code in here will process a set of directions in `recipe.yaml` file and | ||
This tool is used for the generation of trusted artifacts variants of a task. | ||
It will process a set of directions in `recipe.yaml` file and | ||
based on that and a set of builtin conventions generate the Tekton Task | ||
definition in YAML format. | ||
|
||
Usage (from this directory): | ||
This tool is used by the `hack/generate-ta-tasks.sh` script. | ||
|
||
go run . path/to/recipe.yaml | ||
## Usage | ||
|
||
The tool uses only one argument - path to the `recipe.yaml` file. | ||
These `recipe.yaml` files are stored in the task directories ending with `-oci-ta`. | ||
|
||
Usage (from the `task-generator/trusted-artifacts` directory) | ||
``` | ||
go run . path/to/recipe.yaml | ||
``` | ||
|
||
The generated Trusted Artifacts Task is provided on the standard output. | ||
|
||
## Development | ||
## Testing | ||
|
||
To build the tool executable run `go build`, to run the tests run `go test`. | ||
There are various included tests in the `golden` folder. | ||
They use the `base.yaml` file which gets modified based on the `recipe.yaml` and is compared to the `ta.yaml` | ||
``` | ||
go test ./... | ||
``` |