Skip to content

Commit

Permalink
Trigger jitexecutor-native Github workflow as part of the Kogito Apps…
Browse files Browse the repository at this point in the history
… weekly job
  • Loading branch information
rodrigonull committed May 21, 2024
1 parent 3f2550c commit 5ed5da4
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .ci/jenkins/Jenkinsfile.weekly.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pipeline {

KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")

MAVEN_DEPLOY_LOCAL_DIR = "/tmp/maven_deploy_dir"
MAVEN_DEPLOY_LOCAL_DIR = '/tmp/maven_deploy_dir'
}

stages {
Expand Down Expand Up @@ -114,6 +114,22 @@ 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()}"
"""
}
}
}
}
}
post {
always {
Expand Down Expand Up @@ -209,7 +225,7 @@ void runMavenLocalDeploy(boolean skipTests = true) {
mvnCmd = getMavenCommand()
mvnCmd.withLocalDeployFolder(getLocalDeploymentFolder())

configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
mvnCmd.withProperty('maven.test.failure.ignore', true)
.withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
.withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
Expand All @@ -235,7 +251,7 @@ String getProjectVersionDate() {
String getProjectVersion(boolean keepSnapshotSuffix = true) {
def projectVersion = env.PROJECT_VERSION
if (keepSnapshotSuffix) {
return projectVersion.replace("-SNAPSHOT", "-${getProjectVersionDate()}-SNAPSHOT")
return projectVersion.replace('-SNAPSHOT', "-${getProjectVersionDate()}-SNAPSHOT")
}
return projectVersion.replace("-SNAPSHOT", "-${getProjectVersionDate()}")
return projectVersion.replace('-SNAPSHOT', "-${getProjectVersionDate()}")
}

0 comments on commit 5ed5da4

Please sign in to comment.