De My Limbic Wiki
Aller à : navigation, rechercher


  • Pipeline

Continuous Delivery Pipeline

Jenkins have created the concept of "Pipeline As Code"


Jenkinsfile (Declarative Pipeline)
pipeline {
    agent any

    stages {
        stage('Build') {
            steps {
                echo 'Building..'
        stage('Test') {
            steps {
                echo 'Testing..'
        stage('Deploy') {
            steps {
                echo 'Deploying....'


Pipeline Syntax

In shell, it is not specific to the execution system We can use methods like isUnix() to check on wich system it is running and exec a specific shell foreach Allowing user to generate pipeline configuration code from jenkins UI

  • Credentials

Declarative Pipelines

  • contains directive or steps
  • common directives : triggers parameters, tools, stages


  • it is possible to exec an sh file from distant repository

Good to Know

try{}catch(NullPointerException e){ echo "UNSTABLE"; }
  • 4 steps jenkins: checkout, compile, run the tests, package