Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Job generation with template engine for Jenkins pipelines

License

Notifications You must be signed in to change notification settings

SAP-archive/jenkins-pipelayer

Repository files navigation

Jenkins Pipelayer

Pipeline job generation made easy

Description

This Jenkins Library introduces :

  • a new way to import jobs programmatically into jenkins. Basically it is a parser that converts Declarative Pipelines to JobDSL Declarative Pipelines This embed a template engine to generage multiple jobs from one Jenkinsfile template (or more) parametarized by property files
  • a clever way to reduce drastically the numbers of calls made by github by your pipelines this library automates the process of storing and updating a shared library on jenkins filesystem

Use cases

  • Reduce the number of jobs to maintain
  • develop pipelines without the need configure jobs on jenkins
  • Handle multiple microservices and their jenkinsfile from one repo. Meta repository is handy when the project you work on has too many microservices and was not designed with deployment in mind.

Usage

Import the library to Jenkins

From the Configure System administration page, add the library https://github.com/SAP/jenkins-pipelayer.git, name it jenkins-pipelayer for convenience

Have a look at USAGE.md for a detailed procedure of the import.

Import the library in a Jenkins job

@Library('jenkins-pipelayer')_

Use the library

The library adds the folowing steps to Jenkins pipeline dsl:

  • generateJobs => Parse pipeline dsl, translate it to jobdsl and create a jenkins job
  • approveScripts => this step approves jobs generated from templates on jenkins
  • libToFs => particularly useful to reduce the number of queries to github

Have a look at USAGE.md for a description of the steps introduced by Jenkins Pipelayer and a better explanation of the template engine.

We made samples to help you understand how to use the library. Please check out the sample folder

Contribute

Install the requirements. Run lint and tests with command:

gradlew codenarcMain test

Have a look at our Contribution Guidelines, there is more info there.

License

Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the LICENSE file.

About

Job generation with template engine for Jenkins pipelines

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages