GithubHelp home page GithubHelp logo

gating-core-plugin's Introduction

Jenkins Gating

Build Status Contributors Jenkins Plugin GitHub release Jenkins Plugin Installs

Introduction

Pause builds when required infrastructure is not ready for the build to run.

The plugin provides reusable components for Jenkins builds to either wait in queue or pause a Jenkins pipeline when the infrastructure is unavailable. Backend plugins are responsible for submitting the update data, so they can be consumed through this plugin.

Note that this plugin alone does not monitor any resources, nor it pulls resource status from anywhere. It relies on those backend plugins to do so.

Getting started

Install this plugin and necessary backend plugins to read the status information from the sources that you use to track infrastructure health. Once such plugin(s) are configured and start to provide the data to Jenkins Gating, builds can utilize the data.

See what metrics are available to Jenkins Gating at JENKINS_URL/gating/.

Holding builds in queue

Add "Gating requirement" property for your jobs and select which of the resources needs to be up in order for the build to be scheduled. Then everytime the build gets scheduled, it will only leave the queue when all the resources are up.

Configuring via Job DSL

job('my-job') {
  properties {
    requireResources {
      resources(['my-service', 'my-other-service'])
    }
    // ...
  }
  // ...
}

Pausing pipeline execution

Alternatively, part of the build can require certain resources using a pipeline block-step:

// ... pipeline code ...
requireResources(resources: ['my-service', 'my-other-service']) {
  echo 'Executed only when both the services are up'
}
// ... more pipeline code ...

The body of the block will not be executed until the the resources are available.

LICENSE

Licensed under MIT, see LICENSE

gating-core-plugin's People

Contributors

npotluri-rh avatar olivergondza avatar zbynek avatar

Watchers

 avatar  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.