NO-ISSUE: KIE Tools Quarkus DevUI components weekly job (#2310)
diff --git a/.ci/jenkins/Jenkinsfile.weekly-publish b/.ci/jenkins/Jenkinsfile.weekly-publish
new file mode 100644
index 0000000..1b1125a
--- /dev/null
+++ b/.ci/jenkins/Jenkinsfile.weekly-publish
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.text.SimpleDateFormat
+
+def sdf = new SimpleDateFormat("yyyy-MM-dd")
+def dateDefaultValue = sdf.format(new Date())
+
+@Library('jenkins-pipeline-shared-libraries')_
+
+pipeline {
+ agent {
+ docker {
+ image 'quay.io/kie-tools/kie-tools-ci-build:latest'
+ args '--shm-size=2g --privileged --group-add docker'
+ label util.avoidFaultyNodes()
+ }
+ }
+
+ options {
+ timeout(time: 240, unit: 'MINUTES')
+ }
+
+ parameters {
+ string(name: 'BUILD_BRANCH_NAME', defaultValue: 'main', description: 'Set the Git branch to checkout', trim: true)
+ string(name: 'GIT_CHECKOUT_DATETIME', defaultValue: "${dateDefaultValue} 02:00", description: 'Git checkout date and time - (Y-m-d H:i)', trim: true)
+ }
+
+ environment {
+ KIE_TOOLS_BUILD__runLinters = 'false'
+ KIE_TOOLS_BUILD__runTests = 'false'
+ KIE_TOOLS_BUILD__runEndToEndTests = 'false'
+ KIE_TOOLS_BUILD__buildContainerImages = 'false'
+ KIE_TOOLS_BUILD__mavenDeploySkip = 'false'
+
+ PNPM_FILTER_STRING = '-F jbpm-quarkus-devui... -F sonataflow-quarkus-devui...'
+ }
+
+ stages {
+ stage('Load local shared scripts') {
+ steps {
+ script {
+ pipelineVars = load '.ci/jenkins/shared-scripts/pipelineVars.groovy'
+ buildUtils = load '.ci/jenkins/shared-scripts/buildUtils.groovy'
+ githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy'
+ }
+ }
+ }
+
+ stage('Clean workspace before build') {
+ steps {
+ cleanWs(deleteDirs: true, disableDeferredWipeout: true)
+ }
+ }
+
+ stage('Checkout kie-tools') {
+ steps {
+ dir('kie-tools') {
+ script {
+ checkout scm
+ sh """#!/bin/bash -el
+ git checkout ${params.BUILD_BRANCH_NAME}
+ git checkout `git rev-list -n 1 --before=\"${params.GIT_CHECKOUT_DATETIME}\" ${params.BUILD_BRANCH_NAME}`
+ """.trim()
+ }
+ }
+ }
+ }
+
+ stage('Setup PNPM') {
+ steps {
+ dir('kie-tools') {
+ script {
+ buildUtils.setupPnpm()
+ }
+ }
+ }
+ }
+
+ stage('PNPM Bootstrap') {
+ steps {
+ dir('kie-tools') {
+ script {
+ buildUtils.pnpmBootstrap("${env.PNPM_FILTER_STRING}")
+ }
+ }
+ }
+ }
+
+ stage('Build and Publish devui packages') {
+ steps {
+ dir('kie-tools') {
+ script {
+ withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
+ configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) {
+ timestampedSnapshotVersion = "999.0.0-${getDateFromCheckoutDateTime()}-SNAPSHOT"
+ sh """#!/bin/bash -el
+ pnpm update-version-to ${timestampedSnapshotVersion} ${env.PNPM_FILTER_STRING}
+ pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config'
+ pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.username=${REPOSITORY_USER} >> .mvn/maven.config'
+ pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -Dapache.repository.password=${REPOSITORY_TOKEN} >> .mvn/maven.config'
+ pnpm ${env.PNPM_FILTER_STRING} build:prod
+ """.trim()
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage('Create a new tag') {
+ steps {
+ dir('kie-tools') {
+ script {
+ tagName = "999-${getDateFromCheckoutDateTime()}"
+ githubUtils.createTag("${tagName}")
+ githubUtils.pushObject('origin', "${tagName}", "${pipelineVars.asfGithubPushCredentialsId}")
+ }
+ }
+ }
+ }
+ }
+
+ post {
+ always {
+ cleanWs(deleteDirs: true, disableDeferredWipeout: true)
+ }
+ }
+}
+
+String getDateFromCheckoutDateTime() {
+ /* groovylint-disable-next-line DuplicateNumberLiteral */
+ def parsedDate = (params.GIT_CHECKOUT_DATETIME =~ /(\d{4}-\d{2}-\d{2})/)[0][0]
+ return parsedDate.replace('-', '')
+}
diff --git a/.ci/jenkins/shared-scripts/githubUtils.groovy b/.ci/jenkins/shared-scripts/githubUtils.groovy
index 31f4a76..1fc48fc 100644
--- a/.ci/jenkins/shared-scripts/githubUtils.groovy
+++ b/.ci/jenkins/shared-scripts/githubUtils.groovy
@@ -115,6 +115,17 @@
}
/**
+* Create a new tag
+*/
+def createTag(String tagName) {
+ sh """#!/bin/bash -el
+ git config user.email asf-ci-kie@jenkins.kie.apache.org
+ git config user.name asf-ci-kie
+ git tag "${tagName}"
+ """.trim()
+}
+
+/**
* Checkout a github repository and perform a squashed merge on a local repository
*/
def checkoutRepoSquashedMerge(String author, String branch, String url, String targetBranch, String targetUrl, String credentialsId) {
diff --git a/.ci/jenkins/shared-scripts/pipelineVars.groovy b/.ci/jenkins/shared-scripts/pipelineVars.groovy
index e3ed412..3bb27b3 100644
--- a/.ci/jenkins/shared-scripts/pipelineVars.groovy
+++ b/.ci/jenkins/shared-scripts/pipelineVars.groovy
@@ -16,27 +16,27 @@
*/
class PipelineVars implements Serializable {
- String githubRepositoryOrg = 'apache';
- String githubRepositoryName = 'incubator-kie-tools';
- String githubRepositorySlug = 'apache/incubator-kie-tools';
-
- String quayPushCredentialsId = 'quay-io-kie-tools-token';
- String quayKiegroupPushCredentialsId = 'quay_kiegroup_registry_token';
- String openshiftCredentialsId = 'openshift-kie-tools-token';
- String kieToolsBotGithubCredentialsId = 'kie-tools-bot-gh';
- String kieToolsBotGithubTokenCredentialsId = 'kie-tools-bot-gh-token';
- 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';
- String asfGithubTokenPushCredentialsId = '41128c14-bb63-4708-9074-d20a318ee630';
-
- String defaultArtifactsTempDir = 'artifacts-tmp';
+ String githubRepositoryOrg = 'apache'
+ String githubRepositoryName = 'incubator-kie-tools'
+ String githubRepositorySlug = 'apache/incubator-kie-tools'
+ String quayPushCredentialsId = 'quay-io-kie-tools-token'
+ String quayKiegroupPushCredentialsId = 'quay_kiegroup_registry_token'
+ String openshiftCredentialsId = 'openshift-kie-tools-token'
+ String kieToolsBotGithubCredentialsId = 'kie-tools-bot-gh'
+ String kieToolsBotGithubTokenCredentialsId = 'kie-tools-bot-gh-token'
+ 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'
+ String asfGithubTokenPushCredentialsId = '41128c14-bb63-4708-9074-d20a318ee630'
+ String mavenSettingsConfigFileId = 'kie-release-settings'
+ String mavenDeployRepositoryCredentialsId = 'apache-nexus-kie-deploy-credentials'
+ String defaultArtifactsTempDir = 'artifacts-tmp'
}
-return new PipelineVars();
+return new PipelineVars();
\ No newline at end of file
diff --git a/packages/jbpm-quarkus-devui/jbpm-quarkus-devui-deployment/pom.xml b/packages/jbpm-quarkus-devui/jbpm-quarkus-devui-deployment/pom.xml
index afb0eaa..4407bb5 100644
--- a/packages/jbpm-quarkus-devui/jbpm-quarkus-devui-deployment/pom.xml
+++ b/packages/jbpm-quarkus-devui/jbpm-quarkus-devui-deployment/pom.xml
@@ -37,7 +37,7 @@
<properties>
<java.module.name>org.jbpm.quarkus.dev.ui.deployment</java.module.name>
- <path.to.webapp.app>../../runtime-tools-process-dev-ui-webapp</path.to.webapp.app>
+ <path.to.webapp.app>../node_modules/@kie-tools/runtime-tools-process-dev-ui-webapp</path.to.webapp.app>
</properties>
<dependencies>
diff --git a/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui-deployment/pom.xml b/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui-deployment/pom.xml
index d9df35d..ee3d5e5 100644
--- a/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui-deployment/pom.xml
+++ b/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui-deployment/pom.xml
@@ -37,7 +37,7 @@
<name>KIE Tools :: SonataFlow Quarkus Dev UI Extension :: Deployment</name>
<properties>
- <path.to.webapp.app>../../serverless-workflow-dev-ui-webapp</path.to.webapp.app>
+ <path.to.webapp.app>../node_modules/@kie-tools/serverless-workflow-dev-ui-webapp</path.to.webapp.app>
</properties>
<dependencies>