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
def commitHashForBuild(build) { | |
def scmAction = build?.actions.find { action -> action instanceof jenkins.scm.api.SCMRevisionAction } | |
if (scmAction?.revision instanceof org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision) { | |
return scmAction?.revision?.pullHash | |
} else if (scmAction?.revision instanceof jenkins.plugins.git.AbstractGitSCMSource$SCMRevisionImpl) { | |
return scmAction?.revision?.hash | |
} else { | |
error("Build doesn't contain revision information. Do you run this from GitHub organization folder?") | |
} | |
} |
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
#!/bin/bash | |
# | |
# | |
# Script combines given JUnit XML files into one. | |
# | |
# Script assumes that file begins with XML header. | |
# Script will copy content between <testsuite> tags | |
# to new file with XML header and <testsuites> tags. | |
# Script will not affect original files, but it will | |
# overwrite output file contents. Script searches all |