jstastny-cz commented on code in PR #3037:
URL:
https://github.com/apache/incubator-kie-optaplanner/pull/3037#discussion_r1415280202
##########
.ci/jenkins/Jenkinsfile.deploy:
##########
@@ -158,39 +158,45 @@ pipeline {
}
}
}
-
- stage('Deploy to repository') {
- when {
- expression { return !shouldStageArtifacts() &&
!isSpecificArtifactsUpload() && shouldDeployToRepository() }
- }
- steps {
- script {
- runMavenDeploy(getOptaplannerMavenCommand())
-
runMavenDeploy(getOptaplannerQuickstartsMavenCommand().withOptions(['-pl',
':optaplanner-distribution']))
- }
- }
- }
stage('Deploy locally') {
- when {
- expression { return shouldStageArtifacts() ||
isSpecificArtifactsUpload() }
- }
steps {
script {
runMavenDeploy(getOptaplannerMavenCommand(),
optaplannerRepository)
}
}
}
- stage('Upload artifacts to given repository') {
+ stage('Deploy to repository') {
when {
- expression { return isSpecificArtifactsUpload() }
+ expression { return shouldDeployToRepository() }
}
steps {
script {
- // Deploy to specific repository with credentials
- maven.uploadLocalArtifacts(env.MAVEN_REPO_CREDS_ID,
getLocalDeploymentFolder(optaplannerRepository), getMavenRepoZipUrl())
+ withCredentials([usernamePassword(credentialsId:
env.MAVEN_REPO_CREDS_ID, usernameVariable: 'REPOSITORY_USER', passwordVariable:
'REPOSITORY_TOKEN')]) {
+ configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+ new MavenCommand(this)
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .withProperty('wagon.source',
"file://${MAVEN_DEPLOY_LOCAL_DIR}")
Review Comment:
I think you need to get the directory by:
```
String getLocalDeploymentFolder(String localDeployId) {
return "${env.MAVEN_DEPLOY_LOCAL_DIR}/${localDeployId}"
}
```
And the id is the second argument of runMavenDeploy in stage above.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]