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

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


The following commit(s) were added to refs/heads/main by this push:
     new b63aa636e44 kie-issues#765: Fix remaining issues on KIE Tools Jenkins 
jobs right after the migration to Apache (#2094)
b63aa636e44 is described below

commit b63aa636e44d0716cf21d8775e3530748103af2e
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Wed Dec 13 19:26:57 2023 -0300

    kie-issues#765: Fix remaining issues on KIE Tools Jenkins jobs right after 
the migration to Apache (#2094)
---
 .ci/jenkins/Jenkinsfile.daily-dev-publish          | 12 +++++----
 .ci/jenkins/Jenkinsfile.staging-build              |  3 +++
 .ci/jenkins/ci-jobs/Jenkinsfile.ci-build           |  2 +-
 .ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt  |  2 +-
 .ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql    |  2 +-
 .../ci-jobs/Jenkinsfile.ci-check-dependencies      |  2 +-
 .ci/jenkins/ci-jobs/Jenkinsfile.ci-image-build     |  2 +-
 .../release-jobs/Jenkinsfile.chrome-extensions     | 14 +++++++---
 .ci/jenkins/release-jobs/Jenkinsfile.online-editor |  3 +++
 .../Jenkinsfile.standalone-editors-cdn             |  3 +++
 .ci/jenkins/shared-scripts/chromeStoreUtils.groovy | 30 ++++++++++++----------
 .ci/jenkins/shared-scripts/githubUtils.groovy      |  9 -------
 .ci/jenkins/shared-scripts/pipelineVars.groovy     |  2 ++
 .ci/kie-tools-ci-build.Dockerfile                  |  2 ++
 14 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.daily-dev-publish 
b/.ci/jenkins/Jenkinsfile.daily-dev-publish
index 004c0991c7a..e6377f73e6c 100644
--- a/.ci/jenkins/Jenkinsfile.daily-dev-publish
+++ b/.ci/jenkins/Jenkinsfile.daily-dev-publish
@@ -380,17 +380,19 @@ pipeline {
                         )
 
                         sh """#!/bin/bash -el
+                        git config user.email [email protected]
+                        git config user.name asf-ci-kie
                         git checkout gh-pages
                         rm -rf dev && mkdir -p dev/editors
-                        cp -RL ../kie-tools/packages/stunner-editors/dist/dmn 
dev/editors/
-                        cp -RL ../kie-tools/packages/stunner-editors/dist/bpmn 
dev/editors/
-                        cp -RL 
../kie-tools/packages/stunner-editors/dist/scesim dev/editors/
-                        cp -r ../kie-tools/packages/online-editor/dist/* dev/
+                        cp -RL 
${WORKSPACE}/kie-tools/packages/stunner-editors/dist/dmn dev/editors/
+                        cp -RL 
${WORKSPACE}/kie-tools/packages/stunner-editors/dist/bpmn dev/editors/
+                        cp -RL 
${WORKSPACE}/kie-tools/packages/stunner-editors/dist/scesim dev/editors/
+                        cp -r 
${WORKSPACE}/kie-tools/packages/online-editor/dist/* dev/
                         rm -rf dev/gwt-editors
                         ln -s editors dev/gwt-editors
                         git add . && git commit -m "Apache KIE Tools Daily Dev 
Build resources - ${env.BUILD_DATE}" || echo 'No changes.'
                         """.trim()
-
+                            
                         githubUtils.pushObject('origin', 'gh-pages', 
"${pipelineVars.asfGithubPushCredentialsId}")
                     }
                 }
