1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-12-01 06:43:19 +00:00
Commit Graph

551 Commits

Author SHA1 Message Date
Piyush Garg
947198561e Bump images to 0.15.2 2020-08-12 08:52:06 +01:00
savitaashture
755fed0245 Add DOCKER_CONFIG env to avoid Unauthorization 2020-08-11 17:52:06 +01:00
Piyush Garg
71983fd2d9 Skip docker-build in CI
This will docker-build test in CI as it is
flaky atm and causing other PR not able
to merge
2020-08-11 16:17:06 +01:00
Divyansh42
be64177d2d Fix links in README in Blue Green Deploy task
Fixed few links in README, based on new catalog org.

Signed-off-by: Divyansh42 <diagrawa@redhat.com>
2020-08-11 12:43:06 +01:00
Chmouel Boudjnah
f5824acdda Bump to pipeline 0.15.1
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-11 11:46:06 +01:00
Chmouel Boudjnah
5250f30ed8 Make git-init image configurable
If the user want to use another image than what we release on gcr.io let give
this option by introducing the param `gitInitImage` to set this up which would
default to the gcr.io image as it was before.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-11 11:46:06 +01:00
Chmouel Boudjnah
3ba53979da Add a helper script to run a task test directly from your cluster
This script will allow the developer to test a task directly withouth having to
send it to the CI and wait that all tasks runs to test it.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-11 10:11:06 +01:00
Kamesh Sampath
cb2b319b20 (fix) Ansible Runner Task
Signed-off-by: Kamesh Sampath <ksampath@redhat.com>
2020-08-10 10:13:05 +01:00
Andrew Bayer
f54dea85cc fix: git-batch-merge should default to depth=0 and subdirectory=""
Also, modify the git-batch-merge test to use actual changes - using
`kelseyhightower/nocode` was cute, but ended up masking the actual
problem that not setting `depth` to `0` by default was making all
merges fail. So let's use our own repo, two merged PRs, and the
ancestor of the first of those PRs.

