Coder Social home page Coder Social logo

tekton-catalog's Introduction

Open-Toolchain Tekton Catalog

Catalog of Tekton Tasks usable in Continuous Delivery Tekton Pipelines

Notes:

Tasks

Cloud Foundry related tasks

  • cf-deploy-app: This task allows to perform a deployment of a Cloud Foundry application using ibmcloud cf commands.

IBM Cloud Container Registry related tasks

IBM Cloud Code Risk Analyzer scanners related tasks

  • cra-discovery: This task accesses various source artifacts from the repository and performs deep discovery to identify all dependencies (including transitive dependencies).
  • cra-bom: This task creates a Bill-of-Material (BoM) for a given repository that captures pedigree of all the dependencies and is collected at different granularities.
  • cra-cis-check: This task runs configuration checks on kubernetes deployment manifests.
  • cra-vulnerability-remediation: This task finds out vulnerabilities for all application package dependencies, container base images and os packages.
  • cra-comm-editor: This task creates comments on Pull Requests and opens issues regarding bill of material and discovered vunerabilities.
  • cra-terraform-scan: ## This task scans ibm-terraform-provider files for compliance issues.

IBM Cloud Devops Insights related tasks

Git related tasks

IBM Cloud Kubernetes Service related tasks

Linter related tasks

Signing - Docker Content Trust related tasks

Slack related tasks

SonarQube related tasks

Tester related tasks

Open-Toolchain related tasks

Breaking Changes

when moving from tag "tekton_pipeline0.10.1"

  • These tasks are using kebab-case style for EVERY parameters names. So parameter pathToContext (in previous versions of the tasks) has been renamed as path-to-context, parameter clusterName has been renamed to cluster-name and so on...

  • communication folder has been renamed to slack folder

  • Some tasks has been renamed to match the following name format <category alias>-<task> where category alias is depending on the folder containing the tasks:

    Folder/Category Category alias
    cloudfoundry cf
    container-registry icr
    devops-insights doi
    git git
    kubernetes-service iks
    slack slack
    toolchain toolchain

    The task new names are listed in the following table:

    Folder Old task name New task name
    container-registry containerize-task icr-containerize
    container-registry cr-build-task icr-cr-build
    container-registry execute-in-dind-task icr-execute-in-dind
    container-registry execute-in-dind-cluster-task icr-execute-in-dind-cluster
    container-registry vulnerability-advisor-task icr-check-va-scan
    git clone-repo-task git-clone-repo
    git set-commit-status git-set-commit-status
    kubernetes-service fetch-iks-cluster-config iks-fetch-config
    kubernetes-service kubernetes-contextual-execution iks-contextual-execution
    slack post-slack slack-post-message
  • Tasks that use workspace(s) may have changed the expected workspace name. Here is the list of the breaking changes for the expected workspace name

    Folder Task Old workspace name New workspace name Description
    container-registry icr-containerize workspace source A workspace containing the source (Dockerfile, Docker context) to create the image
    container-registry icr-cr-build workspace source A workspace containing the source (Dockerfile, Docker context) to create the image
    container-registry icr-execute-in-dind workspace source A workspace containing the source (Dockerfile, Docker context) to create the image
    container-registry icr-execute-in-dind-cluster workspace source A workspace containing the source (Dockerfile, Docker context) to create the image
    container-registry icr-check-va-scan workspace artifacts Workspace that may contain image information and will have the va report from the VA scan after this task exection
    git git-clone-repo workspace output Workspace where the git repository will be cloned into
    git git-set-commit-status workspace artifacts Workspace that may contain git repository information (ie build.properties). Should be marked as optional when Tekton will permit it
    kubernetes-service iks-fetch-config workspace cluster-configuration A workspace where the kubernetes cluster config is exported
    kubernetes-service iks-contextual-execution workspace cluster-configuration A workspace that contain the kubectl cluster config to be used

when moving from tag "tekton_pipeline0.10.1" and/or branch "tkn_v1beta1"

  • Tasks that are expecting a secret to retrieve apikey and/or secret values have been updated to use the default secret secure-properties injected by Continuous Delivery Tekton Pipeline support. The updated tasks are:

    • icr-check-va-scan
    • icr-containerize
    • icr-cr-build
    • icr-execute-in-dind
    • icr-execute-in-dind-cluster
    • git-clone-repo
    • git-set-commit-status
    • iks-fetch-config

    Note: As a reminder, in previous version (before secure-properties injection by CD tekton support), the default was set to cd-secret

Criteria for Code Submission

