You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by js...@apache.org on 2023/12/08 13:08:37 UTC

(incubator-kie-kogito-pipelines) branch main updated: kie-issues#632: fix kogito-images jenkins pipelines (#1129)

This is an automated email from the ASF dual-hosted git repository.

jstastnycz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-pipelines.git


The following commit(s) were added to refs/heads/main by this push:
     new f923878d kie-issues#632: fix kogito-images jenkins pipelines (#1129)
f923878d is described below

commit f923878dfdfaf541cc7ddad53d77b750a5c717df
Author: Jan Stastny <st...@gmail.com>
AuthorDate: Fri Dec 8 14:08:31 2023 +0100

    kie-issues#632: fix kogito-images jenkins pipelines (#1129)
    
    * kie-issues#632 fix kogito-images jenkins pipelines
    
    * adjust gha workflows
    
    ---------
    
    Co-authored-by: jstastny-cz <ja...@ibm.com>
---
 .ci/jenkins/config/branch.yaml                          |  4 ++--
 .../groovy/org/kie/jenkins/JenkinsfileNightly.groovy    | 17 +++++++++--------
 .github/workflows/jenkins-dsl-downstream.yml            |  6 +++---
 .github/workflows/jenkins-tests.yml                     |  8 +-------
 .github/workflows/pr-backporting.yml                    |  4 ++--
 .../org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy     |  6 +++---
 6 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml
index d2a7b655..38f83846 100644
--- a/.ci/jenkins/config/branch.yaml
+++ b/.ci/jenkins/config/branch.yaml
@@ -100,9 +100,9 @@ maven:
     creds_id: TO_DEFINE
 cloud:
   image:
-    registry_credentials: tradisso_registry_token # TODO set to `kogito-quay-token`
+    registry_credentials: quay_kiegroup_registry_token
     registry: quay.io
-    namespace: tradisso # TODO set to `kiegroup` after testing
+    namespace: kiegroup
     latest_git_branch: main
 jenkins:
   email_creds_id: KOGITO_CI_NOTIFICATION_EMAILS
diff --git a/.ci/jenkins/tests/src/test/groovy/org/kie/jenkins/JenkinsfileNightly.groovy b/.ci/jenkins/tests/src/test/groovy/org/kie/jenkins/JenkinsfileNightly.groovy
index ac94b2e8..c83ca0da 100644
--- a/.ci/jenkins/tests/src/test/groovy/org/kie/jenkins/JenkinsfileNightly.groovy
+++ b/.ci/jenkins/tests/src/test/groovy/org/kie/jenkins/JenkinsfileNightly.groovy
@@ -43,6 +43,7 @@ class TestJenkinsfileNightly extends SingleFileDeclarativePipelineTest {
         addEnvVar('GIT_BRANCH_NAME', 'BRANCH')
         addEnvVar('GIT_AUTHOR', 'AUTHOR')
         addEnvVar('GIT_AUTHOR_CREDS_ID', 'AUTHOR_CREDS_ID')
+        addEnvVar('GIT_AUTHOR_PUSH_CREDS_ID', 'AUTHOR_PUSH_CREDS_ID')
         addEnvVar('JENKINS_EMAIL_CREDS_ID', 'KOGITO_CI_EMAIL_TO')
         addEnvVar('STAGE_NAME', 'STAGE_NAME')
         addEnvVar('BUILD_NUMBER', 'BUILD_NUMBER')
@@ -73,9 +74,9 @@ class TestJenkinsfileNightly extends SingleFileDeclarativePipelineTest {
             'kogito-apps' : [:],
             'kogito-examples': [:],
         ])
-        assertTestCallstackContains('githubscm.resolveRepository', 'kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.resolveRepository', 'incubator-kie-kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
         assertTestCallstackContains('githubscm.createBranch', 'nightly-BRANCH')
-        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_PUSH_CREDS_ID')
     }
 
     @Test
@@ -94,9 +95,9 @@ class TestJenkinsfileNightly extends SingleFileDeclarativePipelineTest {
             'kogito-examples': [:],
         ], true)
 
-        assertTestCallstackContains('githubscm.resolveRepository', 'kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.resolveRepository', 'incubator-kie-kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
         assertTestCallstackContains('githubscm.createBranch', 'nightly-BRANCH')
-        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_PUSH_CREDS_ID')
     }
 
     @Test
@@ -122,9 +123,9 @@ class TestJenkinsfileNightly extends SingleFileDeclarativePipelineTest {
             'kogito-examples': [:],
         ])
 
-        assertTestCallstackContains('githubscm.resolveRepository', 'kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.resolveRepository', 'incubator-kie-kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
         assertTestCallstackContains('githubscm.createBranch', 'nightly-BRANCH')
-        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_PUSH_CREDS_ID')
     }
 
     @Test
