Skip to content

Instantly share code, notes, and snippets.

@brianv0
Created October 26, 2017 15:23
Show Gist options
  • Save brianv0/1cdda70ae6ce61e2a10fe457988ecb4d to your computer and use it in GitHub Desktop.
Save brianv0/1cdda70ae6ce61e2a10fe457988ecb4d to your computer and use it in GitHub Desktop.
fermilat-webhook-scratch
import hudson.model.*
def ciJobs = ['ScineceTools', "GlastRelease"]
properties([
parameters([
stringParam(
description: 'Github Payload',
name: 'payload'
)
])
])
stage('Parse Webhook') {
node("glast"){
echo "hello world 0"
echo "$env.payload"
def payloadObject = readJSON text: payload
login = payloadObject.sender.login
for(job in ciJobs){
sh """(git clone [email protected]:fermi-lat/{job}.git || cd {job}) && \
git fetch
"""
}
sh 'source /scratch/bvan/repoman-env/bin/activate && repoman checkout --force --master $repoman_package $repoman_ref'
echo "$login initiated build"
}
}
stage('Trigger Builds') {
echo "hello world 1"
// sh 'make'
}
@NonCPS
def slurpJson(String data) {
def slurper = new groovy.json.JsonSlurper()
slurper.parseText(data)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment