Giter Site home page Giter Site logo

jenkins-workflow-libs-httpclient-example's Introduction

Jenkins Shared Libraries Example

An example of extending Jenkins Pipelines with a Groovy HTTPClient for making REST calls.

Usage

Refer to the Jenkins Pipeline docs for setup instructions, but basically, this repo's contents should be added to ${JENKINS_HOME}/workflow-libs. The gradle related files are merely for development purposes.

With the src/ and vars/ directories added to that folder, you can use the testingStuff global in your Pipeline job definitions, e.g.:

node() {
    testingStuff.print_ghibli_films()
    String slackUrl = 'https://hooks.slack.com/services/use/real/hookurl'
    Map<?, ?> postBody = ["text": "greetings from jenkins", channel: "#random"]
    testingStuff.notifySlack(slackUrl, postBody)
}

would print out a list of Studio Ghibli films in your build log, then post a message to your Slack's #random channel.

jenkins-workflow-libs-httpclient-example's People

Stargazers

Oleksiy Pikalo avatar  avatar Richard Lewis avatar

Watchers

James Cloos avatar

Forkers

ducn

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.