Giter VIP home page Giter VIP logo

jenkins-pipes-helloworld's Introduction

Jenkins Pipes HelloWorld

A minimal and stupid "helloworld" example project for the Jenkins Pipes demo:

  • the Jenkinsfile describes HOW to build this project in Pipeline-DSL

How it works

This example will be built on our jenkins-pipes-infra because in jenkins-pipes-jobs we configured to build all master and feature/* branches of this repo.

The Jenkinsfile in here describes HOW this project is built, in terms of the individual stages that make up the build pipeline and what happens within them:

node {
  try {
    stage('checkout') {
      checkout scm
    }
    stage('prepare') {
      sh "git clean -fdx"
    }
    stage('compile') {
      echo "nothing to compile for hello.sh..."
    }
    stage('test') {
      sh "./test_hello.sh"
    }
    stage('package') {
      sh "tar -cvzf hello.tar.gz hello.sh"
    }
    stage('publish') {
      echo "uploading package..."
    }
  } finally {
    stage('cleanup') {
      echo "doing some cleanup..."
    }
  }
}

The master branch build should succeed:

image

The feature/make-it-fail branch shows how a build failure looks like:

image

Where to go from here?

Now that you have a minimal example running, here are some ideas on how to dig further:

  • go and explore the Pipeline-DSL and Steps Reference
  • add email notifications on success / failure
  • create a similar helloworld example in your favorite programming language
  • use node labels to run your builds on specific nodes only
  • try modeling more complex pipelines with parallel execution etc
  • ...

jenkins-pipes-helloworld's People

Contributors

chids-gs avatar tknerr 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.