1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-23 06:08:46 +00:00
Commit Graph

769 Commits

Author SHA1 Message Date
Edvin Norling
601c786261 Add values_file to helm-upgrade-from-source
* 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.
2020-11-18 11:24:28 +00:00
Spike Burton
74c27b83aa Update task/orka-full/0.1/README.md
Co-authored-by: Vinamra Jain <vinjain@redhat.com>
2020-11-17 17:35:29 +00:00
Spike Burton
3ef0851047 Add orka-full task for MacStadium Orka integration
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.
2020-11-17 17:35:29 +00:00
vinamra28
2f24ebc1b2 Fix e2e script
- 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>
2020-11-17 08:55:28 +00:00
ishani2412
65dd35a5e8 Fix broken link
Signed-off-by: ishani2412 <ishani.1613039@kiet.edu>
2020-11-12 09:52:26 +00:00
Priti Desai
3770e17cf3 bumping up pipeline version
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.
2020-11-11 09:36:26 +00:00
divyansh42
663cd1a86c Add ability to specify secret name and key in github issue close task
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2020-11-06 14:55:24 +00:00
divyansh42
83a98e61a3 Add the ability to specify secret name and key in github add comment task
Modify github-add-comment task to add the ability to specify secret name and key.

Signed-off-by: divyansh42 <diagrawa@redhat.com>
2020-11-06 14:55:24 +00:00
Chmouel Boudjnah
dc4ced0942 Add codecov task
This task allows uploading a code coverage report to  codecov.io

Closes #533

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-11-04 13:15:22 +00:00
Sunghoon Kang
ead745e7ef Bump git-init version to v0.17.3
Also, make git-init image in git-clone/clone as configurable value
2020-11-04 08:39:22 +00:00
Jason Hall
25e4c0247d Update buildpack task to drop privilege 2020-11-03 08:39:22 +00:00
vinamra28
5ebe8260ab Add tests for Blue Green Deployment Task
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>
2020-11-03 08:29:22 +00:00
Chmouel Boudjnah
7b49793238 Fix add_task common function
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>
2020-10-30 13:44:21 +00:00
Chmouel Boudjnah
5b3f5bedda pylint: make sure we expands args
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>
2020-10-29 16:45:20 +00:00
Chmouel Boudjnah
9a3c2ef648 Make sure we ar enot quoting $@
And detect properly the changed files when we have multiple yaml files in dir.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-29 16:24:21 +00:00
Chmouel Boudjnah
37aab72942 Fix buildah sample optional workspace link
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-29 07:40:21 +00:00
Chmouel Boudjnah
5412a08cfc Test only the tasks that has been modified or added
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>
2020-10-28 17:35:21 +00:00
Chmouel Boudjnah
7907386fc4 Add buildah 0.2 with optional ssl certdir workspace
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>
2020-10-28 09:55:21 +00:00
Chmouel Boudjnah
1d86613d46 Readd requirements.txt
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>
2020-10-28 08:39:21 +00:00
Chmouel Boudjnah
95006e48b4 Improve e2e tests runner output
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>
2020-10-26 11:24:20 +00:00
Chmouel Boudjnah
cd1eeae5d6 Add a more generic jenkins task
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>
2020-10-26 10:20:20 +00:00
vinamra28
e6fcc20450 Move supporting files to support dir
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-10-26 09:03:20 +00:00
vinamra28
32f2913fd2 Fix Catlin error by adding Digest to the Images
- 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>
2020-10-26 09:03:20 +00:00
vinamra28
16c015baed Add tests for tkn Task
Add test for tkn task which will use the current cluster and list/describe the task in current namespace

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-10-22 18:13:18 +01:00
vinamra28
c2125a3b51 Add manual validation check for including tests
To manually validate whether the PR includes tests for the task which is modified or added

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-10-22 14:56:18 +01:00
vinamra28
a152c1cde0 Add support to mount kubeconfig in tkn task
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>
2020-10-22 11:02:18 +01:00
Chmouel Boudjnah
646ec8562e Fix spellings
Co-authored-by: Vinamra Jain <vinjain@redhat.com>
2020-10-15 14:55:23 +01:00
Chmouel Boudjnah
4e9986d898 Add more documentation about external testing
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>
2020-10-15 14:55:23 +01:00
divyansh42
28866d4a83 Bump images to 0.17.1
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2020-10-14 14:56:22 +01:00
Scott
8a453350cc Fix golang-test and golang-build src directory issue
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.
2020-10-12 16:29:22 +01:00
Chmouel Boudjnah
85cc0565b7 Add a new pylint task
- 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>
2020-10-11 04:20:21 +01:00
Chmouel Boudjnah
972bca5c56 Add a run for the kubeconfig-creator task
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-07 20:22:20 +01:00
Chmouel Boudjnah
73b9b12e53 Add add_task helper function for tests
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>
2020-10-07 17:51:55 +01:00
vinamra28
e38be678d1 Add Mypy Linter for Python
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>
2020-10-07 10:19:54 +01:00
Chmouel Boudjnah
c22058e4d0 Rework the triggers-jenkins-job
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>
2020-10-07 08:23:55 +01:00
Chmouel Boudjnah
ee662433c1 Add testing for pull request task
This adds test for the pull request binary, using
https://github.com/chmouel/go-rest-api-test/

The fixtures was imported from go-scm
https://github.com/jenkins-x/go-scm/blob/master/scm/driver/github/testdata/

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-06 17:03:54 +01:00
Chmouel Boudjnah
cba02de811 Add test for github-add-comment using fixtures
This add a test to github-add-comment to test the task.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-06 17:03:54 +01:00
Chmouel Boudjnah
9cabd0a6d2 Add documentation for the fixtures capability
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-06 17:03:54 +01:00
Chmouel Boudjnah
b9383b4936 Add support for REST services testing
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>
2020-10-06 17:03:54 +01:00
Adam A.G. Shamblin
4ea9e0787d Fix minor error, misplaced parameter prevents push when build args are present. 2020-10-05 00:13:53 +01:00
Andrea Frittoli
efed2e9641 Add the ability to specify secret name and key
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.
2020-10-03 19:33:53 +01:00
vinamra28
1f6d742aab Add GoReleaser task to Catalog
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>
2020-09-30 11:52:52 +01:00
Billy Lynch
b50f4d0e93 gcs-generic: Make credential file optional.
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.
2020-09-29 15:36:51 +01:00
vinamra28
7c2d503b48 Add task to include Black(python prettier)
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>
2020-09-29 14:02:51 +01:00
Chmouel Boudjnah
8f174490d5 Add Github APP token task
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>
2020-09-29 12:55:51 +01:00
Andrea Frittoli
0db76f2345 Fix documentation for the GitHub status task
Improve the documentation for the GitHub status task, fix
spelling issues and add link to the GitHub API implemented.
2020-09-23 11:32:49 +01:00
Andrew Johnson
141466b35d Fix invalid URL to TektonDashboard 2020-09-18 17:36:24 +01:00
Sho Haraki
bc550cb33c Add Server's User to the maven task
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.
2020-09-18 11:26:24 +01:00
Shinichi TAMURA (@tmshn)
f4dfe1ec0f Fixed typo 2020-09-17 11:52:24 +01:00
Divyansh42
73e59e5f76 Bump buildah image
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>
2020-09-17 10:31:24 +01:00