Giter Site home page Giter Site logo

vkritsimas / pipelines-as-code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift-pipelines/pipelines-as-code

0.0 0.0 0.0 13.3 MB

Pipelines as Code

License: Apache License 2.0

Makefile 0.58% Go 92.37% Shell 4.25% Dockerfile 0.11% Python 2.69%

pipelines-as-code's Introduction

This documentation refers to the main developement branch, the documentation for the released version is here

Pipelines as Code

Container Repository on Quay codecov Go Report Card

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

Introduction

Pipelines as Code let you use the Pipelines as Code flow directly with 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 via a Prow style OWNER file.

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

  • Bitbucket Server, Bitbucket Cloud and Github 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 launch 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 Enteprise.

This 10 minute video will guide you thought the tkn-pac bootstrap flow :

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.

In order to enable the GitHub App provided by admin on your Git repository as documented here. Otherwise you can go to the Settings > Applications and then click on Configure button near the GitHub App you had created. In the Repository access section, select the repositories that you want to enable and have access to Pipelines-as-code.

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

$ git clone https://github.com/siamaksade/pipeline-as-code-demo
$ cd pipeline-as-code-demo
$ tkn pac repository create

? Enter the namespace where the pipeline should run (default: pipelines-as-code):  demo
? Enter the Git repository url containing the pipelines (default: https://github.com/siamaksade/pipeline-as-code-demo):
? Enter the target GIT branch (default: main):
? Enter the Git event type for triggering the pipeline:  pull_request
! Namespace demo is not created yet
? Would you like me to create the namespace demo? Yes
✓ Repository pipeline-as-code-demo-pull-request has been created in demo namespace
? Would you like me to create a basic PipelineRun file into the file .tekton/pull_request.yaml ? True
✓ A basic template has been created in /Users/ssadeghi/Projects/pipelines/pac-demo/.tekton/pull_request.yaml, feel free to customize it.
ℹ You can test your pipeline manually with : tkn-pac resolve -f .tekton/pull_request.yaml | kubectl create -f-
ℹ Don't forget to install the GitHub application into your repo https://github.com/siamaksade/pipeline-as-code-demo
✓ and we are done! enjoy :)))

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 Github application is the preferred method, Pipeline As Code supports Github Webhook and Bitbucket Server/Cloud as well, see the INSTALL guide for reference

Usage Guide

The usage guide here offer a comprehenive documentatiuon on how to use and configure Pipeline As Code.

A walkthought video is available here.

Videos/Blog Posts

pipelines-as-code's People

Contributors

chmouel avatar sbose78 avatar siamaksade avatar vdemeester avatar

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.