• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pipelines-as-Code for Tekton

Pipelines-as-Code

Container Repository on GHC codecov Go Report Card E2E Tests

Pipelines-as-Code -- An opinionated CI based on OpenShift Pipelines / Tekton.

Full documentation for the stable version is available from https://pipelinesascode.com Documentation for the development branch is available here

Introduction

Pipelines-as-Code let you use the Pipelines-as-Code flow directly with Tekton and OpenShift Pipelines.

The goal of Pipelines-as-Code is to let you define your Tekton templates inside your source code repository and have the pipeline run and report the status of the execution when triggered by a Pull Request or a Push.

Pipelines-as-Code features:

  • Pull-request status support: When iterating over a Pull Request, status and control is done on the platform.

  • GitHub Checks API support to set the status of a PipelineRun including rechecks

  • GitHub Pull Request and Commit event support

  • Pull-request actions in comments such as /retest

  • Git events filtering and support for separate pipelines for each event

  • Automatic Task resolution in Pipelines (local Tasks, Tekton Hub and remote URLs)

  • Efficient use of GitHub blobs and objects API for retrieving configurations

  • ACL over a GitHub organization or with a Prow style OWNER file.

  • tkn-pac plug-in for Tekton CLI for managing pipelines-as-code repositories and bootstrapping.

  • Gitlab, Bitbucket Server, Bitbucket Cloud and GitHub through Webhook support.

Installation Guide

The easiest way to get started is to use the tkn pac CLI and its bootstrap command.

Download and install first the tkn-pac CLI following these instructions.

Connected to your cluster execute the command :

-$ tkn pac bootstrap

and follow the questions and installation methods which will install Pipelines-as-Code on cluster and help you create a GitHub Application.

feel free to look over the --help to see the different options on how to install for example on GitHub Enterprise.

This getting started video will guide you thought the tkn-pac bootstrap flow using Kind :

Getting started to Pipelines-as-Code

For more details on the different installation method please follow this document for installing Pipelines-as-Code on OpenShift.

Getting Started

The flow for using pipelines as code generally begins with admin installing the Pipelines-as-Code infrastructure, creating a GitHub App and sharing the GitHub App URL across the organization for app teams to enable the app on their GitHub repositories.

Start creating a GitHub repository by going to this URL https://github.com/new, you will need to provide a name (eg: pac-demo) and check the "[ ] Add a README file" box before pressing the "Create Repository" button.

You are now able to enable the Pipelines-as-Code GitHub Application as created by the Admin onto your new repository by following this guide here.

Once you have enabled your GitHub App for your GitHub repository, you can use the Tekton CLI pac plug-in to bootstrap pipelines as code:

$ git clone https://github.com/youruser/pac-demo
$ cd pac-demo
$ tkn pac create repository
? Enter the Git repository url containing the pipelines (default: https://github.com/youruser/pac-demo):
? Please enter the namespace where the pipeline should run (default: pac-demo):
! Namespace pac-demo is not found
? Would you like me to create the namespace pac-demo? (Y/n)
? Would you like me to create the namespace pac-demo? Yes
✓ Repository youruser-pac-demo has been created in pac-demo namespace
✓ A basic template has been created in .tekton/pipelinerun.yaml, feel free to customize it.
ℹ You can test your pipeline manually with: tkn-pac resolve -f .tekton/pipelinerun.yaml | kubectl create -f-
🚀 You can use the command "tkn pac setup" to setup a repository with webhook

The above command would create a Repository CRD in your demo namespace which is used to determine where the PipelineRuns for your GitHub repository should run. It also generates an example pipeline in the .tekton folder. Commit and push the pipeline to your repo to start using pipelines as code.

Note that even if installing with GitHub application is the preferred installation method, Pipeline As Code supports other methods :

  • GitHub direct Webhook
  • Gitlab public and private instances.
  • Bitbucket Cloud
  • Bitbucket Server

You can use the command tkn pac webhook to help you update webhooks on your repository. See the INSTALL guide for more details on each install method.

Usage Guide

The usage guide available here offer a comprehensive documentation on how to use and configure Pipeline As Code.

Contributing

We ❤️ our contributors!

If you want to help and contribute to the pipelines-as-code project, you can see the documentation here to get started: https://pipelinesascode.com/dev/ (and thank you).

Getting in touch

There are several ways to communicate with us:

Videos/Blog Posts

More Repositories

1

pipeline-service

SaaS for Tekton Pipelines
Shell
23
star
2

release-tests

Validation of OpenShift Pipeline releases
Go
10
star
3

tektoncd-catalog

Catalog of Tekton resources (Tasks, Pipelines, …) by Red Hat
Shell
7
star
4

tekton-caches

Tools (and Task/StepAction) to manage cached content within Tekton
Go
7
star
5

tekton-task-group

Tekton Custom Task that allows to group Task together as a Task
Go
6
star
6

opc

A CLI for interacting with OpenShift Pipelines!
Go
5
star
7

vote-api

Go
4
star
8

cumin

jira utils
Go
4
star
9

performance

Shell
3
star
10

toolbox

Set of "random" tools developed by the openshift-pipelines team
Shell
3
star
11

manual-approval-gate

OpenShift Pipelines manual approval custom task
Go
3
star
12

vote-ui

JavaScript
3
star
13

must-gather

Openshift must-gather image for Pipeline
Python
3
star
14

docs

Unofficial documentation for OpenShift Pipelines maintainer by the engineer
SCSS
3
star
15

console-plugin

OpenShift Pipelines (and Tekton) OpenShift console dynamic plugin
TypeScript
2
star
16

plumbing

OpenShift Pipelines Plumbing
Shell
2
star
17

pipeline-service-workspace-controller

KCP controller for configuring Pipeline Service in a workspace
Go
2
star
18

nightly-ci-kicks

Repository to kicks the nightly CI from every night
Python
1
star
19

pipeline-service-exporter

Prometheus exporter for Pipeline Service metrics
Go
1
star
20

operator-tooling

Some tooling around OpenShift Pipelines operator
Go
1
star
21

homebrew-pipelines-as-code

Homebrew repository for Pipelines as Code
Ruby
1
star
22

operator

(PoC)
Go
1
star
23

enhancements

Enhancements Tracking and Backlog
Shell
1
star
24

setup-tektoncd-cli

GitHub Action to install Tekton's CLI (tkn)
Shell
1
star