From cfb6f4c125c1008d3831651cb34cc62c3339cc79 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sat, 3 Oct 2020 02:11:40 +0200 Subject: [PATCH] Add test jenkinsfile --- Jenkinsfile | 3 +++ seedjob.groovy | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 seedjob.groovy diff --git a/Jenkinsfile b/Jenkinsfile index 23b0bdc..fb7e343 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,6 @@ +#!/usr/bin/env groovy +// see https://jenkins.io/doc/book/pipeline/syntax/ + pipeline { agent { docker { image 'maven:3.6.3' } } tools { diff --git a/seedjob.groovy b/seedjob.groovy new file mode 100644 index 0000000..3e7302d --- /dev/null +++ b/seedjob.groovy @@ -0,0 +1,22 @@ +#!/usr/bin/env groovy +// see https://jenkinsci.github.io/job-dsl-plugin/ and https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob + +pipelineJob("my-maven-lib") { + displayName("My Maven Lib") + definition { + cpsScm { + scm { + git { + remote { + url("...") + branch("*/master") + } + extensions { + localBranch("master") + } + } + } + scriptPath("Jenkinsfile") + } + } +}