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 3c67915f21b NO-ISSUE: Remove unused CI Jenkinsfiles (#2201)
3c67915f21b is described below
commit 3c67915f21b72eb26e5d2a105afce8b27171bec6
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Tue Mar 19 15:04:27 2024 -0300
NO-ISSUE: Remove unused CI Jenkinsfiles (#2201)
---
.ci/jenkins/Jenkinsfile | 147 ------------------------------------
.ci/jenkins/Jenkinsfile.nightly | 161 ----------------------------------------
.ci/jenkins/Jenkinsfile.vscode | 74 ------------------
.ci/jenkins/dsl/jobs.groovy | 43 -----------
.ci/jenkins/dsl/test.sh | 7 --
5 files changed, 432 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
deleted file mode 100644
index 4fb9a63fdcf..00000000000
--- a/.ci/jenkins/Jenkinsfile
+++ /dev/null
@@ -1,147 +0,0 @@
-@Library('jenkins-pipeline-shared-libraries')_
-
-import org.kie.jenkins.MavenCommand
-
-changeAuthor = env.ghprbAuthorRepoGitUrl ?
util.getGroup(env.ghprbAuthorRepoGitUrl) : (env.ghprbPullAuthorLogin ?:
CHANGE_AUTHOR)
-changeBranch = env.ghprbSourceBranch ?: CHANGE_BRANCH
-changeTarget = env.ghprbTargetBranch ?: CHANGE_TARGET
-
-pipeline {
- agent {
- label util.avoidFaultyNodes('rhel8 && !built-in')
- }
- tools {
- maven 'kie-maven-3.6.3'
- jdk 'kie-jdk11'
- }
- options {
- timestamps()
- timeout(time: getTimeoutValue(), unit: 'MINUTES')
- }
- environment {
- SONARCLOUD_TOKEN = credentials('SONARCLOUD_TOKEN')
- }
- stages {
- stage('Initialize') {
- steps {
- script {
- mailer.buildLogScriptPR()
-
- checkoutRepo('kie-tools')
- }
- }
- }
- stage('Build Apache KIE Tools - Stunner Editors') {
- steps {
- script {
- mvnCmd =
getMavenCommand('kie-tools/packages/stunner-editors')
- if (isNormalPRCheck() && isSonarCloudEnabled()) {
- mvnCmd.withProfiles(['run-code-coverage'])
- }
- mvnCmd.withOptions(["-pl
'!kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime,!lienzo-webapp'"])
- mvnCmd.withProperty('revision', '0.0.0')
- mvnCmd.run('clean install')
- }
- }
- post {
- cleanup {
- script {
- cleanContainers()
- }
- }
- }
- }
- stage('Analyze Apache KIE Tools - Stunner Editors by SonarCloud') {
- when {
- expression { isNormalPRCheck() && isSonarCloudEnabled() }
- }
- steps {
- script {
- if (isSonarCloudEnabled()) {
- getMavenCommand('kie-tools/packages/stunner-editors')
- .withOptions(['-Drevision=0.0.0', '-e',
'-nsu', "-pl
'!kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime,!lienzo-webapp'"])
- .withProperty('sonar.projectKey',
'org.kie.kogito:kogito-tooling')
- .withProperty('sonar.organization', 'kiegroup')
- .withProperty('sonar.host.url',
'https://sonarcloud.io')
- .withProperty('sonar.login',
env['SONARCLOUD_TOKEN'])
- .run('validate
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar')
- }
- }
- }
- post {
- cleanup {
- script {
- cleanContainers()
- }
- }
- }
- }
- }
- post {
- always {
- script {
- sh '$WORKSPACE/trace.sh'
- junit '**/target/surefire-reports/**/*.xml,
**/target/failsafe-reports/**/*.xml'
- }
- }
- failure {
- script {
- mailer.sendEmail_failedPR()
- }
- }
- unstable {
- script {
- mailer.sendEmail_unstablePR()
- }
- }
- fixed {
- script {
- mailer.sendEmail_fixedPR()
- }
- }
- cleanup {
- script {
- util.cleanNode('docker')
- }
- }
- }
-}
-
-void checkoutRepo(String repo, String dirName=repo) {
- dir(dirName) {
- checkout(githubscm.resolveRepository('kie-tools', changeAuthor,
changeBranch, false))
- }
-}
-
-MavenCommand getMavenCommand(String directory) {
- mvnCmd = new MavenCommand(this, ['-fae'])
- .withSettingsXmlId('kogito_release_settings')
- .withSnapshotsDisabledInSettings()
- .withProperty('java.net.preferIPv4Stack', true)
- .inDirectory(directory)
- return mvnCmd
-}
-
-void cleanContainers() {
- cloud.cleanContainersAndImages('docker')
-}
-
-boolean isDownstreamJob() {
- return env['DOWNSTREAM_BUILD'] && env['DOWNSTREAM_BUILD'].toBoolean()
-}
-
-String getUpstreamTriggerProject() {
- return env['UPSTREAM_TRIGGER_PROJECT']
-}
-
-boolean isNormalPRCheck() {
- return !isDownstreamJob()
-}
-
-boolean isSonarCloudEnabled() {
- return env['ENABLE_SONARCLOUD'] && env['ENABLE_SONARCLOUD'].toBoolean()
-}
-
-Integer getTimeoutValue() {
- return 240
-}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.nightly b/.ci/jenkins/Jenkinsfile.nightly
deleted file mode 100644
index 8cc0257d1db..00000000000
--- a/.ci/jenkins/Jenkinsfile.nightly
+++ /dev/null
@@ -1,161 +0,0 @@
-@Library('jenkins-pipeline-shared-libraries')_
-
-settingsXMLId = 'kie-tools-prod'
-
-pipeline {
- agent {
- label util.avoidFaultyNodes('kie-rhel8 && kie-mem16g && !built-in')
- }
- tools {
- nodejs "nodejs-16.2.0"
- jdk "kie-jdk11"
- }
- parameters {
- string(description: 'The deployment URL', name: 'DEPLOYMENT_REPO_URL')
- booleanParam(description: 'Skip Tests? True as default', name:
'SKIP_TESTS', defaultValue: true)
- string(description: 'The product version', name: 'PRODUCT_VERSION',
defaultValue: "1.0.0")
- string(description: 'The UMB message version', name: 'UMB_VERSION',
defaultValue: 'main')
- }
- options {
- buildDiscarder logRotator(artifactDaysToKeepStr: '',
artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')
- }
- stages {
- stage('Initialize') {
- steps {
- sh 'printenv'
-
- }
- }
- stage('Clone build configuration repo') {
- steps {
- script {
- def currentBranch = env.BRANCH_NAME ?: env.GIT_BRANCH
- currentBranch = currentBranch == 'main' ? 'master' :
currentBranch
- println "Checking out
${env.BUILD_CONFIGURATION_REPO_URL}:${currentBranch} into build_config folder"
- sh "git clone -b ${currentBranch} --single-branch
${env.BUILD_CONFIGURATION_REPO_URL} build_config"
- }
- }
- }
- stage('npm login') {
- steps {
- withCredentials([usernamePassword(credentialsId:
"npmRegistryPublish", usernameVariable: 'NPM_USER', passwordVariable:
'NPM_PASSWORD')]) {
- sh "npm-cli-login -u $NPM_USER -p $NPM_PASSWORD -e
[email protected] -r $NPM_REGISTRY_PUBLISH_URL"
- }
- }
- }
- stage('prepare kie-tools dependencies') {
- steps {
- script {
- env['EXTERNAL_RESOURCE_PATH__bpmnEditor'] =
"$WORKSPACE/kiegroup_kogito-editors-java/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/target/kie-wb-common-stunner-bpmn-kogito-runtime"
- env['EXTERNAL_RESOURCE_PATH__dmnEditor'] =
"$WORKSPACE/kiegroup_kogito-editors-java/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/target/kie-wb-common-dmn-webapp-kogito-runtime"
- env['EXTERNAL_RESOURCE_PATH__scesimEditor'] =
"$WORKSPACE/kiegroup_kogito-editors-java/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/target/drools-wb-scenario-simulation-editor-kogito-runtime"
- }
- }
- }
- stage('Build Nightly projects') {
- steps {
- script {
- def projectCollection = ["kiegroup/kogito-editors-java",
"apache/incubator-kie-tools"]
- println "Project Collection to build ${projectCollection}"
- def buildConfigAdditionalVariables = [:]
- def buildConfigPathFolder =
"$WORKSPACE/build_config/kogito/nightly"
-
- Map<String, Object> buildConfigMap =
getBuildConfigMap(buildConfigPathFolder, buildConfigAdditionalVariables)
- pmebuild.checkoutProjects(projectCollection,
buildConfigMap, buildConfigAdditionalVariables)
-
- projectCollection.each { project -> buildProject(project,
buildConfigMap) }
- }
- }
- }
- stage('Upload Files to repository') {
- steps {
- script {
- echo "[INFO] Start uploading
${env.WORKSPACE}/deployDirectory"
- dir("${env.WORKSPACE}/deployDirectory") {
- withCredentials([usernameColonPassword(credentialsId:
"${env.NIGHTLY_DEPLOYMENT_CREDENTIAL}", variable: 'deploymentCredentials')]) {
- sh "zip -r kie-tools ."
- sh "curl --upload-file kie-tools.zip -u
$deploymentCredentials -v ${DEPLOYMENT_REPO_URL}"
- }
- }
- }
- }
- }
- stage ("Send KIE-tools UMB Message to QE.") {
- steps {
- script {
- echo "[INFO] Sending kie-tools UMB message to QE."
- def messageBody = """
-{
- \"npmRegistry\": \"${NPM_REGISTRY_PUBLISH_URL}",
- \"versions\": {
- \"kie-tools\": \"${env.CURRENT_KIE_TOOLS_VERSION}\",
- \"kogito-editors-java\": \"${env.KOGITO_EDITORS_JAVA_VERSION}\"
- }
-}
- """
- def topic =
"VirtualTopic.qe.ci.ba.kie-tools.${env.UMB_VERSION}.nightly.trigger"
- def eventType =
"kie-tools-${env.UMB_VERSION}-nightly-qe-trigger"
-
- echo "[INFO] Message Body: ${messageBody}"
- echo "[INFO] Topic: ${topic}"
- echo "[INFO] Event Type: ${eventType}"
- build job: env.SEND_UMB_MESSAGE_JOB_PATH, parameters: [
- [$class: 'StringParameterValue', name:
'MESSAGE_BODY', value: messageBody],
- [$class: 'StringParameterValue', name: 'TOPIC',
value: topic],
- [$class: 'StringParameterValue', name:
'EVENT_TYPE', value: eventType]
- ]
- echo "[SUCCESS] Message was successfully sent."
- }
- }
- }
- }
- post {
- failure {
- emailext body: 'kie-tools nightly-build #${BUILD_NUMBER} was: ' +
"${currentBuild.currentResult}" + '\n' +
- 'Please look here: ${BUILD_URL} \n' +
- ' \n' +
- '${BUILD_LOG, maxLines=750}', subject: 'kie-tools
nightly-build #${BUILD_NUMBER}: ' + "${currentBuild.currentResult}", to:
'[email protected]'
- }
- unstable {
- emailext body: 'kie-tools nightly-build #${BUILD_NUMBER} was: ' +
"${currentBuild.currentResult}" + '\n' +
- 'Please look here: ${BUILD_URL} \n' +
- ' \n' +
- 'Failed tests: ${BUILD_URL}/testReport \n' +
- ' \n' +
- '${BUILD_LOG, maxLines=750}', subject: 'kie-tools
nightly-build #${BUILD_NUMBER}: ' + "${currentBuild.currentResult}", to:
'[email protected]'
- }
- fixed {
- emailext body: 'kie-tools nightly-build #${BUILD_NUMBER} was: ' +
"${currentBuild.currentResult}" + '\n' +
- 'Please look here: ${BUILD_URL}', subject: 'kie-tools
nightly-build #${BUILD_NUMBER}: ' + "${currentBuild.currentResult}", to:
'[email protected]'
- }
- cleanup {
- cleanWs()
- }
- }
-}
-
-def getBuildConfigMap(def buildConfigPathFolder, def
buildConfigAdditionalVariables){
- env.DATE_TIME_SUFFIX = env.DATE_TIME_SUFFIX ?: "${new
Date().format('yyyyMMdd')}"
- env.PME_BUILD_VARIABLES = ''
- def buildConfigContent = readFile
"${buildConfigPathFolder}/build-config.yaml"
- return pmebuild.getBuildConfiguration(buildConfigContent,
buildConfigPathFolder, buildConfigAdditionalVariables)
-}
-
-def buildProject(String project, Map<String, Object> buildConfig, String
defaultGroup = "kiegroup") {
- println "[INFO] Building project ${project}"
- if ("apache/incubator-kie-tools" == project) {
- env.CURRENT_KIE_TOOLS_VERSION = env.CURRENT_KIE_TOOLS_VERSION ?:
sh(returnStdout: true, script: 'awk -F\'"\' \'/"version": ".+"/{ print $4;
exit; }\' package.json')?.trim() + "-redhat-${env.DATE_TIME_SUFFIX}"
- println "kie-tools prod version ${env.CURRENT_KIE_TOOLS_VERSION}"
- }
- def projectGroupName = util.getProjectGroupName(project, defaultGroup)
- def group = projectGroupName[0]
- def name = projectGroupName[1]
- dir("${env.WORKSPACE}/${group}_${name}") {
- if (fileExists("./pom.xml")) {
- pmebuild.executePME(project,
pmebuild.getProjectConfiguration(project, buildConfig), "${env.PME_CLI_PATH}",
settingsXMLId, [:])
- def pom = readMavenPom file: 'pom.xml'
- env["${name}-VERSION".replace("-", "_").toUpperCase()] =
pom.version ?: pom.parent.version
- }
- pmebuild.executeBuildScript(project, buildConfig, settingsXMLId,
"-DaltDeploymentRepository=local::default::file://${env.WORKSPACE}/deployDirectory")
- }
-}
diff --git a/.ci/jenkins/Jenkinsfile.vscode b/.ci/jenkins/Jenkinsfile.vscode
deleted file mode 100644
index d811bdd4fb3..00000000000
--- a/.ci/jenkins/Jenkinsfile.vscode
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env groovy
-
-node('rhel8') {
- stage('Install requirements') {
- def nodeHome = tool 'nodejs-lts'
- env.PATH = "${env.PATH}:${nodeHome}/bin"
- sh 'node -v'
- sh 'npm -v'
- }
-
- stage('Download VSIX files') {
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/bpmn_vscode_extension_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/dmn_vscode_extension_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/pmml_vscode_extension_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/serverless_workflow_vscode_extension_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/vscode_extension_dashbuilder_editor_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/vscode_extension_kogito_bundle_$VERSION.vsix"'
- sh 'wget
"https://github.com/apache/incubator-kie-tools/releases/download/$VERSION/vscode_extension_kie_ba_bundle_$VERSION.vsix"'
- sh 'md5sum *.vsix'
- }
-
- stage('Archive VSIX files') {
- def vsix = findFiles(glob: '**.vsix')
- archiveArtifacts artifacts: '**.vsix'
- }
-
- if (publishToMarketPlace.equals('true') || publishToOVSX.equals('true')) {
- timeout(time:1, unit:'DAYS') {
- input message:'Approve deployment?', submitter:
'eignatow,gcaponet,prego,tfernand'
- }
-
- def vsix_bpmn_vscode_extension = findFiles(glob:
'**bpmn_vscode_extension*.vsix')
- def vsix_dmn_vscode_extension = findFiles(glob:
'**dmn_vscode_extension*.vsix')
- def vsix_pmml_vscode_extension = findFiles(glob:
'**pmml_vscode_extension*.vsix')
- def vsix_serverless_workflow_vscode_extension = findFiles(glob:
'**serverless_workflow_vscode_extension*.vsix')
- def vsix_vscode_extension_dashbuilder_editor = findFiles(glob:
'**vscode_extension_dashbuilder_editor*.vsix')
- def vsix_vscode_extension_kogito_bundle = findFiles(glob:
'**vscode_extension_kogito_bundle*.vsix')
- def vsix_vscode_extension_kie_ba_bundle = findFiles(glob:
'**vscode_extension_kie_ba_bundle*.vsix')
-
- if (publishToMarketPlace.equals('true')) {
- stage('Publish to VS Code Marketplace') {
- sh 'npm install -g @vscode/vsce'
- withCredentials([[$class: 'StringBinding', credentialsId:
'vscode_java_marketplace', variable: 'TOKEN']]) {
- sh 'vsce publish -p ${TOKEN} --packagePath' + "
${vsix_vscode_extension_dashbuilder_editor[0].path}"
- }
- withCredentials([[$class: 'StringBinding', credentialsId:
'kie-vscode-token', variable: 'KIE_TOKEN']]) {
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_bpmn_vscode_extension[0].path}"
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_dmn_vscode_extension[0].path}"
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_pmml_vscode_extension[0].path}"
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_serverless_workflow_vscode_extension[0].path}"
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_vscode_extension_kogito_bundle[0].path}"
- sh 'vsce publish -p ${KIE_TOKEN} --packagePath' + "
${vsix_vscode_extension_kie_ba_bundle[0].path}"
- }
- }
- }
-
- if (publishToOVSX.equals('true')) {
- stage('Publish to Open-vsx Marketplace') {
- sh "npm install -g ovsx"
- withCredentials([[$class: 'StringBinding', credentialsId:
'open-vsx-access-token', variable: 'OVSX_TOKEN']]) {
- sh 'ovsx publish -p ${OVSX_TOKEN}' + "
${vsix_vscode_extension_dashbuilder_editor[0].path}"
- }
- withCredentials([[$class: 'StringBinding', credentialsId:
'kie-openvsx-token', variable: 'KIE_OVSX_TOKEN']]) {
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_bpmn_vscode_extension[0].path}"
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_dmn_vscode_extension[0].path}"
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_pmml_vscode_extension[0].path}"
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_serverless_workflow_vscode_extension[0].path}"
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_vscode_extension_kogito_bundle[0].path}"
- sh 'ovsx publish -p ${KIE_OVSX_TOKEN}' + "
${vsix_vscode_extension_kie_ba_bundle[0].path}"
- }
- }
- }
- }
-}
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
deleted file mode 100644
index 0398f59e0a3..00000000000
--- a/.ci/jenkins/dsl/jobs.groovy
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/////////////////////////////////////////////////////////////////
-// This file is used for generating Jenkins jobs
-// Its placement and structure is a "convention" in kiegroup
-// For kie-tools we currently generate just pullrequest job,
-// to run sonar with each pull request, see: .ci/jenkins/Jenkinsfile
-//
-// For more details see:
-// - https://github.com/kiegroup/kogito-pipelines/blob/main/docs/jenkins.md
-// Or the same file in other repositories like:
-// - https://github.com/kiegroup/kogito-runtimes/tree/main/.ci/jenkins/dsl
-/////////////////////////////////////////////////////////////////
-
-import org.kie.jenkins.jobdsl.KogitoJobTemplate
-import org.kie.jenkins.jobdsl.Utils
-
-Map getMultijobPRConfig() {
- return [
- parallel: true,
- jobs : [
- [
- id: 'kie-tools-stunner-editors',
- primary: true,
- env : [
- // Sonarcloud analysis only on main branch
- // As we have only Community edition
- ENABLE_SONARCLOUD: Utils.isMainBranch(this),
- ]
- ]
- ]
- ]
-}
-
-// PR checks
-setupMultijobPrDefaultChecks()
-
-/////////////////////////////////////////////////////////////////
-// Methods
-/////////////////////////////////////////////////////////////////
-
-void setupMultijobPrDefaultChecks() {
- KogitoJobTemplate.createPerRepoPRJobs(this, '') { jobFolder -> return
getMultijobPRConfig() }
-}
diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh
deleted file mode 100755
index 184413cb5fd..00000000000
--- a/.ci/jenkins/dsl/test.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash -e
-
-file=$(mktemp)
-# For more usage of the script, use ./test.sh -h
-curl -o ${file}
https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
-chmod u+x ${file}
-${file} $@
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]