Created
October 26, 2017 15:23
-
-
Save brianv0/1cdda70ae6ce61e2a10fe457988ecb4d to your computer and use it in GitHub Desktop.
fermilat-webhook-scratch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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