sncf-connect-tech / hesperides-jenkins-lib

Shared lib for Jenkins pipelines to interact with Hesperides
GNU General Public License v3.0
3 stars 13 forks source link
groovy hesperides http jenkins-pipeline

License: GPL v3

This is a Groovy shared lib for Jenkins 2 pipelines, but also useable as a Groovy command-line script.

It lets you interact with Hesperides. It provides some high level features over the bare HTTP REST API:

This project is actively maintained. A detailed releases changelog is available here: CHANGELOG.md

A documentation for the exposed Groovy functions is available here: https://voyages-sncf-technologies.github.io/hesperides-jenkins-lib/

Summary

Installation

In "Manage Jenkins > Configure System" aka /jenkins/configure, adds the git@... URL to this repo in Global Pipeline Libraries, and ticks the "load implicitly" checkbox. You can use either the master branch to use the latest version, or specify a tag to ensure more stability.

You will also need to install the http_request Jenkins plugin from its .hpi.

Usage

Jenkins pipeline

cf. examples/Jenkinsfile & vars/*.txt documentation files for examples.

Note: to check your Jenkinsfiles syntax, use a linter ! cf. https://github.com/Lucas-C/pre-commit-hooks#other-useful-local-hooks

CLI script for the standard Groovy interpreter

cf. examples/createPlatform.groovy

Contributing / Development

cf. CONTRIBUTING.md