Few task's README contains some url links which had
invalid directory path and was pointing to a invalid page
Signed-off-by: Shiv Verma <shverma@redhat.com>
In write-file task's tests we are checking whether file permission is
equal to `--w--wxr-T`. These permissions may vary depending on rbac
enforced cluster. Example on some cluster we can get the value as
`-rw-rwxr-T` thus failing the test.
In this commit I am removing the `grep -- '--w--wxr-T'` so that the
tests doesn't fail on other clusters.
Signed-off-by: vinamra28 <vinjain@redhat.com>
When the optional dockerconfig workspace is set, set the
DOCKER_CONFIG env variable accordingly.
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
The syntax of the find command was not correct, and the error was not
caught by CI because of the missing "set -o pipefail".
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add a new task that uses tkn bundle to publish a Tekton catalog as
bundles to a container registry. Each task corresponds to a dedicated
bundle, which task versions available as tags.
Optionally, bundles are tagged with an extra tag provided as an input
parameter.
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add a catalog task to write a parameter out as a file, creating
intermediate directories and setting permissions as necessary. While it
is possible today to have a workspace that is a mounted config map
variable, that provides limited support for expanding parameters into
the file (i.e. the [replace-tokens](https://hub.tekton.dev/tekton/task/replace-tokens) task).
Ultimately, my argument for adopting this task into the catalog is that
I believe others will also look for a file-writing task and their
experience of Tekton will be better if they find one.
Previously we passed params directly into the `script` block of
the clone step. Because Pipelines doesn't escape variable values
when interpolating them the behaviour of the task could be changed
by the contents of a param.
This commit changes the way params are provided to the script;
instead of being interpolated directly they are converted first
into environment variables and accessed through shell's `${}`
construct.
Writing my first contribution to the catalog, I failed to find the
authoring recommendations, resulting in unnecessary Slack noise.
This adds references to parts of the documentation that I did
read in the hope that others will see them in time.
I removed the recommendations list that was inlined in CONTRIBUTING.md
as it is covered by the linked recommendations.md.
Added a new params to allow getting the application_id from the secrets
workspace, still allowing as params directly if user would like to use
this instead.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
This adds support for running kind within Tekton. This primarily configures
the Docker-in-Docker environment necessary to bring up kind clusters.
Users should invoke kind in their own runtime image to create / modify
clusters. See https://github.com/tektoncd/plumbing/pull/821 for an
example runtime image.
This commit pins catalog to gke 1.18 for the next six months
while plumbing works on removing basic auth.
Major hat-tip to @jmcshane for doing the work to resolve this
problem!
This change simply adds comments to secrets and other password/key
material that are used in testing. The usage of these secrets is okay
(they're all either dummy tokens or auth material set for local
instances spun up during tests), but adding comments to provide some
background for anyone browsing the code.
Also redacted a cert used in the buildah sample. While this was
safe since it was generated specifically for the sample, there isn't a strict
need for a valid cert here, so we can replace this with something that looks
cert-like instead.
As of now the function `detect_changed_e2e_test` was running even if the
variable `TEST_RUN_ALL_TESTS` value was set which resulted in breaking
the CI.
Add a condition to call the function iff `TEST_RUN_ALL_TESTS` value is
not set.
Signed-off-by: vinamra28 <vinjain@redhat.com>
Add an optional workspace to the kaniko task that can be used to
pass container registry credentials to the kaniko task.
This mechanism replaces the service account based one. The change
is not backward compatible, however it is not easily possible to
support both auth mechanism, since the service account one
requires setting DOCKER_CONFIG, which breaks the workspace based
one. Workspace are preferrable since they are available in all
deployments, while Tekton's built-in auth is only available when
it's enabled. While enabled is the default setting for now, it may
change in future, and it may already be disabled in various
deployments, where the kaniko task is today effecively unusable.
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
As of now if there is some modification in any e2e test then CI doesn't
run on whole catalog and this might result in failure of some task which
we get to know next day whene nightly periodic job runs.
This change detects the changes in the tests dir and if there is any
change then run the CI on whole catalog.
Signed-off-by: vinamra28 <vinjain@redhat.com>
In e2e tests script podTemplate was getting added even if the yaml
manifest contains only ConfigMap which was failing the CI.
Append volumes in sidecar to mount fixtures ConfigMap instead of using podTemplate
as appending the podTemplate was conditional and there can be scenarios
where podTemplate might get appended at wrong location.
Signed-off-by: vinamra28 <vinjain@redhat.com>
This task allows to update a status of GitHub deployment from a
Tekton pipeline. This task can be used while deploying or
after deployed (with `finally`) to show status at
GitHub deployment status tab.
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
- Check for libraries in a pip agnostic way
- allow for adding multiple sidecars with a reusable `add_sidecars` function
- fix overwriting sidecars issue for previous python
- make it more readable
- Add API_PATH_PREFIX to github-create-deployment task parameter
GitHub enterprise exposes API using path (e.g. `/api/v3`)
instead of host. `github-create-deployment/0.1` will fail on this case,
since `HTTPSConnection` does not allow path included host.
Co-authored-by: Vinamra Jain <vinjain@redhat.com>
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
Extend to test logic to be able to load the fixture reponse from a
file, so that we don't have to inline a long JSON doc into the fixture
config YAML. This is achieved by creating a config map with all the
files in the fixtures folder, and mounting that configmap as a volume
to the sidecar.
This allows improving the test for the github-add-comment task v0.4
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Enhance the GitHub add comment task with the ability to update
a comment if applicable. This achieved by tagging comments with
and invisible (HTML comment) unique text, and looking for that
text to identify a comment.
This does not use the nodeid because that is generated by GitHub
and it would require task users to store known node IDs somewhere
across task executions.
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Non-ascii characters would cause the task to fail to send the email because by default smtplib tries to encode the message in ascii. Adding the encode('utf-8') to the email body fixes the issue
- Add `APP_IMAGE_DIGEST` result
- Upgrade to Platform API 0.4
- Add support for build-time environment variables
- Replace use of PipelineResources with Params
Signed-off-by: Javier Romero <rjavier@vmware.com>
- Add `APP_IMAGE_DIGEST` result
- Upgrade to Platform API 0.4
- Add parameter to configure the `LIFECYCLE_IMAGE`
- Add support for build-time environment variables
- Replace use of PipelineResources with Params
Signed-off-by: Javier Romero <rjavier@vmware.com>