tiagobento commented on code in PR #2366: URL: https://github.com/apache/incubator-kie-tools/pull/2366#discussion_r1613784302
########## .ci/jenkins/Jenkinsfile.release-candidate: ########## @@ -0,0 +1,180 @@ +/* + * 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. + */ + +@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: 180, unit: 'MINUTES') + } + + parameters { + string(name: 'BRANCH_NAME', description: 'Set the Git branch to checkout (0.0.x)', trim: true) + string(name: 'RELEASE_CANDIDATE_VERSION', description: 'Release Candidate version', trim: true) + } + + 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 { + githubUtils.checkoutRepo( + "http://github.com/${pipelineVars.githubRepositorySlug}.git", + "${params.BRANCH_NAME}", + "${pipelineVars.kieToolsBotGithubCredentialsId}" + ) + } + } + } + } + + 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('Setup Git repository') { + steps { + dir('kie-tools') { + script { + sh """#!/bin/bash -el + git config user.email [email protected] + git config user.name asf-ci-kie + git checkout ${params.BRANCH_NAME} + """.trim() + } + } + } + } + + stage('Update project version') { + steps { + dir('kie-tools') { + script { + buildUtils.pnpmUpdateProjectVersion(params.RELEASE_CANDIDATE_VERSION) + } + } + } + } + + stage('Update kogito version') { + steps { + dir('kie-tools') { + script { + buildUtils.pnpmUpdateKogitoVersion(params.RELEASE_CANDIDATE_VERSION, params.RELEASE_CANDIDATE_VERSION) + } + } + } + } Review Comment: Also do `pnpm update-stream-name-to <stream-name>` E.g., 10.0.x or main or 10.0.0 Used to replace “latest” or “daily-dev” or "10.0.x" ########## .ci/jenkins/Jenkinsfile.release-candidate: ########## @@ -0,0 +1,180 @@ +/* + * 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. + */ + +@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: 180, unit: 'MINUTES') + } + + parameters { + string(name: 'BRANCH_NAME', description: 'Set the Git branch to checkout (0.0.x)', trim: true) + string(name: 'RELEASE_CANDIDATE_VERSION', description: 'Release Candidate version', trim: true) + } + + 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 { + githubUtils.checkoutRepo( + "http://github.com/${pipelineVars.githubRepositorySlug}.git", + "${params.BRANCH_NAME}", + "${pipelineVars.kieToolsBotGithubCredentialsId}" + ) + } + } + } + } + + 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('Setup Git repository') { + steps { + dir('kie-tools') { + script { + sh """#!/bin/bash -el + git config user.email [email protected] + git config user.name asf-ci-kie + git checkout ${params.BRANCH_NAME} + """.trim() + } + } + } + } + + stage('Update project version') { + steps { + dir('kie-tools') { + script { + buildUtils.pnpmUpdateProjectVersion(params.RELEASE_CANDIDATE_VERSION) + } + } + } + } + + stage('Update kogito version') { + steps { + dir('kie-tools') { + script { + buildUtils.pnpmUpdateKogitoVersion(params.RELEASE_CANDIDATE_VERSION, params.RELEASE_CANDIDATE_VERSION) + } + } + } + } Review Comment: Please do that on the setup-branch job as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
