Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.0.x] NO-ISSUE: Release jobs adjustments for the Apache 10 release #2556

Merged
merged 3 commits into from
Sep 6, 2024
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
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
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
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.weekly-publish
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
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
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pipeline {
if (params.DRY_RUN) {
env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true'
}
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pipeline {
if (params.DRY_RUN) {
env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true'
}
withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
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'
Expand Down
7 changes: 4 additions & 3 deletions .ci/jenkins/shared-scripts/pipelineVars.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ class PipelineVars implements Serializable {
String asfGithubPushCredentialsId = '84811880-2025-45b6-a44c-2f33bef30ad2'
String asfGithubTokenPushCredentialsId = '41128c14-bb63-4708-9074-d20a318ee630'
String mavenSettingsConfigFileId = 'kie-release-settings'
String mavenDeployRepositoryCredentialsId = 'apache-nexus-kie-deploy-credentials'
String mavenDeploySnapshotsCredentialsId = 'apache-nexus-kie-deploy-credentials'
String mavenDeployStagingCredentialsId = 'jenkins-deploy-to-nexus-staging'
String defaultArtifactsTempDir = 'artifacts-tmp'
String asfReleaseStagingRepository = 'https://dist.apache.org/repos/dist/dev/incubator/kie'
String asfReleaseGPGKeyCredentialsId = 'GPG_KEY'
String asfReleaseSVNStagingCredentialsId = 'kie-dist-acct'
String asfReleaseGPGKeyCredentialsId = 'GPG_KEY_FILE'
String asfReleaseSVNStagingCredentialsId = 'kie-svn-credentials'
String kieToolsCiBuildImageRegistry = 'docker.io'
String kieToolsCiBuildImageAccount = 'apache'
String kieToolsCiBuildImageName = 'incubator-kie-tools-ci-build'
Expand Down
10 changes: 4 additions & 6 deletions .ci/jenkins/shared-scripts/releaseUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
def setupSigningKey(String gpgKeyCredentialsId) {
withCredentials([string(credentialsId: gpgKeyCredentialsId, variable: 'SIGNING_KEY')]) {
sh """#!/bin/bash -el
echo "${SIGNING_KEY}" > ${WORKSPACE}/signkey.gpg
gpg --list-keys
gpg --batch --pinentry-mode loopback --import ${WORKSPACE}/signkey.gpg
rm ${WORKSPACE}/signkey.gpg
gpg --batch --pinentry-mode=loopback --import $SIGNING_KEY
""".trim()
}
}
Expand All @@ -45,10 +43,10 @@ def signArtifact(String artifactFileName) {
def publishArtifacts(String artifactsDir, String releaseRepository, String releaseVersion, String credentialsId) {
withCredentials([usernamePassword(credentialsId: credentialsId, usernameVariable: 'ASF_USERNAME', passwordVariable: 'ASF_PASSWORD')]) {
sh """#!/bin/bash -el
svn co --depth=empty ${releaseRepository} svn-kie
cp ${artifactsDir}/* svn-kie/${releaseVersion}/
svn add "svn-kie/${releaseVersion}"
svn co --depth=empty ${releaseRepository}/${releaseVersion} svn-kie
cp ${artifactsDir}/* svn-kie
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username ${ASF_USERNAME} --password '${ASF_PASSWORD}' -m "Apache KIE ${releaseVersion} artifacts"
rm -rf svn-kie
""".trim()
Expand Down
30 changes: 12 additions & 18 deletions .github/workflows/release_build_extended_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ jobs:
run: |
pnpm ${{ steps.bootstrap.outputs.pnpm_filter_string }} build:prod

- name: Import GPG key
if: github.event_name != 'pull_request'
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
with:
gpg_private_key: ${{ secrets.GPG_KEY }}

- name: "Upload Extended Services for macOS"
if: ${{ runner.os == 'macOS' && !inputs.dry_run && !inputs.release_candidate }}
uses: actions/[email protected]
Expand Down Expand Up @@ -129,14 +135,8 @@ jobs:
if: ${{ runner.os == 'macOS' && !inputs.dry_run && inputs.release_candidate }}
shell: bash
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
ARTIFACT_ZIP_FILE: ${{ steps.macos_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
rm ${WORKSPACE}/signkey.gpg
echo $GPG_KEY > ${WORKSPACE}/signkey.gpg
gpg --list-keys
gpg --batch --pinentry-mode loopback --import ${WORKSPACE}/signkey.gpg
rm ${WORKSPACE}/signkey.gpg
gpg --no-tty --batch --sign --pinentry-mode loopback --output $ARTIFACT_ZIP_FILE.asc --detach-sig $ARTIFACT_ZIP_FILE
shasum -a 512 $ARTIFACT_ZIP_FILE > $ARTIFACT_ZIP_FILE.sha512

Expand All @@ -149,10 +149,10 @@ jobs:
PROJECT_VERSION: ${{ inputs.release_candidate_version }}
ARTIFACT_ZIP_FILE: ${{ steps.macos_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie svn-kie
cp ./extended-services-release-artifacts/* svn-kie/$PROJECT_VERSION/
svn add "svn-kie/$PROJECT_VERSION"
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie/$PROJECT_VERSION/ svn-kie
cp ./extended-services-release-artifacts/* svn-kie
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username "$SVN_USERNAME" --password "$SVN_PASSWORD" -m "Apache KIE $PROJECT_VERSION Extended Services for macOS artifact"
rm -rf svn-kie

Expand All @@ -172,14 +172,8 @@ jobs:
if: ${{ runner.os == 'Windows' && !inputs.dry_run && inputs.release_candidate }}
shell: pwsh
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
ARTIFACT_ZIP_FILE: ${{ steps.windows_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
rm ${WORKSPACE}/signkey.gpg
echo $GPG_KEY > ${WORKSPACE}/signkey.gpg
gpg --list-keys
gpg --batch --pinentry-mode loopback --import ${WORKSPACE}/signkey.gpg
rm ${WORKSPACE}/signkey.gpg
gpg --no-tty --batch --sign --pinentry-mode loopback --output $ARTIFACT_ZIP_FILE.asc --detach-sig $ARTIFACT_ZIP_FILE
shasum -a 512 $ARTIFACT_ZIP_FILE > $ARTIFACT_ZIP_FILE.sha512

Expand All @@ -192,9 +186,9 @@ jobs:
PROJECT_VERSION: ${{ inputs.release_candidate_version }}
ARTIFACT_ZIP_FILE: ${{ steps.windows_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie svn-kie
cp ./extended-services-release-artifacts/* svn-kie/$PROJECT_VERSION/
svn add "svn-kie/$PROJECT_VERSION"
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie/$PROJECT_VERSION/ svn-kie
cp ./extended-services-release-artifacts/* svn-kie
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username "$SVN_USERNAME" --password "$SVN_PASSWORD" -m "Apache KIE $PROJECT_VERSION Extended Services for Windows artifact"
rm -rf svn-kie
Loading