diff --git a/.ci/jenkins/Jenkinsfile.staging-build 
b/.ci/jenkins/Jenkinsfile.staging-build
index 7d7e6a6f48b..0ceeb2c7c69 100644
--- a/.ci/jenkins/Jenkinsfile.staging-build
+++ b/.ci/jenkins/Jenkinsfile.staging-build
@@ -846,6 +846,9 @@ def deployOnlineEditor(String tag, String credentialsId) {
     DEPLOYMENT_DIR = "${tag}-prerelease"
 
     sh """#!/bin/bash -el
+    git config user.email [email protected]
+    git config user.name asf-ci-kie
+    
     echo "Switch to main branch"
     git checkout main
 
diff --git a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-build 
b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-build
index 26dae10fd9b..5495b13bc7c 100644
--- a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-build
+++ b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-build
@@ -18,7 +18,7 @@ pipeline {
     agent any
 
     options {
-        timeout(time: 360, unit: 'MINUTES')
+        timeout(time: 600, unit: 'MINUTES')
     }
 
     parameters {
diff --git a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt 
b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt
index d6bdb3267e9..0214ec331b4 100644
--- a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt
+++ b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt
@@ -18,7 +18,7 @@ pipeline {
     agent any
 
     options {
-        timeout(time: 30, unit: 'MINUTES')
+        timeout(time: 240, unit: 'MINUTES')
     }
 
     parameters {
diff --git a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql 
b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql
index 66a0813ef06..386c3976295 100644
--- a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql
+++ b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql
@@ -18,7 +18,7 @@ pipeline {
     agent any
 
     options {
-        timeout(time: 60, unit: 'MINUTES')
+        timeout(time: 240, unit: 'MINUTES')
     }
 
     parameters {
diff --git a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-dependencies 
b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-dependencies
index 657db53849c..75f0c200148 100644
--- a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-dependencies
+++ b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-check-dependencies
@@ -18,7 +18,7 @@ pipeline {
     agent any
 
     options {
-        timeout(time: 30, unit: 'MINUTES')
+        timeout(time: 240, unit: 'MINUTES')
     }
 
     parameters {
diff --git a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-image-build 
b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-image-build
index 14732e1e35f..eee942ddb27 100644
--- a/.ci/jenkins/ci-jobs/Jenkinsfile.ci-image-build
+++ b/.ci/jenkins/ci-jobs/Jenkinsfile.ci-image-build
@@ -29,7 +29,7 @@ pipeline {
     }
 
     options {
-        timeout(time: 60, unit: 'MINUTES')
+        timeout(time: 240, unit: 'MINUTES')
     }
 
     stages {
diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions 
b/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions
index 342d49a17bd..dec6a9ba5f3 100644
--- a/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions
+++ b/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions
@@ -162,6 +162,9 @@ pipeline {
                         CHROME_EXTENSION_DIR = "chrome-extension/${params.TAG}"
 
                         sh """#!/bin/bash -el
+                        git config user.email [email protected]
+                        git config user.name asf-ci-kie
+
                         git checkout gh-pages
 
                         echo "Copy Chrome Extension resources"
@@ -193,7 +196,7 @@ pipeline {
                         "${pipelineVars.chromeStoreCredentialsId}",
                         "${pipelineVars.chromeStoreRefreshTokenCredentialsId}",
                         
"kie-tools/packages/chrome-extension-pack-kogito-kie-editors/dist/chrome_extension_kogito_kie_editors_${params.TAG}.zip",
-                        'EXTENSION_ID'
+                        "${pipelineVars.chromeExtensionIdCredentialsId}"
                     )
                 }
             }
@@ -219,7 +222,7 @@ pipeline {
                     env.CHROME_EXTESION_KIE_EDITORS_PUBLISH_STATUS = 
chromeStoreUtils.publishExtension(
                         "${pipelineVars.chromeStoreCredentialsId}",
                         "${pipelineVars.chromeStoreRefreshTokenCredentialsId}",
-                        'EXTENSION_ID'
+                        "${pipelineVars.chromeExtensionIdCredentialsId}"
                     )
                 }
             }
