Skip to content

jenkins scripted pipeline

ghdrako edited this page Jan 20, 2023 · 2 revisions

Seed job

https://github.com/bitwiseman/jenkins-job-dsl-seed-all-demo

A scripted pipeline is a groovy-based DSL. It provides greater flexibility and scalability for Jenkins users than the Declarative pipeline.

#!/usr/bin/env groovy

Jenkins scripted pipeline has the following skeleton:

node {
	stage (‘Build’ {
		//...
	}
	stage (‘Test’) {
		//...
	}
}

declarative pipeline can be written by using more elements, as shown next:

pipeline {
	agent any 
	stages {
stage(‘Build’) {
	steps {
		//…
	}
	}
	stage (‘Test’) {
	steps {
		//…
	}
	}
}

Test

Clone this wiki locally