Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .jenkins/scripts/release/release-3.1-perform-studio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Comment thread
lxia-talend marked this conversation as resolved.
--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" \
Expand Down
10 changes: 10 additions & 0 deletions .jenkins/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@
<timeout>30000</timeout>
</configuration>
</server>
<server>
<id>github_package_snapshots</id>
<username>${env.GITHUB_PACKAGES_LOGIN}</username>
<password>${env.GITHUB_PACKAGES_TOKEN}</password>
</server>
<server>
<id>github_package_releases</id>
<username>${env.GITHUB_PACKAGES_LOGIN}</username>
<password>${env.GITHUB_PACKAGES_TOKEN}</password>
</server>
<server>
<id>talend.snapshots</id>
<username>${env.NEXUS_USER}</username>
Expand Down
34 changes: 34 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 <oss.sonatype.org>
dev branches deploy artefacts on <artifacts-zl.talend.com>''')
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,
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions ci/Jenkinsfile-release
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -468,6 +472,7 @@ pipeline {
}
steps {
withCredentials([nexusCredentials,
githubPackagesCredentials,
ossrhCredentials,
jiraCredentials,
gpgCredentials]) {
Expand Down
Loading