@@ -150,9 +151,9 @@ class TestJenkinsfileNightly extends SingleFileDeclarativePipelineTest {
             'kogito-examples': [:],
         ])
 
-        assertTestCallstackContains('githubscm.resolveRepository', 'kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.resolveRepository', 'incubator-kie-kogito-examples, AUTHOR, BRANCH, false, AUTHOR_CREDS_ID')
         assertTestCallstackContains('githubscm.createBranch', 'nightly-BRANCH')
-        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_CREDS_ID')
+        assertTestCallstackContains('githubscm.pushObject', 'origin, nightly-BRANCH, AUTHOR_PUSH_CREDS_ID')
     }
 
     @Test
diff --git a/.github/workflows/jenkins-dsl-downstream.yml b/.github/workflows/jenkins-dsl-downstream.yml
index 509c834d..cc85bdf9 100644
--- a/.github/workflows/jenkins-dsl-downstream.yml
+++ b/.github/workflows/jenkins-dsl-downstream.yml
@@ -152,7 +152,7 @@ jobs:
           echo 'BASE_BRANCH=${{ github.base_ref }}' >> $GITHUB_ENV
 
       - name: DSL tests
-        uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
+        uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
         with:
           project: kogito
           repository: ${{ matrix.repository }}
@@ -316,7 +316,7 @@ jobs:
           echo 'BASE_BRANCH=development' >> $GITHUB_ENV
       
       - name: DSL tests
-        uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
+        uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
         with:
           project: optaplanner
           repository: ${{ matrix.repository }}
@@ -475,7 +475,7 @@ jobs:
           echo 'BASE_BRANCH=${{ github.base_ref }}' >> $GITHUB_ENV
       
       - name: DSL tests
-        uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
+        uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
         with:
           project: drools
           repository: ${{ matrix.repository }}
diff --git a/.github/workflows/jenkins-tests.yml b/.github/workflows/jenkins-tests.yml
index 7624e439..a8100a80 100644
--- a/.github/workflows/jenkins-tests.yml
+++ b/.github/workflows/jenkins-tests.yml
@@ -24,12 +24,6 @@ jobs:
       with:
         path: main
 
-    - name: Checkout shared libraries
-      uses: actions/checkout@v3
-      with:
-        repository: kiegroup/jenkins-pipeline-shared-libraries
-        path: shared-libs
-
     - name: Set up JDK 1.8
       uses: actions/setup-java@v3
       with:
@@ -47,7 +41,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - name: DSL tests
-      uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
+      uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
       with:
         main-config-file-repo: apache/incubator-kie-kogito-pipelines
         main-config-file-path: .ci/jenkins/config/main.yaml
diff --git a/.github/workflows/pr-backporting.yml b/.github/workflows/pr-backporting.yml
index 36423239..8ac662d5 100644
--- a/.github/workflows/pr-backporting.yml
+++ b/.github/workflows/pr-backporting.yml
@@ -18,7 +18,7 @@ jobs:
     steps:
       - name: Set target branches
         id: set-targets
-        uses: kiegroup/kie-ci/.ci/actions/parse-labels@main
+        uses: apache/incubator-kie-kogito-pipelines/.ci/actions/parse-labels@main
         with:
           labels: ${LABELS}
   
@@ -33,6 +33,6 @@ jobs:
       fail-fast: false
     steps:
       - name: Backporting
-        uses: kiegroup/kie-ci/.ci/actions/backporting@main
+        uses: apache/incubator-kie-kogito-pipelines/.ci/actions/backporting@main
         with:
           target-branch: ${{ matrix.target-branch }}
diff --git a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
index cbd49a70..d1789571 100644
--- a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
+++ b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
@@ -485,11 +485,11 @@ class KogitoJobTemplate {
         return "(.*${RegexUtils.getRegexFirstLetterCase('jenkins')},?.*(rerun|run) ${idStr}${testType}.*)"
     }
 
-    static def createPullRequestMultibranchPipelineJob(def script, String jenkinsFilePath = '.ci/jenkins/Jenkinsfile') {
+    static def createPullRequestMultibranchPipelineJob(def script, String jenkinsFilePath = '.ci/jenkins/Jenkinsfile', String folderName='pullrequest_jobs') {
         String jobName = "${Utils.getJobDisplayName(script)}-pr"
         PrintUtils.debug(script, "Create pull request multibranch job ${jobName}")
-        script.folder('pullrequest_jobs')
-        return script.multibranchPipelineJob("pullrequest_jobs/${Utils.getJobDisplayName(script)}-pr")?.with {
+        script.folder(folderName)
+        return script.multibranchPipelineJob("${folderName}/${Utils.getJobDisplayName(script)}-pr")?.with {
             triggers {
                 periodicFolderTrigger {
                     // The maximum amount of time since the last indexing that is allowed to elapse before an indexing is triggered.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org