fixes #477

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
2020-08-07 20:24:05 +01:00
wumaxd
f1715fea2e Only install the requirements when the file is here (same as in #459)
Use variable $(workspaces.source.path) for path (pytest)
Add OWNERS file
Use latest tag for the python images as default

Signed-off-by: wumaxd <wurzer.maxi@gmx.de>
2020-08-06 10:34:04 +01:00
Chmouel Boudjnah
85cac4a020 Fixes for pylint tasks
* Only intall the requirements when the file is here
  (sometime we write pure python script that doesn't need external libs)
* fix installing pylint when needed
* Use variable $(workspaces.source.path) for path

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-06 09:55:04 +01:00
Christie Wilson
87f767178e Remove "end to end" from cluster creation Task
I removed this from the Task name but forgot to update the README!
2020-08-06 08:59:04 +01:00
Christie Wilson
afdb1215cd Remove "lint" checklist item 📝
To make sure the checklist is useful and folks don't ignore it, I think
it's important to keep only the items we need to in there.

If we can enforce something with CI, I suggest we do not include it in
the checklist - if we want to write down guidance somewhere else I think
that totally makes sense, but not in the checklist.

From https://github.com/tektoncd/catalog/issues/387 it looks like
linting should be applied automatically to each PR so I don't think we
need to include this checklist item.
2020-08-06 08:56:04 +01:00
Divyansh42
3c23c446a9 Fix README.md
After https://github.com/tektoncd/catalog/pull/425 we have changed the image,
so we are not using the Dockerfile present at
https://github.com/tektoncd/plumbing/tree/master/tekton/images/skopeo anymore.

Signed-off-by: Divyansh42 <diagrawa@redhat.com>
2020-08-04 13:35:04 +01:00
Piyush Garg
b895a44bba Refactor namespace name to have version
This will refactor the namespace name to have version of task
in namespace name as current logic may create issue in case
of multiple versions running in same namespace as pid will
remain same
2020-08-03 10:25:03 +01:00
Ian Coffey
a59f3ca7ab Add prometheus-gate catalog task to await prometheus range query results 2020-07-31 15:04:03 +01:00
Dan Lorenc
6ae766ddb0 Fixes and improvements to the upload-pypi Task.
I added support for TaskRunResults for this task. This change adds four results:
- the sha256 hash of the bdist package and the sdist package.
- the package name
- the package version

I also fixed a permission issue in the sample - I could not get this to run as a non-root
user (even without my change). The git repo is cloned correctly, but the default user of the
twine image does not have write permissions in this directory.
2020-07-31 10:48:03 +01:00
vinamra28
2998778fed Add task to include code coverage for Python
The following task uses `coverage` dependency in python to measure code coverage of Python projects. This task works along with the pytest so that coverage can be calculated properly.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-31 09:36:03 +01:00
vinamra28
0952b77e18 Refractor kubectl-deploy-pod Task as per TEP
The existing kubectl-deploy-pod task contained all the sample TaskRuns along with the task definition so with this PR I am moving them to their respective directories and also fixed some of the links in the README.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-31 09:12:03 +01:00
vinamra28
4317b3b1ca Fixed Script in Blue Green deployment
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 14:38:02 +01:00
vinamra28
72b4a90727 Add Blue-Green Deployment using K8s
Blue-Green deployment is one of the deployment strategy being used to deploy the newer version of the application on kubernetes keeping the previous version in production so that if
newer version fails then the router can be switched back to the previous version of the deployment without any downtime.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 14:38:02 +01:00
vinamra28
81215d1162 Add task to include YAML linter
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
vinamra28
779755599e Add task to include TypeScript linter
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
vinamra28
8541c78748 Add task to include Shellcheck linter
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
vinamra28
c92ae06f5d Add task to include Ruby Linter
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
vinamra28
4989f9ef3d Add task to include Markdown linter
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
vinamra28
010d365b11 Add Tekton task to include Makefile linter
The task which can be used to perform static analysis on Makefile.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-30 09:01:02 +01:00
Matt Rutkowski
a9cdd92cf8 Update openwhisk-knative pipeline to v1beta1
This commit represents a complete update of the OpenWhisk to Knative pipeline from v1alpha1 level to v1beta1 resource levels. This pipeline also adds conditional logic to support additional "branches" of the pipeline to sequence tasks that can detect and build serverless applications for not only NodeJS (previously the only lang. supported), but also Python and Java. In addition, this pipeline utilizes a workspace for sharing data/state across tasks. Each language branch has its own sample functions with instructions for users to build and test on knative the services they build.
2020-07-30 07:47:02 +01:00
vinamra28
f1317ea1a1 Add Task to Trigger Jenkins Pipeline using Tekton
The following task can be used to trigger an existing Jenkins pipeline from Tekton using the CURL request by providing the required parameters.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-29 16:24:02 +01:00
Napoleon Santana
30b8a95b0f Update kubectl-deploy-pod.yaml 2020-07-28 21:07:02 +01:00
Divyansh42
8bce0c0722 Add AWS ECR Login task
This task will be used to authenticate to Amazon ECR registry.

Signed-off-by: Divyansh42 <diagrawa@redhat.com>
2020-07-28 11:04:02 +01:00
Divyansh42
ec7c4f3836 Parameterize maven task image
Added param for the image in maven task

Signed-off-by: Divyansh42 <diagrawa@redhat.com>
2020-07-27 09:18:01 +01:00
Chmouel Boudjnah
bddd282012 Centralize all the git-clone apply task to a common function
Centralize all the the git-clone apply commands we had around the
pre-apply-task-hook to a central common function.

This will make easier to have the same git-clone task version used everywhere.

Add some documentation about the helper functions along the way.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-07-24 15:00:01 +01:00
Piyush Garg
96d5997d3d Fix pytest and pylint task
This will the fix the pytest and pylint task
which fails if run as non root user
in case of non-root user, it install at
location which is not in PATH of image
so adding the required PATH fix the issue
2020-07-24 11:42:00 +01:00
Christie Wilson
e99060431c Add Tasks to acquire and release boskos resources 🐑
Boskos is a tool that allows one to create a pool of cloud projects
(definitely GCP, I think it supports other providers as well), and
manages acquiring, releasing, and cleaning them between leases.

We use it for Tekton test infrastructure for our end to end tests and
we'd like to use it for our catalog Tasks as well.

This commit adds boskos acquire and release Tasks.

The acquire Task also creates a pod in the running cluster to perform
heartbeating so that boskos knows that the resource is still in use.

The intention of the release Task is that it would be run in a
Pipeline's `finally` clause, however today that would be difficult
because finally Tasks can't yet use the results of other Tasks, but this
functionality is on the way: https://github.com/tektoncd/pipeline/issues/2557

This is part of the work in #373 to create a Pipeline for the catalog.
2020-07-24 11:23:00 +01:00
vinamra28
4e5d8c9244 Add task which can run shell commands on remote Host
The following task can be used to run the shell command (single/multiple) on remote Host by SSHing into the remote machine by providing the required credentials required to
login into that Host and get back the result as output.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-07-24 10:26:00 +01:00
popcor255
152b1bebb2 Add docker-build task
As a user there are some instances where I need to use docker because there is a makefile/script that uses docker in a very niche way. A Tekton Task was added with a docker sidecar.
2020-07-24 10:09:01 +01:00
Christie Wilson
5cf3952aed Add a task for creating a GKE cluster for e2e tests 🧪
As part of #373 I'm continuing to create Tasks that we can use to run
tests for items in the catalog. This Task creates a cluster within a GKE
project and is based on the way we create clusters for the existing end
to end tests we have in Tekton, which are themselves based on Knative,
when are THEMselves based on k8s. These tests all use a tool called
kubetest, which is responsible for invoking boskos (see #408) and
creating a GKE cluster
(https://github.com/kubernetes/test-infra/tree/master/kubetest).

This Task attempts to create a cluster in the same way, which based on the
output in the end to end logs seems to consist of creating the cluster
and setting up a firewall for it.

I'm not sure if this belongs in the catalog itself since it is specific
to our own end to end tests and isn't as generic as other catalog tests,
so if we want to move this into the test directory that seems fine, but
I also think it could be an okay addition to the catalog on its own (esp
if other k8s based projects that test against GKE want to use it.)
2020-07-24 09:41:01 +01:00
Sunil Thaha
b9ddcec4be Make OWNERS own all versions of a resource
Closes: #442
Signed-off-by: Sunil Thaha <sthaha@redhat.com>
2020-07-24 08:46:01 +01:00
Natalie Arellano
c4fbc3379b Update task/buildpacks-phases/0.1/README.md
Co-authored-by: David Freilich <dfreilich@vmware.com>
2020-07-23 21:47:01 +01:00
Natalie Arellano
4c334920ab Comments
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2020-07-23 21:47:01 +01:00
Natalie Arellano
74c473c7c6 Don't parameterize home override directory
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2020-07-23 21:47:01 +01:00
Natalie Arellano
e52d3326cd Add docs comment
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2020-07-23 21:47:01 +01:00
Natalie Arellano
237d24c44d Introduce better security for buildpacks-phases task
- Override /tekton/home for the detect and build phases of the lifecycle to hide registry credentials from buildpack code.
- Run analyze, restore, and export in the lifecycle image published by buildpacksio to hide registry credentials from untrusted builders.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2020-07-23 21:47:01 +01:00
Piyush Garg
a72785d783 Fix kythe-go task on restricted environment
This will fix the task to run on restricted environments
as this task do some chown operations and fails on
environments like opneshift
2020-07-23 17:03:01 +01:00
Maximilian Wurzer
a0e2d1eb4d Add pylint and pytest task 2020-07-23 09:47:00 +01:00
Chanseok Oh
f5a4936531 Make Jib tasks future-proof with home changes
- Set HOME env to /workspace
- Use $HOME for "home" wherever possible
- Gradle: mount empty dir at ~/.gradle to make it globally writable
- Maven: script to `script:` to use "$HOME" variable
2020-07-22 19:59:00 +01:00
David Freilich
f1e386419c Rename buildpacks-separate-phases to buildpacks-phases, to reduce length
Additionally, remove commented out references to ADDITIONAL_TAGS; that will be added as a separate issue.

Signed-off-by: David Freilich <dfreilich@vmware.com>
2020-07-22 08:22:00 +01:00
David Freilich
91fedc066b Update Buildpacks task to use Creator binary, in place of calling individual phases
With the release of Platform API 0.3 (implemented in github.com/buildpacks/lifecycle v0.7.0), there is a creator binary that simplifies the CNB experience; calling it runs all of the individual lifecycle phases, and minimizes the number of separate containers needed for the process. As such, we moved the buildpacks task to use it.

At the same time, it is also helpful, in some scenarios, to run the individual phases; it allows for greater control of secrets, amongst other things. As such, we moved the original task to buildpacks-separate-phases to allow users the choice.

This commit also updates the READMEs, making them a bit clearer about what CNBs are and what the tasks do, as well as adding in the Paketo builders to the example builders.

Signed-off-by: David Freilich <dfreilich@vmware.com>
2020-07-22 08:22:00 +01:00
David Freilich
fc3c4497f9 Rename buildpacks-v3 task to buildpacks
The suffix v3 was a piece of buildpacks history, stemming from the initial start of the buildpacks concept, but isn't relevant to current consumers of the buildpacks task. To simplify it, and to fit with other task styles, we are removing v3

Additionally, we are updating the list of suggested builders, to reflect the current status of pack builders. NOTE: Paketo builders currently have a bug and don't work in Tekton, and until that issue is resolved, we aren't adding them in the list.

Signed-off-by: David Freilich <dfreilich@vmware.com>
2020-07-22 08:22:00 +01:00