1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
Commit Graph

413 Commits

Author SHA1 Message Date
PuneetPunamiya
5a3e5f630f Adds category field as an annotation as tekton.dev/categories
- Initially all tags were mapped to categories in Hub,
     for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml,
     so whenever a new tag was added in a task it was mapped to a category called `others`.
     Hence before every release we had to manually map these new tags to some category,
     hence after the discussion in Catalog and Hub WG, a proposal was created for adding
     a category as an annotation.

   - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-07-26 13:15:08 +01:00
Yulia Gaponenko
3e935e3472 Add platforms information for helm-upgrade-from-repo and
helm-upgrade-from-source tasks

As well as update helm image to use multi-arch version of it.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-07-23 09:24:07 +01:00
Chmouel Boudjnah
536668a73c Add goreleaser task 0.2
Allow configure the image name and default to latest,

The latest goreleaser version probably break the old version so bumping
the task version here and allow to override if the user wants it with
params.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-07-22 04:29:06 +01:00
Yulia Gaponenko
b2e98c4dd1 Add platforms information for maven and jib-maven tasks
As well as document multi-arch maven image for linux/s390x and
linux/ppc64le platforms.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-07-21 12:12:06 +01:00
Jerop
9f255314b3 Golang Fuzz
This task is a Golang Tekton Task to fuzz Go projects

It uses the native Go Fuzzing Beta for dynamic analysis to find issues
in your code.

The release announcement https://blog.golang.org/fuzz-beta notes that:
"Fuzzing is a type of automated testing which continuously manipulates
inputs to a program to find issues such as panics or bugs. These
semi-random data mutations can discover new code coverage that existing
unit tests may miss, and uncover edge case bugs which would otherwise
go unnoticed. Since fuzzing can reach these edge cases, fuzz testing is
particularly valuable for finding security exploits and vulnerabilities"
2021-07-19 14:08:06 +01:00
vinamra28
f5d44bdb7f Add openshift-client task 0.2
The task requires min pipelines version 0.17.0 as it uses two optional
workspaces. First workspace is for passing the manifests which we want
to apply on the cluster and second workspace can be used to mount the
kubeconfig file if in case we want to run the oc command on another
cluster.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-07-05 18:49:08 +01:00
vinamra28
b781a300c0 Fix the README of openshift-client
The README was showing that the task uses the input resource of
cluster-type but the resource being used was of git-type so fixing that.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-07-05 18:49:08 +01:00
Haibing Zhou
7462fb2abb github-set-status: use secret volume for github token
The `github-set-status` task now uses volumeMount to read github token.
The volume approach is prefered over environment variable.
2021-07-02 09:17:07 +01:00
Gijs van Dulmen
e88a331e0a Add 0.2 git-cli task after git-clone 0.4 example
Remove trailing spaces

Improve README

Add SSH creds docs
2021-07-01 15:18:06 +01:00
Pascal Gulikers
1887c0bc56 Fixed source path bug when not set at default (.) 2021-07-01 12:36:06 +01:00
Michał Czeraszkiewicz
84906df9a3 docs: typo in script title 2021-06-25 07:33:03 +01:00
urvashigupta7
54735e59c3 Add task for Kube-Linter Tool
Kube-linter is a tool by stackrox to identify misconfigurations in kubernetes objects.
2021-06-24 10:43:03 +01:00
vinamra28
d4798eb701 Fix orka-* task as per pipelines 0.24+
Add a parameter through which we can set the `HOME` env variable which
if not provided will default to `/tekton/home`. Also set the default
`workingDir` as `/workspace`.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-06-23 09:00:03 +01:00
vinamra28
d517969521 Fix git-clone task as per pipelines 0.24+
git-clone 0.1:
Add a parameter through which we can set the `HOME` env variable which
if not provided will default to `/tekton/home`

