diff --git a/.jenkins/scripts/release/release-3.1-perform-studio.sh b/.jenkins/scripts/release/release-3.1-perform-studio.sh
index da5bdbeada733..84a0a8775b152 100644
--- a/.jenkins/scripts/release/release-3.1-perform-studio.sh
+++ b/.jenkins/scripts/release/release-3.1-perform-studio.sh
@@ -34,6 +34,16 @@ main() {
# 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" \
diff --git a/.jenkins/settings.xml b/.jenkins/settings.xml
index b1144552d2cfc..35e0b0179c350 100644
--- a/.jenkins/settings.xml
+++ b/.jenkins/settings.xml
@@ -56,6 +56,16 @@
30000
+
+ github_package_snapshots
+ ${env.GITHUB_PACKAGES_LOGIN}
+ ${env.GITHUB_PACKAGES_TOKEN}
+
+
+ github_package_releases
+ ${env.GITHUB_PACKAGES_LOGIN}
+ ${env.GITHUB_PACKAGES_TOKEN}
+
talend.snapshots
${env.NEXUS_USER}
diff --git a/Jenkinsfile b/Jenkinsfile
index edec2e2e469ea..2acc42e2ea2d8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -37,6 +37,10 @@ final def gitCredentials = usernamePassword(
credentialsId: 'github-credentials',
usernameVariable: 'GITHUB_LOGIN',
passwordVariable: 'GITHUB_TOKEN')
+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',
@@ -154,6 +158,12 @@ pipeline {
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.''')
booleanParam(
name: 'DOCKER_PUSH',
defaultValue: false,
@@ -471,6 +481,30 @@ 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.
+ 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()
+ }
+ }
+ }
+ }
+ }
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)
diff --git a/ci/Jenkinsfile-release b/ci/Jenkinsfile-release
index 32e17721deb40..c87f2dbd5c59e 100644
--- a/ci/Jenkinsfile-release
+++ b/ci/Jenkinsfile-release
@@ -23,6 +23,10 @@ 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',
+ passwordVariable: 'GITHUB_PACKAGES_TOKEN')
final def jetbrainsCredentials = usernamePassword(
credentialsId: 'jetbrains-credentials',
usernameVariable: 'JETBRAINS_USER',
@@ -468,6 +472,7 @@ pipeline {
}
steps {
withCredentials([nexusCredentials,
+ githubPackagesCredentials,
ossrhCredentials,
jiraCredentials,
gpgCredentials]) {