Skip to content

Commit

Permalink
Attempt to fix JIT executor native weekly job (#2072)
Browse files Browse the repository at this point in the history
* Attempt to fix JIT executor native weekly job

* Fix secrets names

* Fix secrets names
  • Loading branch information
rodrigonull authored Jun 19, 2024
1 parent b78db84 commit 7193792
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .ci/jenkins/Jenkinsfile.weekly.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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()}"
"""
}
}
}
}
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/publish-jitexecutor-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7193792

Please sign in to comment.