Browse Source

Rm unneeded stages from runtimes, echo deploy repo

1031
Kevin Mok 2 weeks ago
parent
commit
f06fc1c6ba
Signed by: Kevin Mok <kmok@redhat.com> GPG Key ID: 10B001347552F396
1 changed files with 5 additions and 75 deletions
  1. 5
    75
      full/Jenkinsfile-runtimes-deploy

+ 5
- 75
full/Jenkinsfile-runtimes-deploy View File

@@ -3,7 +3,7 @@
deployProperties = [:]
pipeline {
agent {
label 'kie-rhel7 && kie-mem16g'
label 'kie-rhel7-priority && !master'
}

tools {
@@ -78,54 +78,9 @@ pipeline {
checkoutRepo('kogito-apps')
}
}
stage('Prepare for PR'){
when {
expression { return isRelease() }
}
steps {
prepareForPR('kogito-runtimes')
prepareForPR('kogito-apps')
}
}
stage('Setup Maven release config'){
when {
expression { return isRelease() }
}
steps {
echo 'Setup Maven release config'
configFileProvider([configFile(fileId: maven.getSubmarineSettingsXmlId(), targetLocation: 'maven-settings.xml', variable: 'MAVEN_SETTINGS_FILE')]){
sh "echo '\n-B -s ${MAVEN_SETTINGS_FILE}' | tee -a kogito-{runtimes,apps}/.mvn/maven.config"
}
}
}
stage('Update project version'){
when {
expression { return getProjectVersion() != '' }
}
steps {
// kogito-runtimes
script {
// first build&install the current version (usually SNAPSHOT) locally as it is needed later by other repos
mavenCleanInstall('kogito-runtimes', true, ['full'], '-U')
dir('kogito-runtimes') {
maven.mvnVersionsSet(getProjectVersion())
}
// Step needed to have runtimes artifacts into the local repository, in order to set apps version correctly
mavenCleanInstall('kogito-runtimes', true, [], '-U')
}

// kogito-apps
dir('kogito-apps') {
script {
maven.mvnVersionsUpdateParentAndChildModules(getProjectVersion())
}
}
}
}
stage('Build kogito-runtimes') {
steps {
mavenCleanInstall('kogito-runtimes', params.SKIP_TESTS)
/* mavenCleanInstall('kogito-runtimes', params.SKIP_TESTS) */
}
post {
always {
@@ -135,7 +90,7 @@ pipeline {
}
stage('Build kogito-apps') {
steps {
mavenCleanInstall('kogito-apps', params.SKIP_TESTS)
/* mavenCleanInstall('kogito-apps', params.SKIP_TESTS) */
}
post {
always {
@@ -149,32 +104,6 @@ pipeline {
mavenDeploy('kogito-apps')
}
}
stage('Create PR'){
when {
expression { return isRelease() }
}
steps {
commitAndCreatePR('kogito-runtimes')
commitAndCreatePR('kogito-apps')
}
post {
success {
script {
// Runtimes
setDeployPropertyIfNeeded('kogito-runtimes.pr.source.uri', "https://github.com/${getBotAuthor()}/kogito-runtimes")
setDeployPropertyIfNeeded('kogito-runtimes.pr.source.ref', getBotBranch())
setDeployPropertyIfNeeded('kogito-runtimes.pr.target.uri', "https://github.com/${getGitAuthor()}/kogito-runtimes")
setDeployPropertyIfNeeded('kogito-runtimes.pr.target.ref', getBuildBranch())

// Apps
setDeployPropertyIfNeeded('kogito-apps.pr.source.uri', "https://github.com/${getBotAuthor()}/kogito-apps")
setDeployPropertyIfNeeded('kogito-apps.pr.source.ref', getBotBranch())
setDeployPropertyIfNeeded('kogito-apps.pr.target.uri', "https://github.com/${getGitAuthor()}/kogito-apps")
setDeployPropertyIfNeeded('kogito-apps.pr.target.ref', getBuildBranch())
}
}
}
}
}
post {
always {
@@ -284,7 +213,8 @@ void mavenCleanInstall(String directory, boolean skipTests = false, List profile

void mavenDeploy(String directory) {
extraArgs = params.MAVEN_DEPLOY_REPOSITORY != '' ? "-DaltDeploymentRepository=runtimes-artifacts::default::${params.MAVEN_DEPLOY_REPOSITORY} -Denforcer.skip=true" : ''
runMaven('clean deploy', directory, true, [], extraArgs)
echo "deploy args: ${extraArgs}"
/* runMaven('clean deploy', directory, true, [], extraArgs) */
}

void runMaven(String command, String directory, boolean skipTests = false, List profiles = [], String extraArgs = '') {

Loading…
Cancel
Save