kwin commented on code in PR #8:
URL:
https://github.com/apache/sling-tooling-jenkins/pull/8#discussion_r897968227
##########
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:
Yes, exactly. Stashing is too much effort (and it is not clear which files
are actually used by the sonar goal)
--
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]