@@ -263,6 +266,9 @@ pipeline {
                         DEPLOYMENT_DIR = "swf-chrome-extension/${params.TAG}"
 
                         sh """#!/bin/bash -el
+                        git config user.email [email protected]
+                        git config user.name asf-ci-kie
+                        
                         git checkout gh-pages
 
                         echo "Copy Chrome Extension resources"
@@ -291,7 +297,7 @@ pipeline {
                         "${pipelineVars.chromeStoreCredentialsId}",
                         "${pipelineVars.chromeStoreRefreshTokenCredentialsId}",
                         
"kie-tools/packages/chrome-extension-serverless-workflow-editor/dist/chrome_extension_serverless_workflow_editor_${params.TAG}.zip",
-                        'EXTENSION_ID'
+                        "${pipelineVars.swfChromeExtensionIdCredentialsId}"
                     )
                 }
             }
@@ -317,7 +323,7 @@ pipeline {
                     
env.CHROME_EXTESION_SERVERLESS_WORKFLOW_EDITOR_PUBLISH_STATUS = 
chromeStoreUtils.publishExtension(
                         "${pipelineVars.chromeStoreCredentialsId}",
                         "${pipelineVars.chromeStoreRefreshTokenCredentialsId}",
-                        'EXTENSION_ID'
+                        "${pipelineVars.swfChromeExtensionIdCredentialsId}"
                     )
                 }
             }
diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.online-editor 
b/.ci/jenkins/release-jobs/Jenkinsfile.online-editor
index d29eb30b92a..d91e521f7f8 100644
--- a/.ci/jenkins/release-jobs/Jenkinsfile.online-editor
+++ b/.ci/jenkins/release-jobs/Jenkinsfile.online-editor
@@ -158,6 +158,9 @@ pipeline {
                         EDITORS_DIR = "editors/${params.TAG}"
 
                         sh """#!/bin/bash -el
+                        git config user.email [email protected]
+                        git config user.name asf-ci-kie
+                        
                         git checkout gh-pages
 
                         echo "Reset deployment dir"
diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn 
b/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn
index 52367593089..3f185a0deb7 100644
--- a/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn
+++ b/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn
@@ -134,6 +134,9 @@ pipeline {
                         STANDALONE_EDITORS_DIR = "standalone/${params.TAG}"
 
                         sh """#!/bin/bash -el
+                        git config user.email [email protected]
+                        git config user.name asf-ci-kie
+                        
                         git checkout gh-pages
 
                         echo "Copy standalone resources"
diff --git a/.ci/jenkins/shared-scripts/chromeStoreUtils.groovy 
b/.ci/jenkins/shared-scripts/chromeStoreUtils.groovy
index 610df262af5..d1f64d50a66 100644
--- a/.ci/jenkins/shared-scripts/chromeStoreUtils.groovy
+++ b/.ci/jenkins/shared-scripts/chromeStoreUtils.groovy
@@ -20,13 +20,15 @@
 *
 * @return String status
 */
-def uploadExtension(String chromeStoreCredentialsId, String 
chromeStoreRefreshTokenCredentialsId, String file, String extensionId) {
-    withCredentials([usernamePassword(credentialsId: chromeStoreCredentialsId, 
usernameVariable: 'CLIENT_ID', passwordVariable: 'CLIENT_SECRET')]) {
-        withCredentials([string(credentialsId: 
"${pipelineVars.chromeStoreRefreshTokenCredentialsId}", variable: 
'REFRESH_TOKEN')]) {
-            accessToken = sh(returnStdout: true, script: "curl -X POST -fsS 
\"https://oauth2.googleapis.com/token\"; -d 
\"client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token\"
 | jq -r '.access_token'").trim()
-            uploadResponse = sh(returnStdout: true, script: "curl -X PUT -sS 
\"https://www.googleapis.com/upload/chromewebstore/v1.1/items/${extensionId}\"; 
-H \"Authorization: Bearer ${accessToken}\" -H \"x-goog-api-version:2\" -T 
${file}").trim()
+def uploadExtension(String chromeStoreCredentialsId, String 
chromeStoreRefreshTokenCredentialsId, String file, String 
chromeExtensionIdCredentialsId) {
+    withCredentials([usernamePassword(credentialsId: 
"${chromeStoreCredentialsId}", usernameVariable: 'CLIENT_ID', passwordVariable: 
'CLIENT_SECRET')]) {
+        withCredentials([string(credentialsId: 
"${chromeStoreRefreshTokenCredentialsId}", variable: 'REFRESH_TOKEN')]) {
+            withCredentials([string(credentialsId: 
"${chromeExtensionIdCredentialsId}", variable: 'EXTENSION_ID')]) {
+                accessToken = sh(returnStdout: true, script: "curl -X POST 
-fsS \"https://oauth2.googleapis.com/token\"; -d 
\"client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token\"
 | jq -r '.access_token'").trim()
+                uploadResponse = sh(returnStdout: true, script: "curl -X PUT 
-sS 
\"https://www.googleapis.com/upload/chromewebstore/v1.1/items/${EXTENSION_ID}\"; 
-H \"Authorization: Bearer ${accessToken}\" -H \"x-goog-api-version:2\" -T 
${file}").trim()
 
-            return sh(returnStdout: true, script: "echo \"${uploadResponse}\" 
| jq -r '.uploadState'").trim()
+                return sh(returnStdout: true, script: "echo 
\"${uploadResponse}\" | jq -r '.uploadState'").trim()
+            }
         }
     }
 }
@@ -36,14 +38,16 @@ def uploadExtension(String chromeStoreCredentialsId, String 
chromeStoreRefreshTo
 *
 * @return String status
 */
-def publishExtension(String chromeStoreCredentialsId, String 
chromeStoreRefreshTokenCredentialsId, String extensionId) {
-   withCredentials([usernamePassword(credentialsId: 
"${pipelineVars.chromeStoreCredentialsId}", usernameVariable: 'CLIENT_ID', 
passwordVariable: 'CLIENT_SECRET')]) {
-        withCredentials([string(credentialsId: 
"${pipelineVars.chromeStoreRefreshTokenCredentialsId}", variable: 
'REFRESH_TOKEN')]) {
-            script {
-                accessToken = sh(returnStdout: true, script: "curl -X POST 
-fsS \"https://oauth2.googleapis.com/token\"; -d 
\"client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token\"
 | jq -r '.access_token'").trim()
-                publishResponse = sh(returnStdout: true, script: "curl -X POST 
-sS 
\"https://www.googleapis.com/chromewebstore/v1.1/items/${extensionId}/publish\"; 
-H \"Authorization: Bearer ${accessToken}\" -H \"x-goog-api-version:2\" -H 
\"Content-Length:\"").trim()
+def publishExtension(String chromeStoreCredentialsId, String 
chromeStoreRefreshTokenCredentialsId, String chromeExtensionIdCredentialsId) {
+   withCredentials([usernamePassword(credentialsId: 
"${chromeStoreCredentialsId}", usernameVariable: 'CLIENT_ID', passwordVariable: 
'CLIENT_SECRET')]) {
+        withCredentials([string(credentialsId: 
"${chromeStoreRefreshTokenCredentialsId}", variable: 'REFRESH_TOKEN')]) {
+            withCredentials([string(credentialsId: 
"${chromeExtensionIdCredentialsId}", variable: 'EXTENSION_ID')]) {
+                script {
+                    accessToken = sh(returnStdout: true, script: "curl -X POST 
-fsS \"https://oauth2.googleapis.com/token\"; -d 
\"client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token\"
 | jq -r '.access_token'").trim()
+                    publishResponse = sh(returnStdout: true, script: "curl -X 
POST -sS 
\"https://www.googleapis.com/chromewebstore/v1.1/items/${EXTENSION_ID}/publish\";
 -H \"Authorization: Bearer ${accessToken}\" -H \"x-goog-api-version:2\" -H 
\"Content-Length:\"").trim()
 
-                return sh(returnStdout: true, script: "echo 
\"${publishResponse}\" | jq -r '.status | .[0]'").trim()
+                    return sh(returnStdout: true, script: "echo 
\"${publishResponse}\" | jq -r '.status | .[0]'").trim()
+                }
             }
         }
     }
diff --git a/.ci/jenkins/shared-scripts/githubUtils.groovy 
b/.ci/jenkins/shared-scripts/githubUtils.groovy
index e51f919d053..2dbece8333d 100644
--- a/.ci/jenkins/shared-scripts/githubUtils.groovy
+++ b/.ci/jenkins/shared-scripts/githubUtils.groovy
@@ -131,20 +131,11 @@ def checkoutRepoSquashedMerge(String author, String 
branch, String url, String t
 */
 def pushObject(String remote, String object, String credentialsId) {
     withCredentials([usernamePassword(credentialsId: "${credentialsId}", 
usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) {
-        setUserConfig("${GITHUB_USER}")
         sh("git config --local credential.helper \"!f() { echo 
username=\\$GITHUB_USER; echo password=\\$GITHUB_TOKEN; }; f\"")
         sh("git push ${remote} ${object}")
     }
 }
 
-/**
-* Setup git user configuration
-*/
-def setUserConfig(String username) {
-    sh "git config user.email [email protected]"
-    sh "git config user.name ${username}"
-}
-
 /**
 * @return the Github repository slug (org/repo) from an URL
 */
diff --git a/.ci/jenkins/shared-scripts/pipelineVars.groovy 
b/.ci/jenkins/shared-scripts/pipelineVars.groovy
index 73090d44e1b..bfbde6004a4 100644
--- a/.ci/jenkins/shared-scripts/pipelineVars.groovy
+++ b/.ci/jenkins/shared-scripts/pipelineVars.groovy
@@ -27,6 +27,8 @@ class PipelineVars implements Serializable {
     String kieToolsGithubCodeQLTokenCredentialsId = 
'kie-tools-gh-codeql-token';
     String chromeStoreCredentialsId = 'kie-tools-chrome-store';
     String chromeStoreRefreshTokenCredentialsId = 
'kie-tools-chrome-store-refresh-token';
+    String chromeExtensionIdCredentialsId = 'kie-tools-chrome-extension-id';
+    String swfChromeExtensionIdCredentialsId = 
'kie-tools-swf-chrome-extension-id';
     String npmTokenCredentialsId = 'kie-tools-npm-token';
     String buildKiteTokenCredentialsId = 'kie-tools-build-kite-token';
     String asfGithubPushCredentialsId = '84811880-2025-45b6-a44c-2f33bef30ad2';
diff --git a/.ci/kie-tools-ci-build.Dockerfile 
b/.ci/kie-tools-ci-build.Dockerfile
index 6ccfbfedeb3..42199dd9968 100644
--- a/.ci/kie-tools-ci-build.Dockerfile
+++ b/.ci/kie-tools-ci-build.Dockerfile
@@ -106,4 +106,6 @@ ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
 ENV DISPLAY=":99"
 ENV NODE_OPTIONS="--max_old_space_size=4096"
 
+ENTRYPOINT [""]
+
 CMD ["bash"]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to