Skip to content

Commit

Permalink
NO-ISSUE: split maven settings configuration nightly/release (apache#…
Browse files Browse the repository at this point in the history
…2686)

Co-authored-by: jstastny-cz <[email protected]>
  • Loading branch information
jstastny-cz and jstastny-cz authored Oct 21, 2024
1 parent f8af243 commit a71e710
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 75 deletions.
18 changes: 7 additions & 11 deletions .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -596,17 +596,13 @@ pipeline {
steps {
dir('kie-tools') {
script {
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeploySnapshotsCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
export KIE_TOOLS_BUILD__mavenDeploySkip=false
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -Dapache.repository.username=${REPOSITORY_USER} >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -Dapache.repository.password=${REPOSITORY_TOKEN} >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -Drevision=999-SNAPSHOT >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... build:prod
""".trim()
}
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsNightlyConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
export KIE_TOOLS_BUILD__mavenDeploySkip=false
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... exec 'bash' '-c' 'echo -Drevision=999-SNAPSHOT >> .mvn/maven.config'
pnpm -F jbpm-quarkus-devui... -F sonataflow-quarkus-devui... build:prod
""".trim()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-candidate
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
18 changes: 7 additions & 11 deletions .ci/jenkins/Jenkinsfile.weekly-publish
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,13 @@ pipeline {
steps {
dir('kie-tools') {
script {
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeploySnapshotsCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
timestampedSnapshotVersion = getTimestampedSnapshotVersion()
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.username=${REPOSITORY_USER} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.password=${REPOSITORY_TOKEN} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Drevision=${timestampedSnapshotVersion} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsNightlyConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
timestampedSnapshotVersion = getTimestampedSnapshotVersion()
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Drevision=${timestampedSnapshotVersion} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.cors-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.extended-services
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
18 changes: 7 additions & 11 deletions .ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down Expand Up @@ -118,16 +118,12 @@ pipeline {
if (params.DRY_RUN) {
env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true'
}
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployStagingCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.username=${REPOSITORY_USER} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.password=${REPOSITORY_TOKEN} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Papache-release >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsReleaseConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Papache-release >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kn-plugin-workflow
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kogito-task-console
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.npm-packages
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.online-editor
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
18 changes: 7 additions & 11 deletions .ci/jenkins/release-jobs/Jenkinsfile.sonataflow-quarkus-devui
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down Expand Up @@ -118,16 +118,12 @@ pipeline {
if (params.DRY_RUN) {
env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true'
}
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployStagingCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.username=${REPOSITORY_USER} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.password=${REPOSITORY_TOKEN} >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Papache-release >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsReleaseConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
sh """#!/bin/bash -el
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Papache-release >> .mvn/maven.config'
pnpm ${env.PNPM_FILTER_STRING} build:prod
""".trim()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-dev
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}")
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions .ci/jenkins/shared-scripts/pipelineVars.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ class PipelineVars implements Serializable {
String asfCIGithubCredentialsId = '399061d0-5ab5-4142-a186-a52081fef742'
String asfGithubPushCredentialsId = '84811880-2025-45b6-a44c-2f33bef30ad2'
String asfGithubTokenPushCredentialsId = '41128c14-bb63-4708-9074-d20a318ee630'
String mavenSettingsConfigFileId = 'kie-release-settings'
String mavenDeploySnapshotsCredentialsId = 'apache-nexus-kie-deploy-credentials'
String mavenDeployStagingCredentialsId = 'jenkins-deploy-to-nexus-staging'
String mavenSettingsReleaseConfigFileId = 'kie-release-authn-settings'
String mavenSettingsNightlyConfigFileId = 'kie-nightly-authn-settings'
String defaultArtifactsTempDir = 'artifacts-tmp'
String asfReleaseStagingRepository = 'https://dist.apache.org/repos/dist/dev/incubator/kie'
String asfReleaseGPGKeyCredentialsId = 'GPG_KEY_FILE'
Expand Down

0 comments on commit a71e710

Please sign in to comment.