git-clone 0.4:
Changed the default value of userHome param from `/root` to
`/tekton/home` as it was not matching the README.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-06-23 09:00:03 +01:00
vinamra28
09da51c6ae Fix buildapacks-phases task as per pipelines 0.24+
Add a parameter through which we can set the `HOME` env variable which
if not provided will default to `/tekton/home`

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-06-23 09:00:03 +01:00
vinamra28
3247e6ac61 Fix ansible runner task as per pipelines 0.24+
Add a parameter through which we can set the `HOME` env variable which
if not provided will default to `/tekton/home`

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-06-23 09:00:03 +01:00
Priti Desai
79088e1e3b fix argocd sync and wait task
logining in from one container and having sync and wait run in a
separate containers does not work. Authenticate once and reuse the connection
across the containers in a pod is not supported. Sync and wait fails with
authentication error. Either we login at each step or collapse
sync and wait along with the login step. Or we could authenticate once and
find a way to how to reuse the same connection across the containers.

For now, combining everything into a single step.
2021-06-23 00:35:02 +01:00
Gijs van Dulmen
177a749088 Add Github Open PR Task
Fix trailing space

Fix version obviously

Fix text typo

Add Test for Github Open PR

Fix hosts

Update test fixture

Add better and more tests

Use localhost

Fix HTTP and HTTPS

Fix typo

Add PR number and URL results

Fix tests and use correct URL

Remove duplicate line

Set correct URL over here as well
2021-06-21 16:45:02 +01:00
Gijs van Dulmen
f6b4174a18 Add YQ Task including tests
Setup correct structure

Fix review comments

Fixes after review comments
2021-06-15 13:55:59 +01:00
Gijs van Dulmen
94ddad6e32 Add option to use Basic Auth
Add docs in README

Fix lint errors in Python code

Adding README improvements for Basic authentication

Improve README based on review
2021-06-14 14:56:59 +01:00
urvashigupta7
5a251db8c7 change config file url for gitleaks 2021-06-14 14:29:59 +01:00
Piyush Garg
e77ba9ed85 Bump jib-maven task to 0.4 to fix certs mount path
This will add a new version 0.4 in jib-maven task which
have only one change of different mounth rather than /etc/ssl/certs
as mounting at that location is overidding the default certs of
the image. This will make the certs to mount at different path
/tekton-custom-certs
2021-06-09 12:18:57 +01:00
urvashigupta7
13fc9dab72 Add Task For Gitleaks Tool
Gitleaks is a sast tool for detecting hardcoded secrets like passwords, api keys, and tokens in your code
2021-06-09 12:08:57 +01:00
Scott
0c72fe24c2 Add nonroot user support and workspace credentials to git-clone
This commit introduces a 0.4 version of git-clone, fixing several
problems with the 0.3 git-clone Task:

1. Credentials in 0.3 could not be passed directly to the Task via
a Workspace.

2. There was no support for running as a non-root user.

This commit introduces a new version of git-clone that fixes both
of these issues. Credentials (either basic-auth or ssh-directory)
can now be supplied directly using a Secret workspace. A nonroot
user is provided with UID 65532 that can clone repos without
requiring root permissions.
2021-06-08 17:07:57 +01:00
vinamra28
4436e012b3 Fix getting comment with multi Lines
This use python multi string when getting the comment
params so we don't bug out on multi lines comments.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-06-07 13:45:56 +01:00
Gijs van Dulmen
2c175084e4 Add extra possibility for username and emoij to make it more Tekton Like
Fix linting and improve

Fix quotes

Add parameter docs
2021-06-05 11:28:56 +01:00
Chmouel Boudjnah
63fd747f0e Allow to override GO caching environment variable
Allow overriding the GO cache, GO mod caching and golangci-lint caching.

Optimize golang-build and golang-test to not do a fulll copy of the source
inside the GOPATH if we have a go.mod in source root directory.

Bumped task since we add a bunch into it.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-06-02 12:14:54 +01:00
Konrad Scherer
ae319bc988 Support multiple EXTRA_ARGS by using array type
Signed-off-by: Konrad Scherer <kmscherer@gmail.com>
2021-06-02 07:26:54 +01:00
Chmouel Boudjnah
909ac49c05 Fix getting comment with multi Lines
Fixes issue #731

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-06-02 07:10:54 +01:00
Gijs van Dulmen
149beacbf5 Add Teams Task and README
Update title with copy paste err

