From b3167cc7a038efbafe88dcf82c3ecf541f866935 Mon Sep 17 00:00:00 2001 From: OMH Date: Tue, 17 Nov 2026 18:02:25 +0800 Subject: [PATCH 1/9] chore(QTDI-3628): backport component-runtime#1306, remove Nexus/Sonatype and use GitHub Packages on maintenance/1.2610 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .jenkins/scripts/docker_build.sh | 2 + .jenkins/scripts/release/release-2-prepare.sh | 2 +- .jenkins/scripts/release/release-3-perform.sh | 4 +- .../release/release-3.1-perform-studio.sh | 57 ----- .../release-5-prepare-next-iteration.sh | 3 +- .jenkins/scripts/release_legacy.sh | 4 +- .jenkins/settings.xml | 78 +----- .mvn/maven.config | 2 + Jenkinsfile | 235 +++++------------- ci/Jenkinsfile-release | 57 +---- ci/Jenkinsfile-trivy | 16 +- component-studio/pom.xml | 49 ---- .../modules/ROOT/pages/release-process.adoc | 9 +- pom.xml | 171 ++----------- repository-knowledge.md | 34 +-- talend-component-maven-plugin/pom.xml | 2 +- .../src/it/dependency/pom.xml | 7 + .../src/it/settings.xml | 18 +- 18 files changed, 151 insertions(+), 599 deletions(-) delete mode 100644 .jenkins/scripts/release/release-3.1-perform-studio.sh create mode 100644 .mvn/maven.config diff --git a/.jenkins/scripts/docker_build.sh b/.jenkins/scripts/docker_build.sh index d6d558cc60d55..65b71f32ddb5b 100755 --- a/.jenkins/scripts/docker_build.sh +++ b/.jenkins/scripts/docker_build.sh @@ -50,12 +50,14 @@ dockerBuild() { mvn package "${_JIB_GOAL}" \ --file "images/${_IMAGE}-image/pom.xml" \ --define docker.talend.image.tag="${_TAG}" \ + --settings .jenkins/settings.xml \ $skip_for_docker_build if [[ ${_IS_LATEST} == 'true' ]]; then mvn package "${_JIB_GOAL}" \ --file "images/${_IMAGE}-image/pom.xml" \ --define docker.talend.image.tag=latest \ + --settings .jenkins/settings.xml \ $skip_for_docker_build fi } diff --git a/.jenkins/scripts/release/release-2-prepare.sh b/.jenkins/scripts/release/release-2-prepare.sh index 7b865f111f00b..aa182c0f1ea2b 100644 --- a/.jenkins/scripts/release/release-2-prepare.sh +++ b/.jenkins/scripts/release/release-2-prepare.sh @@ -40,7 +40,7 @@ main() { printf ">> Maven prepare release %s (next-dev: %s; tag: %s)\n" "${releaseVersion}" "${nextVersion}" "${tagName}" - local release_profiles="release,ossrh,gpg2" + local release_profiles="release,gpg-keyring,gpg2" mvn release:prepare \ --batch-mode \ diff --git a/.jenkins/scripts/release/release-3-perform.sh b/.jenkins/scripts/release/release-3-perform.sh index 0cb6e9b13fe1c..b866c17e3f4af 100644 --- a/.jenkins/scripts/release/release-3-perform.sh +++ b/.jenkins/scripts/release/release-3-perform.sh @@ -24,8 +24,9 @@ main() { printf ">> Maven perform release" - local release_profiles="release,ossrh,gpg2" + local release_profiles="release,gpg-keyring,gpg2" + # Release artifacts are published on the packages of this repository (QTDI-3791), see the release profile. mvn release:perform \ --batch-mode \ --errors \ @@ -33,7 +34,6 @@ main() { --settings .jenkins/settings.xml \ --activate-profiles "$release_profiles" \ "${extraBuildParams[@]}" - } main "$@" diff --git a/.jenkins/scripts/release/release-3.1-perform-studio.sh b/.jenkins/scripts/release/release-3.1-perform-studio.sh deleted file mode 100644 index 84a0a8775b152..0000000000000 --- a/.jenkins/scripts/release/release-3.1-perform-studio.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (C) 2006-2026 Talend Inc. - www.talend.com -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -xe - -# Parameters: -# $1: release version -# $2: next version -# $3: extra build args for all mvn cmd -main() { - local releaseVersion="${1?Missing release version}"; shift - local nextVersion="${1?Missing actual project version}"; shift - local extraBuildParams=("$@") - - printf ">> Maven perform release" - - # todo: add gpg2 profile for signing artifacts - local release_profiles="release-zl" - - # set the release version in the pom.xml - mvn versions:set -DnewVersion="${releaseVersion}" - - # Extra copy to GitHub Packages (Nexus replacement, QTDI-3640), non-blocking - mvn clean deploy \ - --file "component-studio/pom.xml" \ - --define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \ - --define altDeploymentRepository=github_package_releases::default::https://maven.pkg.github.com/Talend/global-artifacts \ - --fail-at-end \ - --settings .jenkins/settings.xml \ - --activate-profiles ${release_profiles} \ - "${extraBuildParams[@]}" || echo "WARN: GitHub Packages deploy failed (non-blocking)" - - mvn clean deploy \ - --file "component-studio/pom.xml" \ - --define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \ - --settings .jenkins/settings.xml \ - --activate-profiles ${release_profiles} \ - "${extraBuildParams[@]}" - - mvn versions:set -DnewVersion="${nextVersion}" -} - -main "$@" diff --git a/.jenkins/scripts/release/release-5-prepare-next-iteration.sh b/.jenkins/scripts/release/release-5-prepare-next-iteration.sh index 2efe48206dc83..2588763d2153a 100644 --- a/.jenkins/scripts/release/release-5-prepare-next-iteration.sh +++ b/.jenkins/scripts/release/release-5-prepare-next-iteration.sh @@ -42,7 +42,8 @@ main() { git checkout "${branchName}" # "|| true" is here to avoid blocking the jenkins pipeline in case of failure - mvn clean install --define skipTests \ + mvn clean install --settings .jenkins/settings.xml \ + --define skipTests \ --define invoker.skip=true \ --define checkstyle.skip \ --define enforcer.skip=true \ diff --git a/.jenkins/scripts/release_legacy.sh b/.jenkins/scripts/release_legacy.sh index 3b2b8359527fb..47df820ab2048 100644 --- a/.jenkins/scripts/release_legacy.sh +++ b/.jenkins/scripts/release_legacy.sh @@ -64,7 +64,7 @@ main() { --define releaseVersion="${release}" \ --define developmentVersion="${dev_version}" \ --define arguments="-DskipTests -DskipITs -Dinvoker.skip=true" \ - --activate-profiles ossrh,release,gpg2 \ + --activate-profiles gpg-keyring,release,gpg2 \ ${extraBuildParams} \ --settings .jenkins/settings.xml echo ">> Maven perform release $release" @@ -72,7 +72,7 @@ main() { --batch-mode \ --errors \ --define arguments="-DskipTests -DskipITs -Dinvoker.skip=true" \ - --activate-profiles ossrh,release,gpg2 \ + --activate-profiles gpg-keyring,release,gpg2 \ ${extraBuildParams} \ --settings .jenkins/settings.xml ### diff --git a/.jenkins/settings.xml b/.jenkins/settings.xml index 8c877efb3c608..33d8ce07fe7d9 100644 --- a/.jenkins/settings.xml +++ b/.jenkins/settings.xml @@ -4,11 +4,6 @@ http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> - - central.portal - ${env.OSSRH_USER} - ${env.OSSRH_PASS} - github ${env.GITHUB_LOGIN} @@ -20,71 +15,10 @@ ${env.JIRA_PASS} - TalendOpenSourceRelease - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - TalendOpenSourceSnapshot - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - talend.oss.snapshots - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - talend.oss.releases - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - github_package_snapshots + github_packages ${env.GITHUB_PACKAGES_LOGIN} ${env.GITHUB_PACKAGES_TOKEN} - - github_package_releases - ${env.GITHUB_PACKAGES_LOGIN} - ${env.GITHUB_PACKAGES_TOKEN} - - - talend.snapshots - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - talend.releases - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - - - talend_nexus_deployment - ${env.NEXUS_USER} - ${env.NEXUS_PASS} - - 30000 - - artifactory.datapwn.com ${env.DOCKER_USER} @@ -92,18 +26,20 @@ + - maven_central_proxy - Maven Central Proxy - https://artifacts-zl.talend.com/nexus/content/repositories/central/ + artifactory.datapwn.com + Internal Artifactory Maven Central cache + https://artifactory.datapwn.com/artifactory/maven-central-remote central - ossrh + gpg-keyring -Xdoclint:none gpg diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 0000000000000..0e9bb0de13b1a --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1,2 @@ +-Daether.connector.connectTimeout=60000 +-Daether.connector.requestTimeout=300000 diff --git a/Jenkinsfile b/Jenkinsfile index bfc4e06a9be83..2deb03cf53959 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,13 +18,6 @@ import java.time.LocalDateTime import java.util.regex.Matcher // Credentials -final def ossrhCredentials = usernamePassword( - credentialsId: 'ossrh-credentials', - usernameVariable: 'OSSRH_USER', - passwordVariable: 'OSSRH_PASS') -final def nexusCredentials = usernamePassword( - credentialsId: 'nexus-artifact-zl-credentials', - usernameVariable: 'NEXUS_USER', passwordVariable: 'NEXUS_PASS') final def jiraCredentials = usernamePassword( credentialsId: 'jira-credentials', usernameVariable: 'JIRA_USER', @@ -80,8 +73,7 @@ Boolean devBranch_dockerPush = false String skipOptions = "-Dspotless.apply.skip=true -Dcheckstyle.skip=true -Drat.skip=true -DskipTests -Dinvoker.skip=true" -String deployOptions = "$skipOptions -Possrh -Prelease -Pgpg2 -Denforcer.skip=true" -String nexusDeployOptions = "$skipOptions --activate-profiles private_repository -Denforcer.skip=true" +String deployOptions = "$skipOptions -Denforcer.skip=true" pipeline { @@ -152,14 +144,8 @@ pipeline { defaultValue: false, description: ''' Force MAVEN deploy stage for development branches. No effect on master and maintenance. - INFO: master/maintenance branch deploys artefacts on - dev branches deploy artefacts on ''') - booleanParam( - name: 'GITHUB_PACKAGES_DEV_DEPLOY', - defaultValue: false, - description: ''' - Also publish the qualified snapshot of a development branch to GitHub Packages (Nexus replacement). - Needs MAVEN_DEPLOY. No effect on master and maintenance, which are always published.''') + INFO: master/maintenance branch deploys artefacts on GitHub Packages + dev branches deploy qualified artefacts on GitHub Packages (global-artifacts)''') booleanParam( name: 'DOCKER_PUSH', defaultValue: false, @@ -253,16 +239,8 @@ pipeline { so you can test Jenkins pipeline changes (e.g. the Maven deploy stages) end to end from a dev branch. WARNING: the resulting artifact uses the exact same (unqualified) SNAPSHOT version as master. If this build deploys, it WILL OVERWRITE the artifacts - currently published by the master branch build on both the internal Nexus - and Sonatype/OSSRH repositories. If you do it, be sure that your branch is up to date with master. + currently published by the master branch build on the GitHub Packages repository. If you do it, be sure that your branch is up to date with master. Only to test Jenkins job evolution, never for real development work.''') - booleanParam( - name: 'NO_SONATYPE', - defaultValue: false, - description: ''' - DEBUG ONLY - skips the Sonatype/OSSRH deploy stage entirely, whatever the branch. - Use this to test the pipeline faster when the slow/unreliable Sonatype deploy - is not what you want to validate (e.g. only testing the internal Nexus deploy stage).''') } stages { @@ -305,16 +283,6 @@ pipeline { // NO_QUALIFIER forces the same (unqualified) version as master, see param warning needQualify = (devBranch_mavenDeploy || devBranch_dockerPush) && !params.NO_QUALIFIER - if (needQualify) { - // Qualified version have to be released on talend_repository - // Overwrite the deployOptions - deployOptions = nexusDeployOptions - } - - // hack to overwrite the skip of studio modules that we can't deploy in release mode into Sonatype repo - // assume that we don't use this Jenkinsfile for release anymore - deployOptions = deployOptions.replace("-Prelease", "-Psnapshot") - // By default the doc is skipped for standards branches Boolean skip_documentation = !(params.FORCE_DOC || isStdBranch) extraBuildParams = assemblyExtraBuildParams(skip_documentation) @@ -380,10 +348,12 @@ pipeline { // Maven documentation about maven_version: // https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm println "Edit version on dev branches, new version is ${finalVersion}" - sh """\ + withCredentials([githubPackagesCredentials, dockerCredentials]) { + sh """\ #!/usr/bin/env bash mvn versions:set --define newVersion=${finalVersion} --settings .jenkins/settings.xml """.stripIndent() + } } } @@ -424,7 +394,6 @@ pipeline { steps { withCredentials([gitCredentials, dockerCredentials, - ossrhCredentials, jiraCredentials, gpgCredentials]) { script { @@ -446,8 +415,8 @@ pipeline { stage('Maven validate to install') { when { expression { params.ACTION != 'RELEASE' } } steps { - withCredentials([ossrhCredentials, - nexusCredentials]) { + withCredentials([githubPackagesCredentials, + dockerCredentials]) { sh """\ #!/usr/bin/env bash set -xe @@ -473,96 +442,25 @@ pipeline { } } stage('Maven deploy - GitHub Packages') { - // Temporary extra copy of what goes to Nexus (Nexus license ends Nov 2026, QTDI-3640). - // Sonatype-only deploys are not concerned. Non-blocking: failures only make the build UNSTABLE. + // Snapshots and qualified versions go on the global-artifacts packages (distributionManagement of the root pom) when { - expression { stdBranch_buildOnly || (devBranch_mavenDeploy && needQualify && params.GITHUB_PACKAGES_DEV_DEPLOY) } - } - steps { - script { - catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') { - withCredentials([githubPackagesCredentials]) { - sh """\ - #!/usr/bin/env bash - set -xe - mvn deploy ${nexusDeployOptions} \ - --fail-at-end \ - -DaltDeploymentRepository=github_package_snapshots::default::https://maven.pkg.github.com/Talend/global-artifacts \ - ${extraBuildParams} \ - --settings .jenkins/settings.xml - """.stripIndent() - } - } + anyOf { + expression { stdBranch_buildOnly } + expression { devBranch_mavenDeploy } } } - } - stage('Maven deploy - Nexus') { - // Deploy to internal Nexus first on master/maintenance builds so that - // connectors-se Jenkins agents (which cannot reach central.sonatype.com) - // can resolve SNAPSHOT dependencies as soon as possible, independent of - // whether the Sonatype deploy stage below is slow or times out. - when { - expression { stdBranch_buildOnly } - } steps { - withCredentials([nexusCredentials]) { + withCredentials([githubPackagesCredentials, dockerCredentials]) { sh """\ #!/usr/bin/env bash set -xe - mvn deploy ${nexusDeployOptions} \ + mvn deploy ${deployOptions} \ ${extraBuildParams} \ --settings .jenkins/settings.xml """.stripIndent() } - } - } - stage('Maven deploy - Sonatype') { - // Sonatype/OSSRH deploy has a history of being slow/unreliable and can - // otherwise consume the whole pipeline timeout; bound it to its own - // timeout and degrade to UNSTABLE instead of failing the build outright - // (the Nexus deploy stage above already unblocks downstream consumers). - when { - allOf { - expression { !params.NO_SONATYPE } - anyOf { - expression { stdBranch_buildOnly } - expression { devBranch_mavenDeploy } - } - } - } - steps { script { - catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') { - timeout(time: 60, unit: 'MINUTES') { - withCredentials([ossrhCredentials, - gpgCredentials, - nexusCredentials]) { - sh """\ - #!/usr/bin/env bash - set -xe - bash mvn deploy $deployOptions \ - $extraBuildParams \ - --settings .jenkins/settings.xml - """.stripIndent() - } - } - } - } - // Add description to job - script { - def repo - String nexusSnapshotUrl = 'https://artifacts-zl.talend.com/nexus/content/repositories/snapshots/org/talend/sdk/component' - if (devBranch_mavenDeploy) { - repo = ['artifacts-zl.talend.com', nexusSnapshotUrl] - } else { - repo = ['oss.sonatype.org', - 'https://central.sonatype.com/repository/maven-snapshots/org/talend/sdk/component/'] - } - - JenkinsStatusController.jobDescriptionAppend("Maven artefact deployed as ${finalVersion} on [${repo[0]}](${repo[1]}) ") - if (stdBranch_buildOnly) { - JenkinsStatusController.jobDescriptionAppend("Maven artefact also deployed as ${finalVersion} on [artifacts-zl.talend.com](${nexusSnapshotUrl}) ") - } + JenkinsStatusController.jobDescriptionAppend("Maven artefact deployed as ${finalVersion} on [GitHub Packages](https://github.com/orgs/Talend/packages) ") } } } @@ -575,45 +473,45 @@ pipeline { } steps { script { - configFileProvider([configFile(fileId: 'maven-settings-nexus-zl', variable: 'MAVEN_SETTINGS')]) { - String images_options = '' - if (isStdBranch) { - // Build and push all images - JenkinsStatusController.jobDescriptionAppend("Docker images deployed: component-server, component-starter-server and remote-engine-customizer ") + String images_options = '' + if (isStdBranch) { + // Build and push all images + JenkinsStatusController.jobDescriptionAppend("Docker images deployed: component-server, component-starter-server and remote-engine-customizer ") + } else { + String image_list + if (params.DOCKER_CHOICE == 'All') { + images_options = 'false' } else { - String image_list - if (params.DOCKER_CHOICE == 'All') { - images_options = 'false' - } else { - images_options = 'false ' + params.DOCKER_CHOICE - } + images_options = 'false ' + params.DOCKER_CHOICE + } - if (params.DOCKER_CHOICE == 'All') { - JenkinsStatusController.jobDescriptionAppend("All docker images deployed ") - - JenkinsStatusController.jobDescriptionAppend("As ${finalVersion}${buildTimestamp} on " + - "[artifactory.datapwn.com]" + - "($artifactoryAddr/$artifactoryPath) ") - JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + - "/component-server:${finalVersion}${buildTimestamp} ") - JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + - "/component-starter-server:${finalVersion}${buildTimestamp} ") - JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + - "/remote-engine-customize:${finalVersion}${buildTimestamp} ") - - } else { - JenkinsStatusController.jobDescriptionAppend("Docker images deployed: $params.DOCKER_CHOICE ") - JenkinsStatusController.jobDescriptionAppend("As ${finalVersion}${buildTimestamp} on " + - "[artifactory.datapwn.com]($artifactoryAddr/$artifactoryPath) ") - JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath/$params.DOCKER_CHOICE:" + - "${finalVersion}${buildTimestamp} ") + if (params.DOCKER_CHOICE == 'All') { + JenkinsStatusController.jobDescriptionAppend("All docker images deployed ") - } + JenkinsStatusController.jobDescriptionAppend("As ${finalVersion}${buildTimestamp} on " + + "[artifactory.datapwn.com]" + + "($artifactoryAddr/$artifactoryPath) ") + JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + + "/component-server:${finalVersion}${buildTimestamp} ") + JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + + "/component-starter-server:${finalVersion}${buildTimestamp} ") + JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath" + + "/remote-engine-customize:${finalVersion}${buildTimestamp} ") + + } else { + JenkinsStatusController.jobDescriptionAppend("Docker images deployed: $params.DOCKER_CHOICE ") + JenkinsStatusController.jobDescriptionAppend("As ${finalVersion}${buildTimestamp} on " + + "[artifactory.datapwn.com]($artifactoryAddr/$artifactoryPath) ") + JenkinsStatusController.jobDescriptionAppend("docker pull $artifactoryAddr/$artifactoryPath/$params.DOCKER_CHOICE:" + + "${finalVersion}${buildTimestamp} ") } - // Build and push specific image + } + + // Build and push specific image + withCredentials([githubPackagesCredentials, dockerCredentials]) { sh """ bash .jenkins/scripts/docker_build.sh \ ${finalVersion}${buildTimestamp} \ @@ -631,7 +529,7 @@ pipeline { } } steps { - withCredentials([ossrhCredentials, gitCredentials]) { + withCredentials([gitCredentials, githubPackagesCredentials, dockerCredentials]) { sh """\ #!/usr/bin/env bash set -xe @@ -653,8 +551,8 @@ pipeline { } } steps { - withCredentials([ossrhCredentials, - nexusCredentials]) { + withCredentials([githubPackagesCredentials, + dockerCredentials]) { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh """ bash .jenkins/scripts/mvn_dependency_updates_report.sh @@ -691,9 +589,10 @@ pipeline { } steps { script { - withCredentials([nexusCredentials, + withCredentials([githubPackagesCredentials, sonarToken, - gitCredentials]) { + gitCredentials, + dockerCredentials]) { SonarController.runSonar(branch_name, env.CHANGE_TARGET, @@ -714,12 +613,10 @@ pipeline { } steps { script { - withCredentials([gitCredentials, dockerCredentials, ossrhCredentials, jiraCredentials, gpgCredentials, nexusCredentials]) { - configFileProvider([configFile(fileId: 'maven-settings-nexus-zl', variable: 'MAVEN_SETTINGS')]) { - sh """ - bash .jenkins/scripts/release_legacy.sh $branch_name $finalVersion $extraBuildParams - """ - } + withCredentials([gitCredentials, dockerCredentials, jiraCredentials, gpgCredentials, githubPackagesCredentials]) { + sh """ + bash .jenkins/scripts/release_legacy.sh $branch_name $finalVersion $extraBuildParams + """ } } } @@ -730,13 +627,15 @@ pipeline { } steps { script { - // Trivy's pom resolver ignores MAVEN_ARGS/-s and only reads ~/.m2/settings.xml (Nexus mirror) - sh ''' - mkdir -p "${HOME}/.m2" - cp "${WORKSPACE}/.jenkins/settings.xml" "${HOME}/.m2/settings.xml" - ''' - trivyTools.generateTrivyReport('output/trivy-results.json', - 'output/trivy-results.html') + withCredentials([dockerCredentials, githubPackagesCredentials]) { + // Trivy's pom resolver ignores MAVEN_ARGS/-s and only reads ~/.m2/settings.xml (Artifactory mirror, credentials from the env) + sh ''' + mkdir -p "${HOME}/.m2" + cp "${WORKSPACE}/.jenkins/settings.xml" "${HOME}/.m2/settings.xml" + ''' + trivyTools.generateTrivyReport('output/trivy-results.json', + 'output/trivy-results.html') + } publishHtmlReportTools.publishHtmlReport('output/trivy-results.html', 'CVE Trivy Vulnerability Report') } diff --git a/ci/Jenkinsfile-release b/ci/Jenkinsfile-release index 4953670f9835e..a32e9c9da42bc 100644 --- a/ci/Jenkinsfile-release +++ b/ci/Jenkinsfile-release @@ -15,14 +15,6 @@ */ // Credentials -final def ossrhCredentials = usernamePassword( - credentialsId: 'ossrh-credentials', - usernameVariable: 'OSSRH_USER', - passwordVariable: 'OSSRH_PASS') -final def nexusCredentials = usernamePassword( - credentialsId: 'nexus-artifact-zl-credentials', - usernameVariable: 'NEXUS_USER', - passwordVariable: 'NEXUS_PASS') final def githubPackagesCredentials = usernamePassword( credentialsId: 'github-packages-ci-runner-connectors-pat', usernameVariable: 'GITHUB_PACKAGES_LOGIN', @@ -145,18 +137,11 @@ pipeline { sectionHeaderStyle: """ background-color: #A9A9A9; text-align: center; font-size: 35px !important; font-weight : bold; """) /////////////////////////////////////////////////////////////////////////////////////////////////////////////// - booleanParam( - name: 'RELEASE_STUDIO_MODULES', - defaultValue: true, - description: '''Activate release of studio modules. - EXPERT USER ONLY: to solve specials case eg: release ok but it fails for the Studio modules. - ''') booleanParam( name: 'NO_STAGING', defaultValue: false, description: '''Activate the no-staging profile. - Execute the release, but at the end of the release:perform step, - the artifacts are not publish on the NEXUS. + Execute the release, but the artifacts are not published on the GitHub Packages (maven.deploy.skip). EXPERT USER ONLY: to solve specials case eg: release ok but failure during docker publish. ''') booleanParam( @@ -179,7 +164,7 @@ pipeline { CONSEQUENCES: - `release:prepare` runs with `-DdryRun=true`: poms are rewritten and validated locally only. - Nothing is committed, tagged or pushed to git (real repo or fork). - - The perform and studio modules stages are skipped (they need a real, tagged + - The perform stage is skipped (it needs a real, tagged `release:prepare` output to run against). - The docker, next iteration and maintenance branch stages still run, but in mock mode: the docker image is only built to a local tar (never pushed), and every @@ -294,7 +279,6 @@ pipeline { steps { withCredentials([gitCredentials, dockerCredentials, - ossrhCredentials, jiraCredentials, gpgCredentials]) { script { @@ -405,8 +389,7 @@ pipeline { stage('Maven release prepare') { steps { - withCredentials([nexusCredentials, - ossrhCredentials, + withCredentials([githubPackagesCredentials, gpgCredentials]) { script { echo "Maven prepare release $releaseVersion (next-dev: $nextVersion; tag: $tagName)" @@ -447,8 +430,7 @@ pipeline { expression { !params.DRY_RUN } } steps { - withCredentials([nexusCredentials, - ossrhCredentials, + withCredentials([githubPackagesCredentials, jiraCredentials, gpgCredentials]) { @@ -460,35 +442,13 @@ pipeline { } } - stage('Release studio modules') { - when { - expression { params.RELEASE_STUDIO_MODULES && !params.DRY_RUN } - } - steps { - withCredentials([nexusCredentials, - githubPackagesCredentials, - ossrhCredentials, - jiraCredentials, - gpgCredentials]) { - - script { - echo "Perform release" - sh "bash .jenkins/scripts/release/release-3.1-perform-studio.sh $releaseVersion \ - $nextVersion \ - $extraBuildParams" - } - } - } - } - stage('Release Docker image') { when { expression { !params.NO_DOCKER } } steps { withCredentials([gitCredentials, - nexusCredentials, - ossrhCredentials, + githubPackagesCredentials, dockerCredentials]) { script { echo "Docker image creation from branch $branchName with tag: $tagName on version $releaseVersion" @@ -505,8 +465,8 @@ pipeline { stage('Prepare next iteration') { steps { withCredentials([gitCredentials, - nexusCredentials, - ossrhCredentials]) { + githubPackagesCredentials, + dockerCredentials]) { script { echo "Prepare next iteration on $branchName" // Under DRY_RUN, the final git push is simulated with "--dry-run" (see script). @@ -524,8 +484,7 @@ pipeline { } steps { withCredentials([gitCredentials, - nexusCredentials, - ossrhCredentials]) { + githubPackagesCredentials]) { script { echo "Creating a new branch named $maintenanceBranch with version $maintenanceVersion" // Under DRY_RUN, the final git push is simulated with "--dry-run" (see script). diff --git a/ci/Jenkinsfile-trivy b/ci/Jenkinsfile-trivy index 60a1f71781481..09606cad726fc 100644 --- a/ci/Jenkinsfile-trivy +++ b/ci/Jenkinsfile-trivy @@ -15,10 +15,14 @@ */ // Credentials -final def nexusCredentials = usernamePassword( - credentialsId: 'nexus-artifact-zl-credentials', - usernameVariable: 'NEXUS_USER', - passwordVariable: 'NEXUS_PASSWORD') +final def githubPackagesCredentials = usernamePassword( + credentialsId: 'github-packages-ci-runner-connectors-pat', + usernameVariable: 'GITHUB_PACKAGES_LOGIN', + passwordVariable: 'GITHUB_PACKAGES_TOKEN') +final def dockerCredentials = usernamePassword( + credentialsId: 'artifactory-datapwn-credentials', + usernameVariable: 'DOCKER_USER', + passwordVariable: 'DOCKER_PASS') final String repository = 'component-runtime' @@ -94,7 +98,7 @@ pipeline { stage('Build Project') { steps { - withCredentials([nexusCredentials]) { + withCredentials([dockerCredentials, githubPackagesCredentials]) { script { sh 'bash .jenkins/scripts/trivy_build_tck.sh' } @@ -105,7 +109,7 @@ pipeline { stage('Security Scan with Trivy') { steps { script { - // Trivy's pom resolver ignores MAVEN_ARGS/-s and only reads ~/.m2/settings.xml (Nexus mirror) + // Trivy's pom resolver ignores MAVEN_ARGS/-s and only reads ~/.m2/settings.xml (Artifactory mirror) sh ''' mkdir -p "${HOME}/.m2" cp "${WORKSPACE}/.jenkins/settings.xml" "${HOME}/.m2/settings.xml" diff --git a/component-studio/pom.xml b/component-studio/pom.xml index 707292b9ef704..ea95bc57b543d 100644 --- a/component-studio/pom.xml +++ b/component-studio/pom.xml @@ -88,53 +88,4 @@ - - - - release-zl - - - - talend_nexus_deployment - https://artifacts-zl.talend.com/nexus/content/repositories/releases/ - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - - - diff --git a/documentation/src/main/antora/modules/ROOT/pages/release-process.adoc b/documentation/src/main/antora/modules/ROOT/pages/release-process.adoc index 99352962f9c17..f1fa21922f720 100644 --- a/documentation/src/main/antora/modules/ROOT/pages/release-process.adoc +++ b/documentation/src/main/antora/modules/ROOT/pages/release-process.adoc @@ -25,9 +25,9 @@ Add the required credentials to your Maven `settings.xml` file for the release. https://maven.apache.org/xsd/settings-1.0.0.xsd"> - ossrh - ${env.OSSRH_USER} - ${env.OSSRH_PASS} + github_packages + ${env.GITHUB_PACKAGES_LOGIN} + ${env.GITHUB_PACKAGES_TOKEN} github @@ -75,8 +75,7 @@ Add the required credentials to your Maven `settings.xml` file for the release. NOTE: All the environment variables should be either set in your environment or hardcoded inline. It is highly recommended to use Maven encryption: https://maven.apache.org/guides/mini/guide-encryption.html. -1. The OSSH variables are your Sonatype OSS repository credentials with the permissions to deploy on org.talend. -If you don't have them already, you can ask for them at https://issues.sonatype.org/projects/OSSRH using your Talend address. +1. The GITHUB_PACKAGES variables are the credentials of a GitHub account (token with `write:packages`) allowed to publish the packages of the `Talend/component-runtime` repository. Releases are no more published on Sonatype/Maven Central. 2. The GitHub variables are your GitHub account credentials. they are mainly used to update the documentation. 3. The JIRA variables are your Talend account credentials with read permissions on https://jira.talendforge.org/projects/TCOMP/. 4. The Blackduck configuration is used for security scans. diff --git a/pom.xml b/pom.xml index 82b4ac9d34ed4..543f83e8aaff6 100644 --- a/pom.xml +++ b/pom.xml @@ -135,11 +135,17 @@ https://github.com/${scm.repository} - + + + github_packages + GitHub Packages component-runtime + https://maven.pkg.github.com/Talend/component-runtime + - central.portal - Central Portal Snapshots - https://central.sonatype.com/repository/maven-snapshots + github_packages + GitHub Packages global-artifacts + https://maven.pkg.github.com/Talend/global-artifacts @@ -236,7 +242,6 @@ 0.16.1 3.6.0 - 0.8.0 2.8 1.0.7 2.0.0 @@ -950,17 +955,6 @@ - - - false - - - true - - central.portal - Central Portal Snapshots - https://central.sonatype.com/repository/maven-snapshots/ - true @@ -972,35 +966,14 @@ true - - false - - TalendOpenSourceRelease - https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/ - - - - false - true - TalendOpenSourceSnapshot - https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/ + github_packages + https://maven.pkg.github.com/Talend/global-artifacts - - - false - - - true - - central.portal - Central Portal Snapshots - https://central.sonatype.com/repository/maven-snapshots/ - true @@ -1013,10 +986,10 @@ true - false + true - TalendOpenSourceRelease - https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/ + github_packages + https://maven.pkg.github.com/Talend/global-artifacts @@ -1365,11 +1338,6 @@ maven-gpg-plugin ${gpg-plugin.version} - - org.sonatype.central - central-publishing-maven-plugin - ${central-publishing-maven-plugin.version} - com.github.eirslett frontend-maven-plugin @@ -1814,19 +1782,6 @@ - - private_repository - - - - talend.snapshots - https://artifacts-zl.talend.com/nexus/content/repositories/snapshots - - - gpg2 @@ -1842,81 +1797,6 @@ release - - org.sonatype.central - central-publishing-maven-plugin - true - - central.portal - https://central.sonatype.com - true - - - - - - - - - component-studio - component-runtime-di - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - - sign - - verify - - - - - - - - snapshot - - - - org.sonatype.central - central-publishing-maven-plugin - true - - central.portal - https://central.sonatype.com - true - - org.apache.maven.plugins maven-source-plugin @@ -1959,23 +1839,10 @@ no-staging - - - - org.sonatype.central - central-publishing-maven-plugin - true - - - central.portal - true - - - - + + + true + java8 diff --git a/repository-knowledge.md b/repository-knowledge.md index 249fe344834de..6406568e11025 100644 --- a/repository-knowledge.md +++ b/repository-knowledge.md @@ -160,26 +160,14 @@ regular dependencies, not plugins); `UiSpecGeneratorMojoTest` covers the isolati ## CI / Jenkinsfile patterns -### Dual Maven deploy — Sonatype + internal Nexus +### Maven deploy targets (no more Sonatype, QTDI-3791) -When a stage must publish SNAPSHOTs to **both** `central.sonatype.com` (Sonatype OSS) and `artifacts-zl.talend.com` (internal Nexus), **two separate `mvn deploy` invocations are required**: - -- The first call uses `-Possrh -Psnapshot` (existing Sonatype deploy, unchanged). -- The second call uses `-Pprivate_repository` — but this profile **overrides `snapshotRepository`**, so combining both profiles in a single call silently suppresses the Sonatype publish and only deploys to Nexus. - -```groovy -// Sonatype deploy (existing — unchanged) -mvn ... -Possrh -Psnapshot deploy - -// Internal Nexus deploy (new — runs after Sonatype) -withCredentials([usernamePassword(credentialsId: 'nexusCredentials', ...)]) { - mvn ... --activate-profiles private_repository deploy -} -``` - -If the first deploy fails, the second is never triggered — correct behavior. - -_Discovered: QTDI-3123, 2026-07-10_ +Sonatype/Maven Central and the internal Nexus are no longer used. The root `distributionManagement` uses the +single server id `github_packages`: snapshots/qualified versions go to the `global-artifacts` GitHub Packages +(``), release versions go to the packages of this repository (``). Maven picks +the target from the version, so no profile is needed. The studio modules are released like +any other module (no `system` scope restriction anymore). The `release` profile also attaches sources/javadoc and signs the +artifacts (`gpg2` + the `gpg-keyring` settings profile). ### `stdBranch_buildOnly` — master/maintenance build guard @@ -193,12 +181,6 @@ if (stdBranch_buildOnly) { _Discovered: QTDI-3123, 2026-07-10_ -### Nexus credentials — `nexusCredentials` - -`.jenkins/settings.xml` already has a `talend.snapshots` server entry. The credentials binding ID is `nexusCredentials`, which injects `NEXUS_USERNAME` and `NEXUS_PASSWORD`. **No `settings.xml` edits are needed** when adding a new deploy step targeting the internal Nexus — only add the `withCredentials` block in `Jenkinsfile`. - -_Discovered: QTDI-3123, 2026-07-10_ - ### JDK sources — build JDK vs. runtime JDK Two independent JDKs are in play; a JDK CVE must be assessed against each: @@ -234,7 +216,7 @@ Jenkins instance `jenkins-connectors`. Jobs are registered in flux (Job DSL); th | Flux job | Branches | Jenkinsfile | Notes | | --- | --- | --- | --- | -| `component-runtime/build` | all branches and PRs | `Jenkinsfile` | Build, Sonar, deploys (GitHub Packages, Nexus, Sonatype), Docker, Trivy. Cron `0 0 * * *` on `master` only (set in the Jenkinsfile). No longer used for releases | +| `component-runtime/build` | all branches and PRs | `Jenkinsfile` | Build, Sonar, deploy (GitHub Packages), Docker, Trivy. Cron `0 0 * * *` on `master` only (set in the Jenkinsfile). No longer used for releases | | `component-runtime/release` | `maintenance/*`, `master`, `main` | `ci/Jenkinsfile-release` | Started by hand with `ACTION` = `GA` (only on `master`) or `MAINTENANCE` (only on `maintenance/...`); try `DRY_RUN=true` first. Debug copy: `__TESTS__/jenkins-debug/component-runtime/release` | | `component-runtime/trivy-scan` | `master` | `ci/Jenkinsfile-trivy` | Flux cron, Sun–Fri 01:30 | | `component-runtime/TCOMP-api-test` | all branches and PRs | `talend-component-maven-plugin/src/it/web/.jenkins/Jenkinsfile` | Check `QA/TCOMP-api-test/pr-head`; see § CI: TCOMP-api-test | diff --git a/talend-component-maven-plugin/pom.xml b/talend-component-maven-plugin/pom.xml index af0a6c82bed9d..316f74c9f7794 100644 --- a/talend-component-maven-plugin/pom.xml +++ b/talend-component-maven-plugin/pom.xml @@ -37,7 +37,7 @@ 1.31.1 jdbc - 1.55.0-SNAPSHOT + 1.2611.0-SNAPSHOT salesforce diff --git a/talend-component-maven-plugin/src/it/dependency/pom.xml b/talend-component-maven-plugin/src/it/dependency/pom.xml index fae845a854ae3..54b72f6a59760 100644 --- a/talend-component-maven-plugin/src/it/dependency/pom.xml +++ b/talend-component-maven-plugin/src/it/dependency/pom.xml @@ -75,6 +75,13 @@ @it-component-version@ component car + + + + com.zaxxer + HikariCP + + org.talend.components diff --git a/talend-component-maven-plugin/src/it/settings.xml b/talend-component-maven-plugin/src/it/settings.xml index 975d1a79c170c..731af2cbf11c9 100644 --- a/talend-component-maven-plugin/src/it/settings.xml +++ b/talend-component-maven-plugin/src/it/settings.xml @@ -16,22 +16,22 @@ - TalendOpenSourceRelease - ${env.NEXUS_USER} - ${env.NEXUS_PASS} + github_packages + ${env.GITHUB_PACKAGES_LOGIN} + ${env.GITHUB_PACKAGES_TOKEN} - TalendOpenSourceSnapshot - ${env.NEXUS_USER} - ${env.NEXUS_PASS} + artifactory.datapwn.com + ${env.DOCKER_USER} + ${env.DOCKER_PASS} - maven_central_proxy - Maven Central Proxy - https://artifacts-zl.talend.com/nexus/content/repositories/central/ + artifactory.datapwn.com + Internal Artifactory Maven Central cache + https://artifactory.datapwn.com/artifactory/maven-central-remote central From d2548a996ff719c8423fad02a1e6559ec4db96c5 Mon Sep 17 00:00:00 2001 From: OMH Date: Wed, 18 Nov 2026 08:49:52 +0800 Subject: [PATCH 2/9] chore(QTDI-3628): remove oss.sonatype.org releases repositories Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pom.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pom.xml b/pom.xml index 543f83e8aaff6..51b202a99f9ff 100644 --- a/pom.xml +++ b/pom.xml @@ -955,13 +955,6 @@ - - - true - - oss.releases - https://oss.sonatype.org/content/repositories/releases - true @@ -974,13 +967,6 @@ - - - true - - oss.releases - https://oss.sonatype.org/content/repositories/releases - true From b3aa8e603c95ecffb4f71949c8d0bc572501f420 Mon Sep 17 00:00:00 2001 From: OMH Date: Thu, 19 Nov 2026 11:44:56 +0800 Subject: [PATCH 3/9] chore(QTDI-3860): bind artifactory credentials in release stages that run Maven Maven Central is mirrored by artifactory.datapwn.com, which authenticates with DOCKER_USER/DOCKER_PASS. Same fix as component-runtime#1341. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ci/Jenkinsfile-release | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile-release b/ci/Jenkinsfile-release index a32e9c9da42bc..d64708b125c9c 100644 --- a/ci/Jenkinsfile-release +++ b/ci/Jenkinsfile-release @@ -390,6 +390,7 @@ pipeline { stage('Maven release prepare') { steps { withCredentials([githubPackagesCredentials, + dockerCredentials, gpgCredentials]) { script { echo "Maven prepare release $releaseVersion (next-dev: $nextVersion; tag: $tagName)" @@ -431,6 +432,7 @@ pipeline { } steps { withCredentials([githubPackagesCredentials, + dockerCredentials, jiraCredentials, gpgCredentials]) { @@ -484,7 +486,8 @@ pipeline { } steps { withCredentials([gitCredentials, - githubPackagesCredentials]) { + githubPackagesCredentials, + dockerCredentials]) { script { echo "Creating a new branch named $maintenanceBranch with version $maintenanceVersion" // Under DRY_RUN, the final git push is simulated with "--dry-run" (see script). From f22d3c2334685d74002d66850dae6c879bb2cc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20D=C3=A9siles?= Date: Thu, 19 Nov 2026 19:27:12 +0100 Subject: [PATCH 4/9] chore(QTDI-3872): publish snapshots on component-runtime packages (#1344) Snapshots and qualified versions were still deployed on the Talend/global-artifacts GitHub Packages. They now go on the packages of this repository, like the releases. The read side (global-artifacts repositories) is unchanged. Co-authored-by: Claude Sonnet 5.5 (cherry picked from commit 37134b6fc4d31a59d9fb2fe2b1366e25e11dc4f9) --- Jenkinsfile | 6 +++--- pom.xml | 8 ++++---- repository-knowledge.md | 8 +++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2deb03cf53959..5c6c334edee7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,7 +145,7 @@ pipeline { description: ''' Force MAVEN deploy stage for development branches. No effect on master and maintenance. INFO: master/maintenance branch deploys artefacts on GitHub Packages - dev branches deploy qualified artefacts on GitHub Packages (global-artifacts)''') + dev branches deploy qualified artefacts on GitHub Packages (component-runtime)''') booleanParam( name: 'DOCKER_PUSH', defaultValue: false, @@ -442,7 +442,7 @@ pipeline { } } stage('Maven deploy - GitHub Packages') { - // Snapshots and qualified versions go on the global-artifacts packages (distributionManagement of the root pom) + // Snapshots and qualified versions go on the component-runtime packages (distributionManagement of the root pom) when { anyOf { expression { stdBranch_buildOnly } @@ -460,7 +460,7 @@ pipeline { """.stripIndent() } script { - JenkinsStatusController.jobDescriptionAppend("Maven artefact deployed as ${finalVersion} on [GitHub Packages](https://github.com/orgs/Talend/packages) ") + JenkinsStatusController.jobDescriptionAppend("Maven artefact deployed as ${finalVersion} on [GitHub Packages](https://github.com/Talend/component-runtime/packages) ") } } } diff --git a/pom.xml b/pom.xml index 51b202a99f9ff..6f0c74483a508 100644 --- a/pom.xml +++ b/pom.xml @@ -135,8 +135,8 @@ https://github.com/${scm.repository} - + github_packages GitHub Packages component-runtime @@ -144,8 +144,8 @@ github_packages - GitHub Packages global-artifacts - https://maven.pkg.github.com/Talend/global-artifacts + GitHub Packages component-runtime + https://maven.pkg.github.com/Talend/component-runtime diff --git a/repository-knowledge.md b/repository-knowledge.md index 6406568e11025..c07e78dffb41b 100644 --- a/repository-knowledge.md +++ b/repository-knowledge.md @@ -163,9 +163,11 @@ regular dependencies, not plugins); `UiSpecGeneratorMojoTest` covers the isolati ### Maven deploy targets (no more Sonatype, QTDI-3791) Sonatype/Maven Central and the internal Nexus are no longer used. The root `distributionManagement` uses the -single server id `github_packages`: snapshots/qualified versions go to the `global-artifacts` GitHub Packages -(``), release versions go to the packages of this repository (``). Maven picks -the target from the version, so no profile is needed. The studio modules are released like +single server id `github_packages`: snapshots/qualified versions (``) and release versions +(``) all go to the GitHub Packages of this repository (`Talend/component-runtime`, QTDI-3872). +Maven picks the section from the version, so no profile is needed. `global-artifacts` is only used to read +dependencies (``); consumers of component-runtime snapshots/qualified versions must declare +`https://maven.pkg.github.com/Talend/component-runtime` as a repository. The studio modules are released like any other module (no `system` scope restriction anymore). The `release` profile also attaches sources/javadoc and signs the artifacts (`gpg2` + the `gpg-keyring` settings profile). From 9530a16f1096ebad2598c4341d0add99d6eb384e Mon Sep 17 00:00:00 2001 From: Oleksandr Zhelezniak <66320870+ozhelezniak-talend@users.noreply.github.com> Date: Wed, 18 Nov 2026 09:19:53 +0200 Subject: [PATCH 5/9] chore(QTDI-3805): doc issue with antora version (#1326) * run the doc build before release:prepare so the tag holds all generated files (cherry picked from commit f64abd6329fcfdbb7775d0d4485a7ffb53e9c6bb) --- .jenkins/scripts/release/release-2-prepare.sh | 24 +++++++++++++++++++ repository-knowledge.md | 6 +++++ 2 files changed, 30 insertions(+) diff --git a/.jenkins/scripts/release/release-2-prepare.sh b/.jenkins/scripts/release/release-2-prepare.sh index aa182c0f1ea2b..cafcd5af589f6 100644 --- a/.jenkins/scripts/release/release-2-prepare.sh +++ b/.jenkins/scripts/release/release-2-prepare.sh @@ -40,6 +40,30 @@ main() { printf ">> Maven prepare release %s (next-dev: %s; tag: %s)\n" "${releaseVersion}" "${nextVersion}" "${tagName}" + # The documentation module generates tracked files (antora.yml, package-lock.json) + # from the project version. Build and commit them now, otherwise the tag keeps stale values and + # tags with the same antora version make the documentation site build fail (duplicate nav). + # The phase is process-sources on purpose: it is enough for antora.yml. The generated_*.adoc files + # need the compile and process-classes phases and are only regenerated by release-5. They are + # not in the tag. Only the version links in generated_sample-index.adoc can be old on a + # maintenance branch. + printf ">> Regenerate documentation files before tagging\n" + # The antora version is the SNAPSHOT version without suffix, which is the release version. + mvn clean process-sources --batch-mode \ + --projects documentation \ + --define skipTests \ + --define invoker.skip=true \ + --define checkstyle.skip \ + --define enforcer.skip=true \ + --define rat.skip \ + --settings .jenkins/settings.xml \ + "${extraBuildParams[@]}" + + if ! grep -qE "^version: '${releaseVersion%%-*}'$" documentation/src/main/antora/antora.yml; then + printf "WARN: antora.yml version is not %s\n" "${releaseVersion%%-*}" >&2 + fi + git commit -a -m "[jenkins-release] update generated documentation for ${releaseVersion}" || true + local release_profiles="release,gpg-keyring,gpg2" mvn release:prepare \ diff --git a/repository-knowledge.md b/repository-knowledge.md index c07e78dffb41b..7dd014498d93d 100644 --- a/repository-knowledge.md +++ b/repository-knowledge.md @@ -228,6 +228,12 @@ Jenkins instance `jenkins-connectors`. Jobs are registered in flux (Job DSL); th _Verified: QTDI-3623, 2026-11-09 against `component-runtime@c697eafca78`_ +### Antora version in `antora.yml` (QTDI-3805) + +`documentation/src/main/antora/antora.yml` is tracked but generated by Maven from `antora-template.yml`. `site.yml` loads every `component-runtime-*` tag, so two tags with the same `antora.yml` version fail the build with `Duplicate nav in @main`. Rules: +- `release-2-prepare.sh` runs `mvn clean process-sources --projects documentation` on the SNAPSHOT version and commits the result before `mvn release:prepare`, so the tag holds the regenerated `antora.yml`; `generated_*.adoc` are not regenerated at this phase (release-5 does it). The antora version is the SNAPSHOT version without suffix, which equals the release version; the script only warns if `antora.yml` differs. `package-lock.json` keeps `-SNAPSHOT` in the tag. The maintenance branch script does not write them. +- If a tag already has a wrong version, exclude it in `site-template.yml` (`'!component-runtime-'`, e.g. `1.2610.1`, `1.64.9`). + ## Coding rules delta No known repo-specific exceptions to the shared [coding-rules.md](https://github.com/Talend/di-ai-commons/blob/main/knowledge/rules/coding-rules.md). From dcdbc73c37c2c65f7f743bc37f4d8c7a0e407ade Mon Sep 17 00:00:00 2001 From: Oleksandr Zhelezniak <66320870+ozhelezniak-talend@users.noreply.github.com> Date: Fri, 20 Nov 2026 12:30:42 +0200 Subject: [PATCH 6/9] chore(QTDI-3849): Disable deps report stage by default (#1339) Run the Deps report stage only when FORCE_DEPS_REPORT is true. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 1c56c14ebf3482b15013f8c18f0fe89ca4d408fe) --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5c6c334edee7b..e0b0a2021c603 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -195,7 +195,7 @@ pipeline { booleanParam( name: 'FORCE_DEPS_REPORT', defaultValue: false, - description: 'Force dependencies report stage for branches.') + description: 'Force the dependencies report stage. The stage is skipped by default.') /////////////////////////////////////////////////////////////////////////////////////////////////////////////// separator(name: "EXPERT_CONFIG", @@ -545,10 +545,7 @@ pipeline { } stage('Deps report') { when { - anyOf { - expression { params.ACTION != 'RELEASE' && branch_name == 'master' } - expression { params.FORCE_DEPS_REPORT == true } - } + expression { params.FORCE_DEPS_REPORT == true } } steps { withCredentials([githubPackagesCredentials, From d6eb8debb7af6996d793ccda74aad0ba423d1501 Mon Sep 17 00:00:00 2001 From: OMH Date: Mon, 23 Nov 2026 10:39:44 +0800 Subject: [PATCH 7/9] chore(QTDI-3860): warn when antora.yml is not updated after the next iteration build (from #1346) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../scripts/release/release-5-prepare-next-iteration.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.jenkins/scripts/release/release-5-prepare-next-iteration.sh b/.jenkins/scripts/release/release-5-prepare-next-iteration.sh index 2588763d2153a..1850cb3f549c7 100644 --- a/.jenkins/scripts/release/release-5-prepare-next-iteration.sh +++ b/.jenkins/scripts/release/release-5-prepare-next-iteration.sh @@ -50,6 +50,14 @@ main() { --define rat.skip \ "${extraBuildParams[@]}" || true + # The install above ignores failures, so check that the documentation module regenerated antora.yml. + # A version left identical to the release tag makes the documentation site build fail (duplicate nav). + local devVersion + devVersion="$(grep -m1 -oP '(?<=)[^<]+' pom.xml || true)" + if ! grep -qE "^version: '${devVersion%%-*}'$" documentation/src/main/antora/antora.yml; then + printf "WARN: antora.yml version is not %s, the documentation build was probably skipped; fix it manually\n" "${devVersion%%-*}" >&2 + fi + printf "Push to github\n" # "|| true" is here to avoid blocking the jenkins pipeline when there is nothing to commit git commit -a -m "Updating doc for next iteration" || true From 8acd2bc6a20dbbdd8a0ae266d60346ea45282e72 Mon Sep 17 00:00:00 2001 From: OMH Date: Mon, 23 Nov 2026 10:55:32 +0800 Subject: [PATCH 8/9] chore(QTDI-3860): pin clirr comparison version to the last release (from #1345) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index 6f0c74483a508..0d693bab376b3 100644 --- a/pom.xml +++ b/pom.xml @@ -243,6 +243,8 @@ 3.6.0 2.8 + + 1.2610.1 1.0.7 2.0.0 9.0.2 @@ -1239,6 +1241,15 @@ maven-site-plugin ${maven-site-plugin.version} + + org.codehaus.mojo + clirr-maven-plugin + ${clirr-plugin.version} + + + ${clirr.comparison.version} + + org.apache.maven.plugins maven-release-plugin From 55672c082a0d156858d941d45791cf6d990309a5 Mon Sep 17 00:00:00 2001 From: OMH Date: Mon, 23 Nov 2026 14:51:28 +0800 Subject: [PATCH 9/9] chore(QTDI-3836): move maven plugin ITs to jdbc 1.2611.1 and remove the HikariCP exclusion (from #1348) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- talend-component-maven-plugin/pom.xml | 2 +- talend-component-maven-plugin/src/it/dependency/pom.xml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/talend-component-maven-plugin/pom.xml b/talend-component-maven-plugin/pom.xml index 316f74c9f7794..1b8302d4be55e 100644 --- a/talend-component-maven-plugin/pom.xml +++ b/talend-component-maven-plugin/pom.xml @@ -35,7 +35,7 @@ 2.1.1 - 1.31.1 + 1.2611.1 jdbc 1.2611.0-SNAPSHOT salesforce diff --git a/talend-component-maven-plugin/src/it/dependency/pom.xml b/talend-component-maven-plugin/src/it/dependency/pom.xml index 54b72f6a59760..fae845a854ae3 100644 --- a/talend-component-maven-plugin/src/it/dependency/pom.xml +++ b/talend-component-maven-plugin/src/it/dependency/pom.xml @@ -75,13 +75,6 @@ @it-component-version@ component car - - - - com.zaxxer - HikariCP - - org.talend.components