From 7193792107a85934edb3db5f54bc30d9671b946d Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 19 Jun 2024 11:37:04 -0300 Subject: [PATCH] Attempt to fix JIT executor native weekly job (#2072) * Attempt to fix JIT executor native weekly job * Fix secrets names * Fix secrets names --- .ci/jenkins/Jenkinsfile.weekly.deploy | 18 ++++++++++-------- .../workflows/publish-jitexecutor-native.yml | 13 +++++++++++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.weekly.deploy b/.ci/jenkins/Jenkinsfile.weekly.deploy index 7d346053a4..3805b9d509 100644 --- a/.ci/jenkins/Jenkinsfile.weekly.deploy +++ b/.ci/jenkins/Jenkinsfile.weekly.deploy @@ -118,14 +118,16 @@ pipeline { stage('Trigger JIT Executor Native GH workflow') { steps { script { - checkoutTag = getProjectVersion(false) - kogitoVersion = getProjectVersion() - withCredentials([usernamePassword(credentialsId: "${getGitAuthorPushCredsId()}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) { - sh """ - git config user.email ${GITHUB_USER}@jenkins.kie.apache.org - git config user.name ${GITHUB_USER} - gh workflow run "publish-jitexecutor-native.yml" --ref "${checkoutTag}" -f kogito_runtime_version="${kogitoVersion}" --repo="https://github.com/${getGitAuthor()}/${getRepoName()}" - """ + dir(getRepoName()) { + checkoutTag = getProjectVersion(false) + kogitoVersion = getProjectVersion() + withCredentials([usernamePassword(credentialsId: "${getGitAuthorPushCredsId()}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) { + sh """ + git config user.email ${GITHUB_USER}@jenkins.kie.apache.org + git config user.name ${GITHUB_USER} + gh workflow run "publish-jitexecutor-native.yml" --ref "${checkoutTag}" -f kogito_runtime_version="${kogitoVersion}" --repo="https://github.com/${getGitAuthor()}/${getRepoName()}" + """ + } } } } diff --git a/.github/workflows/publish-jitexecutor-native.yml b/.github/workflows/publish-jitexecutor-native.yml index 3bd6f0e505..e11e964aa6 100644 --- a/.github/workflows/publish-jitexecutor-native.yml +++ b/.github/workflows/publish-jitexecutor-native.yml @@ -62,8 +62,8 @@ jobs: java-version: "17" distribution: "zulu" server-id: apache.snapshots.https - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD + server-username: NEXUS_USER + server-password: NEXUS_PW - name: "Setup Linux" if: runner.os == 'Linux' @@ -134,6 +134,9 @@ jobs: - name: "Build and publish macOS" if: runner.os == 'macOS' && github.event_name != 'pull_request' shell: bash + env: + NEXUS_USER: ${{ secrets.NEXUS_USER }} + NEXUS_PW: ${{ secrets.NEXUS_PW }} run: | mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-darwin -am -Pjitexecutor-native @@ -146,6 +149,9 @@ jobs: - name: "Build and Publish Linux" if: runner.os == 'Linux' && github.event_name != 'pull_request' shell: bash + env: + NEXUS_USER: ${{ secrets.NEXUS_USER }} + NEXUS_PW: ${{ secrets.NEXUS_PW }} run: | mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-linux -am -Pjitexecutor-native @@ -158,6 +164,9 @@ jobs: - name: "Build and Publish Windows" if: runner.os == 'Windows' && github.event_name != 'pull_request' shell: pwsh + env: + NEXUS_USER: ${{ secrets.NEXUS_USER }} + NEXUS_PW: ${{ secrets.NEXUS_PW }} run: | mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-win32 -am -Pjitexecutor-native