rombert commented on code in PR #8:
URL:
https://github.com/apache/sling-tooling-jenkins/pull/8#discussion_r897974002
##########
vars/slingOsgiBundleBuild.groovy:
##########
@@ -122,21 +161,117 @@ def defineStage(def globalConfig, def jobConfig, def
jdkVersion, def isReference
if ( isReferenceStage && jobConfig.archivePatterns ) {
archiveArtifacts(artifacts:
SlingJenkinsHelper.jsonArrayToCsv(jobConfig.archivePatterns),
allowEmptyArchive: true)
}
+ if ( isReferenceStage && goal == "deploy" && shouldDeploy ) {
+ // Stash the build results from the local deployment directory so
we can deploy them on another node
+ stash name: 'local-snapshots-dir', includes:
'local-snapshots-dir/**'
+ }
}
def branchConfig = jobConfig?.branches?."$env.BRANCH_NAME" ?: [:]
- if ( branchConfig.nodeLabel && branchConfig.nodeLabel !=
globalConfig.mainNodeLabel )
- invocation = wrapInNode(invocation,branchConfig.nodeLabel)
-
return {
- stage("Build (Java ${jdkVersion}, ${goal})") {
- invocation.call()
+ wrapInNode(branchConfig.nodeLabel ?: globalConfig.mainNodeLabel, {
+ echo "Running on node ${env.NODE_NAME}"
+ timeout(time: 30, unit: 'MINUTES') {
+ stage("Maven Build (Java ${jdkVersion}, ${goal})") {
+ invocation.call()
+ }
+ }
+ if ( isReferenceStage ) {
+ // SonarQube (must be wrapped in same node)
Review Comment:
Can then please add this as a comment so it's clear to everyone reading the
code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]