Skip to content

Commit

Permalink
kie-issues#628: use wagon-maven-plugin to bulk deploy snapshots (#1118)
Browse files Browse the repository at this point in the history
* kie-issues#628: use wagon-maven-plugin to bulk deploy snapshots

* kie-issues#628: enable deploy in kogito jobs

---------

Co-authored-by: jstastny-cz <[email protected]>
  • Loading branch information
jstastny-cz and jstastny-cz authored Nov 7, 2023
1 parent 227a054 commit dba0513
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ environments:
auto_generation: false
ids:
- ecosystem
disable:
deploy: true
repositories:
- name: incubator-kie-kogito-pipelines
job_display_name: kogito-pipelines
Expand Down
15 changes: 12 additions & 3 deletions dsl/seed/jenkinsfiles/Jenkinsfile.buildchain
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,18 @@ pipeline {
}
steps {
script {
// Upload to specific repository with credentials
String mavenDeployRepositoryZipUrl = "${mavenDeployRepository.replaceAll('/content/', '/service/local/').replaceFirst('/*$', '')}/content-compressed"
maven.uploadLocalArtifacts(mavenDeployRepositoryCredsId, getMavenDeployLocalDir(), mavenDeployRepositoryZipUrl)
withCredentials([usernamePassword(credentialsId: mavenDeployRepositoryCredsId, usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
configFileProvider([configFile(fileId: settingsXmlId, variable: 'MAVEN_SETTINGS_FILE')]) {
new MavenCommand(this)
.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.withProperty('wagon.source', "file://${getMavenDeployLocalDir()}")
.withProperty('wagon.target', mavenDeployRepository)
.withProperty('wagon.targetId', 'apache-snapshots-repository')
.withProperty('apache.snapshot.repository.username', REPOSITORY_USER)
.withProperty('apache.snapshot.repository.password', REPOSITORY_TOKEN)
.run("org.codehaus.mojo:wagon-maven-plugin:2.0.2:merge-maven-repos")
}
}
}
}
}
Expand Down

0 comments on commit dba0513

Please sign in to comment.