To ensure code quality, protected branches will be enabled soon, and every PR that is to be merged to master will run CI tasks for code quality. These could (and should) be set up for local development environments as well.

Code quality checks currently enabled:

  • yaml lint - using yamllint-rules.yaml as configuration file: yamllint --config-file yamllint-rules.yaml .
  • tekton task lint: tekton-lint '**/*.yaml'
  • Tasks definition validation: check_tasks.sh

tekton-catalog's People

Contributors

ashishth09 avatar celek avatar chuckcox avatar darosale avatar davidlopezibm avatar docwhat avatar dravos avatar dsraj1 avatar ejodet avatar fadycopty avatar hermanba avatar huayuenh avatar jauninb avatar jparra5 avatar ljdavila avatar ljdavila18 avatar madbence avatar maire-kehoe avatar mbwhite avatar nadgowdas avatar othomann avatar padraic-edwards avatar skaegi avatar themcq avatar uparulekar avatar youming-lin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tekton-catalog's Issues

Git clones in response to github tag creation fails

Scenario:
Creating a release/tag in github, results in a git reference of refs/tags/v0.0.2

Issue:
With the git clone task, the references are checked for the format refs/heads/xxx but not tags. Therefore any tagged release fails.

Will create a PR :-)

Fix README in container-registry

https://github.com/open-toolchain/tekton-catalog/blob/master/container-registry/sample/README.md has these duplicate lines:

It also contains a buildkit-no-resources EventListener definition which is the providing the same example but without the needs to define PipelineResources for image as it uses the task's parameter image-url to provide the information.

It also contains a buildkit-no-resources EventListener definition which is the providing the same example but without the needs to define PipelineResources for image as it uses the task's parameter image-url to provide the information.

Most likely you wanted to document buildkit-no-resources and buildkit-no-image-url, but the latter is missing.

Add documentation or link on how to use the catalog

The README does not contain any instructions on how to (re)use the assets in this catalog. It would be great to have at least some links to outside documentation on how to install and use an asset.

The linked Continuous Delivery service and its Tekton section do not have any discussion of this catalog.

Containerize task fails using IBM Managed Shared Workers (public worker)

When using containerize task in a pipeline to create docker image - https://github.com/open-toolchain/tekton-catalog/blob/master/container-registry/task-containerize.yaml - , recently we're receiving this error:

error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to mount /home/user/.local/tmp/buildkit-mount136740543: [{Type:bind Source:/tekton/home/.local/share/buildkit/runc-native/snapshots/snapshots/1 Options:[rbind ro]}]: operation not permitte

task-deploy-to-kubernetes fails due to not being authenticated to OpenShift cluster

I followed the tutorial https://www.ibm.com/cloud/architecture/tutorials/develop-kubernetes-app-with-code-risk-analyzer, but pipeline fails on deploy-to-kubernetes and check-health steps due to not being authenticated to cluster, with the following messages:

Check ability to get a kubernetes deployment in test-proj using kubectl CLI
error: EOF

After I added some additional testing commands I noticed that user is not authenticated to cluster:

++ echo 'Check ability to create a kubernetes deployment in test-proj using kubectl CLI #### TESTING'
++ oc projects
Check ability to create a kubernetes deployment in test-proj using kubectl CLI #### TESTING
Error from server (Forbidden): namespaces is forbidden: User "system:anonymous" cannot list resource "namespaces" in API group "" at the cluster scope

I had to add scripts from commons repo to my app and change them to include the following code that authenticates to OCP, which I took from your other tutorial:

ibmcloud ks cluster config -c "${PIPELINE_KUBERNETES_CLUSTER_NAME}";
if which oc > /dev/null && ibmcloud ks cluster get -c "${PIPELINE_KUBERNETES_CLUSTER_NAME}" --json | jq -e '.type=="openshift"' > /dev/null; then oc login -u apikey -p "${PIPELINE_BLUEMIX_API_KEY}" ; fi;

So looks like task definition is missing proper authentication to cluster that it is deploying to....

[suggestion] Run tekton-lint on commits and PRs

May I suggestion running tekton-lint on every commit and PR?

If could also be used for branch protection.

You can use this to run it via docker:

# using docker
docker run \
    --rm \
    --tty \
    "--env=TERM=${TERM}" \
    "--volume=${PWD}:/src:ro" \
    "--workdir=/src" \
    node \
    npx tekton-lint --format=stylish "**/*.yaml"

or if you have node installed:

# using node 12+
npx tekton-lint --format=stylish "**/*.yaml"

I can submit a PR for a script/lint and/or for the CI system of your choice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.