Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions vars/closurePipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
def call(body) {
def pipelineParams= [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams) {

pipeline {
agent { label "master" }
Expand All @@ -24,7 +20,7 @@ def call(body) {
}
stage("SonarQube Scan") {
when {
equals expected: "toomuch", actual: pipelineParams?.sonar?.sing
equals expected: "toomuch", actual: "${pipelineParams.sonar.sing}"
}
steps {
echo 'scan'
Expand Down
11 changes: 3 additions & 8 deletions vars/easyPipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
def call(String agentLabel,body) {

def pipelineParams= [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(String agentLabel,Map pipelineParams) {

pipeline {
agent none
Expand All @@ -15,7 +10,7 @@ def call(String agentLabel,body) {
echo "${agentLabel}"
echo "${pipelineParams.osConfiguration}"
echo "${pipelineParams.osConfiguration.OS_VERSION}"
echo "${pipelineParams.osConfiguration.DIR_TYPE}"
echo "${pipelineParams.osConfiguration.DIR_TYPE}"
}
}
stage("Prepare Build Environment") {
Expand Down Expand Up @@ -75,7 +70,7 @@ def call(String agentLabel,body) {
// }
// echo "Webhook called with data: ${data}"
// }
//}
//}
}
//post {
// always {
Expand Down
6 changes: 1 addition & 5 deletions vars/fooProject.groovy
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
def call(body) {
def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams=[:]) {

println(pipelineParams)
}
6 changes: 1 addition & 5 deletions vars/heartQ.groovy
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
def call(body) {
def pipelineParams= [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams) {

pipeline {
agent {
Expand Down
9 changes: 2 additions & 7 deletions vars/indigenous-cloudbees.groovy
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
def call(body) {

def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams) {

def autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
def runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
Expand Down Expand Up @@ -175,4 +170,4 @@ def call(body) {
}
}
}
}
}
16 changes: 6 additions & 10 deletions vars/indigenous.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
def call(body) {

def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()

def autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
def runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
def notifyEmail = "${pipelineParams.notifyEmail}"
def call(Map pipelineParams) {

pipeline {
agent none
Expand All @@ -17,6 +8,11 @@ def call(body) {
skipDefaultCheckout()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
environment {
autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
notifyEmail = "${pipelineParams.notifyEmail}"
}
stages {
stage("Prepare Build Environment") {
agent { label "linux" }
Expand Down
26 changes: 11 additions & 15 deletions vars/indigenousPod.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
def call(body) {

def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()

def autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
def runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
def notifyEmail = "${pipelineParams.notifyEmail}"
def call(Map pipelineParams) {

pipeline {
agent {
Expand All @@ -34,22 +25,22 @@ def call(body) {
command:
- cat
tty: true
- name: artifactory
- name: artifactory
image: gcc:8.1.0
command:
- cat
tty: true
- name: deployer
- name: deployer
image: gcc:8.1.0
command:
- cat
tty: true
- name: guismoketest
- name: guismoketest
image: gcc:8.1.0
command:
- cat
tty: true
- name: servicesmoketest
- name: servicesmoketest
image: gcc:8.1.0
command:
- cat
Expand All @@ -61,6 +52,11 @@ def call(body) {
buildDiscarder(logRotator(numToKeepStr: '5'))
durabilityHint('PERFORMANCE_OPTIMIZED')
}
environment {
autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
notifyEmail = "${pipelineParams.notifyEmail}"
}
stages {
stage("Prepare Build Environment") {
steps {
Expand Down Expand Up @@ -248,4 +244,4 @@ def call(body) {
}
}
}
}
}
7 changes: 1 addition & 6 deletions vars/javaMaven.groovy
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
def call(body) {

def pipelineParams= [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams) {

// this found at https://stackoverflow.com/a/49132694
def agentLabel = null
Expand Down
9 changes: 2 additions & 7 deletions vars/pipelineLoadYamlFile.groovy
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
def call(body) {

def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams=[:]) {

pipeline {
agent {
Expand All @@ -29,4 +24,4 @@ def call(body) {
}
}
}
}
}
6 changes: 3 additions & 3 deletions vars/superEasyPipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
def call(body) {
easyPipeline("master",body)
}
def call(Map pipelineParams) {
easyPipeline("master",pipelineParams)
}
13 changes: 4 additions & 9 deletions vars/wip.groovy
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
def call(body) {

def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
def call(Map pipelineParams=[:]) {

echo "${pipelineParams}"

def autoDeploy = getValueOrDefault("${pipelineParams.autoDeploy}","n")
echo "autoDeploy = ${autoDeploy}"

def runSmokeTests = getValueOrDefault("${pipelineParams.runSmokeTests}","n")
echo "runSmokeTests = ${runSmokeTests}"

def notifyEmail = getValueOrDefault("${pipelineParams.notifyEmail}","a@a.com")
echo "notifyEmail = ${notifyEmail}"

pipeline {
agent any
stages {
Expand Down