Add quotes to get rid of lint issues

Fix some more issues with shell linting

Linting - Add double quotes over here as well

Setup the incoming webhook as a secret due to it's sensitivity
2021-06-01 17:31:54 +01:00
Chmouel Boudjnah
fc29455532 github-app-token allow github api url to be defined
* Allow defining the github api url
* Handle Exception better by showing the error message.
  (i.e: in case if ntp is not syncronized the jwt token would not be issued)
2021-05-26 12:54:52 +01:00
pratap0007
f411787b89 Improves url links in the README
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>
2021-05-24 17:47:52 +01:00
Chanseok Oh
ee978374c0 Update OWNERS 2021-05-17 13:50:48 +01:00
Chanseok Oh
10c5841b4f Update OWNERS 2021-05-17 13:50:48 +01:00
vinamra28
c88c0ac58b Remove permission check in write-file task
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>
2021-05-11 08:59:45 +01:00
Chmouel Boudjnah
42c4b85788 Update golangci-lint to latest
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-05-10 10:36:45 +01:00
Costel Moraru
eeb97337d9 Removing the inputs param prefix according to the v1beta1 specs 2021-05-07 09:26:43 +01:00
Andrea Frittoli
6358e174e6 [tekton-catalog-publish] Bind the dockerconfig workspace
When the optional dockerconfig workspace is set, set the
DOCKER_CONFIG env variable accordingly.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
2021-05-04 15:11:42 +01:00
Andrea Frittoli
9095458f98 [tekton-publish-catalog] Fix syntax of find command
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>
2021-05-04 14:44:42 +01:00
Andrea Frittoli
1160467eb9 Add a task to publish a catalog as bundles
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>
2021-05-04 12:01:42 +01:00
Bittrance
64d1674661 correct write-file params descriptions. 2021-05-03 04:45:42 +01:00
Bittrance
832a58bfa9 write-file now has established tag "generic" 2021-05-03 04:45:42 +01:00
Bittrance
c63533b90c Fix alpine 3.12 with sha256
Missed this when trying to adhere to recommendations.md.
2021-05-03 04:45:42 +01:00
Bittrance
783bfca070 Change write-file permissions -> mode and follow recommendations.md 2021-05-03 04:45:42 +01:00
Bittrance
58d5df4ddc Add Task to write a file onto a workspace
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.
2021-05-03 04:45:42 +01:00
Scott
046fb8addb Pass git-clone Params as EnvVars Instead
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.
2021-04-28 17:25:40 +01:00
Siegfried Ehret
bc72cb8ecd Fix typo in sendmail readme 2021-04-28 11:20:40 +01:00
PuneetPunamiya
8966eb7964 Bump tkn image to 0.18
Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-04-28 11:11:40 +01:00
Chmouel Boudjnah
0a59b634f7 Add github app token 0.2
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>
2021-04-27 12:34:08 +01:00
savita ashture
94aede7853 Revert "Add privileged permission to jib-maven task"
This reverts commit 1920b1e36c.
2021-04-27 12:15:09 +01:00
Billy Lynch
46e0bb02bc Add kind catalog task.
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.
2021-04-23 15:12:08 +01:00
Piyush Garg
fdd4499dd3 Use bash instead on sh in jib-maven
This will fix the issue of task failing with some MAVEN_IMAGE
like 3.6.3-adoptopenjdk-11 etc because of [[ not found
2021-04-22 12:09:07 +01:00
jparsai
6bd8c3165b Publish CRDA task into Tekton Hub 2021-04-22 11:06:07 +01:00
savitaashture
1920b1e36c Add privileged permission to jib-maven task 2021-04-21 19:35:08 +01:00
Billy Lynch
8db4239324 Add comments sensative looking material for usage.
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.
2021-04-15 18:37:41 +01:00
Chmouel Boudjnah
967d937099 Add pr checkout sample for git-clone task
Add a sample to demonstrate how to checkout a PR directly with
git-clone.

Closes #694

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-04-14 12:52:41 +01:00
Billy Lynch
6e9101f41e jenkins: Add set +x to script.
This is a follow up to https://github.com/tektoncd/catalog/pull/696.
2021-04-12 22:10:40 +01:00
Billy Lynch
6929f039f9 Remove extra set -x commands in e2e tests.
Aims to make e2e tests consistent across projects.
2021-04-12 21:50:40 +01:00
Andrea Frittoli
622edc8169 Support Kaniko authentication via workspace
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>
2021-04-09 13:15:49 +01:00
Piyush Garg
c2547bd722 Refactor in e2e script and pre-apply func
Created a function to run secure sidecar registry with cert
and calling that function from all tests to remove duplication
2021-04-08 14:19:48 +01:00
Piyush Garg
06b043155f Add jib-maven 0.3 with certficate support for registry
This will add jib-maven 0.3 version with support for providing cert file
to talk to insecure registry

Fix #686
2021-04-08 14:19:48 +01:00
Mahdi
280806165c Fix kn-deployer.yaml path. 2021-04-06 07:54:48 +01:00
Sunghoon Kang
45742091e5 Add github-create-deployment-status task
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>
2021-04-02 17:22:46 +01:00
Sunghoon Kang
686f9ca027 Bump github-create-deployment version to 0.2
- 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>
2021-03-29 14:34:45 +01:00
Andrea Frittoli
67fde32738 Support response files in fixtures
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>
2021-03-29 09:41:45 +01:00
Andrea Frittoli
66df9ddf53 Add support for comment update to github comment task
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>
2021-03-29 09:41:45 +01:00
agiorgi
52b1848b00 Fixed message encoding to support non-ascii chars
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
2021-03-29 09:28:45 +01:00
Andrea Frittoli
cafeb289fa Task to request reviewers on a GitHub PR
Add a new task that allows to request reviewers on a GitHub PR.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
2021-03-26 10:22:44 +00:00
Javier Romero
aba44d4ee1 Add task/buildpacks/0.3
- 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>
2021-03-22 17:34:45 +00:00
Javier Romero
397d0790f9 Add task/buildpacks-phases/0.2
- 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>
2021-03-22 17:22:45 +00:00
Praveen Kumar Reddy Thangadancha
66b1b7961c Add refspec params to run.yaml
Updated refspec defaults because of upstream branch changes from `master` to `main` (`refs/heads/master:refs/heads/master`->`refs/heads/main:refs/heads/main`)
2021-03-22 10:20:45 +00:00
Vincent Demeester
d93795673c Update self reference from master to main 🧙
And update references to community, pipeline, etc. too.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2021-03-19 11:09:49 +00:00
Torben Tretau
530aa74a86 Add version 0.2 to terraform-cli task
- Add parameter for the Terraform image
- Add proxy parameter
- Use official Hashicorp Terraform by default
- Better Terraform Environment Variable description
2021-03-18 17:29:49 +00:00
Tyler Auerbeck
5a746510a6 Fix broken symlink 2021-03-18 10:01:49 +00:00
vinamra28
2da900bba4 Add github-add-comment version 0.3
As of now github-add-comment task supports input of comments only via
params.

This PR adds support of workspaces if in case somebody wants to provide
the comments via some file. One such use case can be:-
In Catlin CI, logs are produced after executing catlin command on
changed files which can contain multiple warnings and these warnings can
be ingored by the user if not posted on the github PR as the CI is
green. So all the logs would be stored in a file with proper formatting
and then the shared workspace can be passed to the github-add-comment
task along with the filename containing the formatted logs.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-03-16 17:27:49 +00:00
PuneetPunamiya
dd779fb5ac Moves a pipeline build-push-gke-deploy from task dir to pipeline dir
This patch includes-

     Currently we have a file called `build-push-gke-deploy`
     which has multiple resources in one file, this patch moves
     the pipeline to the pipeline  directory and it's corresponding
     task to the support directory

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-03-16 15:03:49 +00:00
Jason Hall
0f232875b0 Update kaniko image v1.0.0 -> v1.5.1
Since 1.0.0 a lot of multi-arch improvements have been made, as well as
performance improvements and bug fixes

See full changelog: https://github.com/GoogleContainerTools/kaniko/blob/master/CHANGELOG.md
2021-03-10 14:47:47 +00:00
vinamra28
3e5b01a276 Add Task to post a file on Gist Github
This adds a task to upload a file on gist github.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-03-10 06:54:47 +00:00
vinamra28
f0558ef49f Run orka-init and orka-teardown as privileged
The tasks orka-init and orka-teardown fails to create resources on the
cluster where rbac rules are enforced so running that as privileged
works fine.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-03-09 18:59:47 +00:00
Didrik Finnøy
b48b17321d Choose dind image via params
At the time of writing, the stable `docker:dind` is broken, the solution is to roll back to the previous version (https://github.com/containerd/containerd/issues/4837).
In other words, `docker:dind` should be temporarily replaced with `docker:19-dind`.
I think allowing users to specify the docker-in-docker image via params is the best way to get around this issue.
2021-03-04 09:35:46 +00:00
Andrew Rothwell
69cd254e9b add sparse checkout and bump to 0.3 2021-02-26 14:40:44 +00:00
Spike Burton
8dd769f8e8 Fix failing tests for orka tasks
This PR corrects a potential race condition for the orka-deploy
and orka-teardown tests which causes the nightly integration test run to
fail. A runAfter condition is added to each test pipeline to avoid a
race condition where the pods created by the orka-deploy and
orka-teardown tasks are unable to be created when the orka-init task
has not yet created the secret and config map needed for pod config.
2021-02-23 04:33:43 +00:00
rudeigerc
6f59d7e72b Add version 0.2 to jib-gradle task
Signed-off-by: rudeigerc <rudeigerc@gmail.com>
2021-02-18 10:41:41 +00:00
Roland Huß
2d312aa5d0 Removing knctl-deploy task
knctl has been sunset since 2 years and only supports Knative up to 0.2 (current version: 0.20).
The successor is kn for which there are also entries in the catalog.
2021-02-18 06:57:41 +00:00
vinamra28
61435e642d Fix jenkins and trigger-jenkins-job task tests
Currently in pre-apply-task-hook.sh we are using `jenkins:lts` image
which gets updated on a regular basis which might break the CI while
testing the following tasks:- jenkins, trigger-jenkins-job.

Adding a tag+digest to the image used in test so that the tests don't
break in future.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-02-15 10:57:46 +00:00
Yulia Gaponenko
c976d52312 Minor fix in README for helm-upgrade-from-repo
Fix version of the task in RERADME

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-02-11 12:03:45 +00:00
Yulia Gaponenko
e096c1aef9 Bump helm-upgrade-from-repo task version to 0.2
- Add helm image parameter instead of helm image version

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-02-11 11:47:45 +00:00
SM43
e720c10cd2 Adds context param in golang-test task
This adds context param to provide path to the directory to use
as context.

Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
2021-02-11 10:07:45 +00:00
SM43
9770a832b8 Adds context param in golangci-lint
This adds context param to provide path to the directory to use
as context.

Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
2021-02-11 04:26:46 +00:00
Anders Ingemann
60bb409b01 aws-cli: Make secrets workspace optional
Credentials can be passed to the aws-cli via instance roles (with e.g. kiam).
So an installation of this task could look like this:

```
kind: Kustomization
resources:
- https://raw.githubusercontent.com/tektoncd/catalog/master/task/aws-cli/0.2/aws-cli.yaml
patchesStrategicMerge:
- |-
  apiVersion: tekton.dev/v1beta1
  kind: Task
  metadata:
    name: aws-cli
    annotations:
      iam.amazonaws.com/role: tekton-upload
```

Optional workspaces is supported since pipelines 0.17.0
minVersion in v0.1 of this task is 0.12.1, so a new v0.2 was created
which requires the newer pipelines version.
2021-02-08 10:11:44 +00:00
Yulia Gaponenko
0a29a36c5a Add version 0.2 to jib-maven task
- Add parameter for the maven image
- Replace usage of PipelineResource to image name as param and image digest as
results

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-02-04 12:17:43 +00:00
jace-ys
dcaa00dca6 Task for creating GitHub deployments
This introduces a Task for creating GitHub deployments for a given
repository. This allows people who rely on GitHub deployment events
for their CD systems to be able create them from within a Tekton
pipeline.

This task is pretty much just a wrapper around the GitHub API for
creating deployments. The main params required are the ref
and environment for the deployment, and we fall back to the API's
defaults for the other params.
2021-02-03 10:22:43 +00:00
vinamra28
a1cd5f81d2 Add optional workspaces in kubernetes-actions task
This PR adds optional workspaces support in kubernetes-actions
task and also adds tests for the task.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-01-30 05:56:41 +00:00
Yulia Gaponenko
7dd3f2ce9b Bump pullrequest-init and kubeconfigwriter version to v0.20.1
Latest image versions have multi-arch support, it will allow to use the same
catalog tasks for many hardware architectures.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-01-29 15:38:41 +00:00
Chmouel Boudjnah
4b82365f87 🧹 Update buildah to latest version 0.17.0 2021-01-28 17:21:41 +00:00
Chmouel Boudjnah
8b22d2a0b8 Add subjectAltName to the 0.2 test
Since buildah has been built with the latest golang 1.15 version which has SAN
enforcement, we provide subjectAltName in the generation of self generated
certificate.

See https://security.stackexchange.com/a/183973
2021-01-28 17:21:41 +00:00
Yulia Gaponenko
bbcc51cefc Use multi-arch alpine/git image for git-cli and git-rebase
Image sha specified in git-cli and git-rebase tasks is for
amd64 version of alpine/git:v2.26.2 image. The image is actually
multi-arch one.
Replacement of image sha to point to multi-arch version will allow to
use the same catalog task for many hardware acrhitectures.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-01-28 12:38:41 +00:00
Yulia Gaponenko
310ee430c5 Use multi-arch tkn container image for tkn task
multi-arch tkn image allows to use the same catalog task in the setup
for many hardware acrhitectures (latest tkn image is available for
linux/amd64, linux/s390x and linux/ppc64le)

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-01-28 11:15:41 +00:00
vinamra28
f9d0325471 Add npm cli task
This task can be used to run npm goals on a nodejs based project.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-01-26 16:08:41 +00:00
Chmouel Boudjnah
68101ccbb5 Add a VERSION params to openshift client task
Allow specify an OpenShift Version to the openshift-client task.

Add a test along the way.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-01-25 09:44:40 +00:00
vinamra28
8d53c6ecf0 Fix creation of ServiceAccount in helm tasks
Upstream catalog nightly is failing with the error
`error: error parsing STDIN: error converting YAML to JSON: yaml: line
2: mapping values are not allowed in this context` which is occuring
while creating the SA in `pre-apply-task-hook.sh` as the SA YAML was
first created and then applied and during this process the error is
occuring.

The PR fixes that by directly creating the SA and not first generating
the YAML and then applying in next step.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-01-19 08:10:38 +00:00
Spike Burton
197c3862e5 Add set of modular Orka tasks
This change adds a set of modular Tasks 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 tasks orka-init, orka-deploy and orka-teardown are designed to work
together in order to allow the utilization of multiple macOS
build agents in a CI/CD pipeline. The orka-deploy Task allows the user
to provide a build script as a parameter, and will allow the user to
store build artifacts in a Tekton workspace. The orka-init and
orka-teardown tasks create and delete virtual machine configurations.
This is accomplished by making calls to the Orka API running in a
separate Kubernetes cluster over a VPN connection.
2021-01-18 14:59:38 +00:00
Theofilos Papapanagiotou
69179c92ad Update task/eks-cluster-teardown/0.1/eks-cluster-teardown.yaml
Co-authored-by: Vinamra Jain <vinjain@redhat.com>
2021-01-14 13:14:15 +00:00
Theofilos Papapanagiotou
4779965a9a Update task/eks-cluster-create/0.1/eks-cluster-create.yaml
Co-authored-by: Vinamra Jain <vinjain@redhat.com>
2021-01-14 13:14:15 +00:00
Theofilos Papapanagiotou
689406cb9b Add EKS cluster create/teardown tasks 2021-01-14 13:14:15 +00:00
vinamra28
81d5673a74 Avoid the usage of PipelineResources from s2i
Earlier version of s2i uses PipelineResources which are now deprecated.
Also the s2i task is missing the digest in results.

With this PR:-
- Removing the usage of PipelineResources and using equivalent task from
  catalog in the tests.
- Storing the digest in results so that it can be used later on by
  another task.
- Adds optional workspace for the cert dir to pass to buildah --cert-dir flag.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2021-01-14 10:05:15 +00:00
Cansın Aldanmaz
4353aa8d50 Powershell task added 2021-01-07 14:08:12 +00:00
Piyush Garg
fbcfb43a3b Change test repo to cli from pipeline in golang-test task
This will change the golang-test task tests to use cli repo for
unit test rather than pipeline repo as the test are failing there
2021-01-05 14:26:11 +00:00
Chmouel Boudjnah
a861887585 Update all images using openshift to latest stable 4.6
* Update all images to use the latest stable 4.6
* Modify the task using :latest to pin it to 4.6

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2021-01-05 10:15:11 +00:00
Piyush Garg
74eb6d0289 Remove unnecessary sidecar in golang test 2020-12-22 08:29:07 +00:00
Chmouel Boudjnah
5547bd74a2 Update to 0.18.1
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-12-09 08:02:35 +00:00
Dan Lorenc
c3f44374eb Add a catalog task to run the OpenSSF Security Scorecard project.
This task is very simple right now, but will be extended to support
other flags and output formats int he future.
2020-12-08 17:09:35 +00:00
Navid Shaikh
019ea8094a feat(kn): Add kn-apply task
Add a new kn-apply task which uses `kn service apply`.
  The task takes only two mandatory params; service name and image name.
2020-12-08 08:02:35 +00:00
divyansh42
43f2e56097 Edit broken image link
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2020-11-28 07:09:31 +00:00
linzhaoming
da7ea7c018 Update README.md
Fix comment typo
2020-11-26 13:29:31 +00:00
vinamra28
6dbb6f708b Run build step in Orka as privilege
To run Orka in OpenShift successfully we need to run the build step as privileged else some operations are not permitted without privilege access

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-25 11:29:30 +00:00
vinamra28
9ba4f04fb6 Fix image in Skopeo-copy task
In quay.io if a tag is repushed, the previous digest becomes in-accessible.
So removing the digest from skopeo-copy task as the current digest was in-accessible.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-23 08:51:30 +00:00
vinamra28
24b7974c19 Fix helm-upgrade-from-repo tests
repo "https://kubernetes-charts.storage.googleapis.com" is no longer available
so changing to "https://charts.helm.sh/stable"

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-20 12:44:28 +00:00
vinamra28
11a17cfe87 Add security context in create step of buildpacks
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-19 15:58:28 +00:00
Napoleon Santana
84a5a1d982 Fix typo
The description says gitlab instead of github.
2020-11-19 09:20:28 +00:00
vinamra28
05d79f53ef Moved samples to their correct place and modified a few files
- git-cli examples moved from git-cli/examples/git-cli -> git-cli/examples/
- git-rebase examples moved from git-rebase/examples/git-rebase -> git-rebase/examples/
- changed workingdir -> workingDir in git-rebase
- corrected install command in az
- improved YAML in readme for proper rendering

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-18 17:55:28 +00:00
vinamra28
3c69820b3f Removed unwanted examples from tasks dir
There were multiple examples which were not a part of that particular task were not removed at the time of catalog reorg

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-18 17:55:28 +00:00
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
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
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
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
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
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
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
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