* Making it easier to overwrite multiple values,
instead of defining them all in overwrite_values.
* Changing param helm_version to helm_image and let
the user define the entire container repo+image.
This change adds a Task to integrate Tekton with Orka by MacStadium.
Orka allows users to run macOS builds and workloads on real
Apple hardware. An Orka / Tekton integration will allow the utilization
of macOS build agents for CI jobs that run on Tekton pipelines.
The orka-full Task will allow the utilization of a single macOS
build agent, allowing the user to provide a build script as a
parameter, and will allow the user to store build artifacts in a
Tekton workspace. This is accomplished by making calls to the Orka
API running in a separate Kubernetes cluster over a VPN connection.
- While running integration tests we are getting `dirname: missing operand`.
- `git --no-pager diff --name-only 65dd35a5e8a7e63443b52df70ea5bbc0bc621dac..` Pull SHA is missing so fixed that
Signed-off-by: vinamra28 <vinjain@redhat.com>
Tekton Pipeline 0.18.0 was just released and as part of the release
process, bumping up the following images in the catalog tasks:
git-batch-merge - v0.17.3
git-clone - v0.17.3
0.18 contains bug fix for git-init and therefore bumping related tasks only.
Adding tests for blue green deployment task. The test will first
deploy version v1 of an application and service pointing to version
that deployment using `pre-apply-task-hook.sh` script and using taskrun will
deploy version v2 of that application and patch the service to point to v2 version
of the application
Also modifying the images in deployment manifests present in samples as the previous image
is not accessible now
Signed-off-by: vinamra28 <vinjain@redhat.com>
We were not getting properly the versions when there was files like OWNER in there
so make sure to grab only the directory
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Args wasnt expanded properly, it showed like this when running the task:
`[pthon-lint : pylint] /tekton/scripts/script-0-s2wjl: line 8: inputs.params.args: not found`
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We are detecting the task that only has been modified or added with the help of
git diff against the 'main' branch.
If we set and define the variable TEST_RUN_ALL_TESTS it will force running all
the tests and not just the modified ones.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We are bumping the buildah task to 0.2 since this needs at least pipeline
0.17.0.
This will add a optional workspace for the cert dir to pass to buildah
--cert-dir flag.
I have modified the test to create a registry with SSL certs and make the
buildah task using it.
This add a complete example on how to use this with the openshift internal
registry.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
the install of requirements.txt was removed from the 0.1 task but it is actually
needed for pylint, since it would error out if it can't find the dependences.
We make sure we can install them as user since the image assume root and that
would not work on some k8 install (ie: openshfit and others).
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We temporary disable the debug output while on the loop so we don't have the
gazillions debug messages while digging into the log. We have added the 'timing'
when it start and ends so we can easily spots the very slow test.
Aditionally we have introduced the new variable `CATALOG_TEST_SKIP_CLEANUP` if
set it will skip deleting the namespace. This is useful when running in
conjuncton with the `./test/run-test.sh` script to debug when there is a failure.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We had previouslly the triggers-jenkins-job task, this task is more generic and
allows more operations, it currently support starting a jenkins job and getting
the log of a build. It allows as well to wait that the job had started or that
the job has finished.
With this more generic task it makes it easier to have other jenkins operations
in there.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
- Previously catalog's task has some images that are not
tagged properly,this patch fixes these images by adding
the digest
- Soon once Catlin is added to the CI it will throw error
for those images which don't have proper tags
co-authored by:- @PuneetPunamiya
Signed-off-by: vinamra28 <vinjain@redhat.com>
The tkn task will be able to work with a kubeconfig for a cluster so that it can operate on it. The following task can also accept a SCRIPT as input so that we can run multiple tkn commands.
Signed-off-by: vinamra28 <vinjain@redhat.com>
Taking the trigger-jenkins-build e2e tests example of spinning a jenkins server
inside the test namespace we document an alternative to the 'reflector' tests
for e2e test.
This is documented as the 'first' one since probably more robust to test that
way than the reflector testing.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
The golang-test and build tasks attempt to use variable interpolation in a workspaces.mountPath
field where it isn't supported. This results in the source code being mounted in a directory
called, literally, "$(params.package)".
This commit updates the golang-test and build tasks to mkdir the package directory and copy
the source code into it, then cd into it and run `go test`/`build`. This should result
in better expected outcome - the source will be in the package directory that it expects
to be.
- Bump a new pylint task to 0.2
- Use an image which already has pylint and not auto install it every time we
run the task.
- Convert the spec to pipelineSpec
- Do not try to install requirements.txt modules since pylint doesn't need it.
- Remove the ability to choose another python version since you probaby would
not need it for a static analyzer. If you really need it you can redefine the
image params targetting a custom container image.
Co-authored-by: Maximilian Wurzer <62810491+wumaxd@users.noreply.github.com>
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We were previously using the outdated git_clone version 0.1 in the
add_git_clone_task function.
So let's introduce a more generic function :
```
add_task ${task} ${version}
```
if version is 'latest' it will always install the latest version of the task.
Change all pre-apply-task-hook to use that function instead.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
The following task contains `mypy` linter which is a popular static code analyser for python that checks code as described http://mypy-lang.org/
Signed-off-by: vinamra28 <vinjain@redhat.com>
Rewrite the triggers-jenkins-job, the arguments and params are about to same.
Starting from Jenkins LTS 2.176.2 we need to create a crumb and capture the
cookie jar to make the subsequent requests.
https://support.cloudbees.com/hc/en-us/articles/219257077-CSRF-Protection-Explained
Add tests :
We spins up a deployment with a jenkins lts and expose a service to it so our
task can access it.
We do some ninja execing into the pods to create a jenkins job in there and
setup the configmap secret.
We probably should drop the CRUMB setting since it will not work anymore but it
is harmless since we are regenerating it anyway.
Todo: need to test with jenkins image that is older than 2.176.2, but it
probably should work
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Add support for REST services testing, if we have a directory in the tests
directory called `fixtures` with a yaml file that contains a responder
rules (see github-add-comments task example) it will add a sidecar task from
https://github.com/chmouel/go-rest-api-test/ so the test can point to it.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Rather than forcing task users to create a secret with a fixed
name, allow setting the secret name and key as parameter.
The new parameters are optional, in the sense that they default
to the previous hardcoded values.
This task can be used to builds Go binaries for several platforms,
creates a GitHub release and then pushes a Homebrew formula to a tap
repository using [goreleaser](https://github.com/goreleaser/goreleaser).
Signed-off-by: vinamra28 <vinjain@redhat.com>
When running on GCP, gsutil will try to infer identity from the GKE
metadata service instead of an explicitly defined credential file. The
easiest way to support this is to only set the credentials iff the file
is provided, otherwise just fallback to gsutils default behavior.
Also adds a simpler example that doesn't require credentials.
This task will be used to format python code after doing a lint check and will not complain for the errors.
Signed-off-by: vinamra28 <vinjain@redhat.com>
This add the github app token, this would help to get a user token from a github
app which can be perused to do github operations.
Flow would are usually going like this :
events -> triggers event listenner \
-> start pipeline
-> get user token from app (with this task)
-> do operation (like ci checks or others) on github with this
token.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
This PR is to add `servers` tag for the private repository server.
It is assumed to be used with `MAVEN_MIRROR_URL`, for example, when using a cached library on a private network.
Buildah image in few tasks was not pointing to latest
image release tag, so updated the image to point to
latest release.
Signed-off-by: Divyansh42 <diagrawa@redhat.com>