Skip to content

Commit

Permalink
Correct deploy pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Jul 31, 2023
1 parent 2f996e2 commit 51d6b56
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,23 @@ pipeline {

// Need artifacts available locally
getMavenCommand().withProperty('quickly').run('clean install')
maven.mvnSetVersionProperty(getMavenCommand(getWorkflowCommonDeploymentPath()), "data-index-ephemeral.image", "${getNextProdImage()}" )
maven.mvnSetVersionProperty(getMavenCommand(getWorkflowCommonDeploymentPath()), 'data-index-ephemeral.image', getDataIndexEphemeralReleaseImage())
}
}
}
stage('Build & Test') {
steps {
script {
dir(getRepoName()) {
String mvnCmd = getMavenCommand()
def mvnCmd = getMavenCommand()
.withProperty('maven.test.failure.ignore', true)
.withProfiles(['full'])
.skipTests(params.SKIP_TESTS)
.getFullRunCommand('clean install')
util.runWithPythonVirtualEnv(mvnCmd, 'swf')

if (isRelease()) {
// Use nightly image for testing as the released one does not exist yet ...
mvnCmd.withProperty('data-index-ephemeral.image', getDataIndexEphemeralNightlyImage())
}
util.runWithPythonVirtualEnv(mvnCmd.getFullRunCommand('clean install'), 'swf')
}
}
}
Expand Down Expand Up @@ -302,7 +305,7 @@ MavenCommand getMavenCommand(String directory = '') {
void runMavenDeploy(boolean localDeployment = false) {
mvnCmd = getMavenCommand()

if(localDeployment) {
if (localDeployment) {
mvnCmd.withLocalDeployFolder(getLocalDeploymentFolder())
} else if (env.MAVEN_DEPLOY_REPOSITORY) {
mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
Expand Down Expand Up @@ -335,13 +338,10 @@ String getWorkflowCommonDeploymentPath() {
return "${getRepoName()}/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment"
}

String getCurrentNightlyImage() {
return maven.mvnGetVersionProperty(getMavenCommand(getWorkflowCommonDeploymentPath()), "data-index-ephemeral.image")
String getDataIndexEphemeralNightlyImage() {
return "quay.io/kiegroup/kogito-data-index-ephemeral-nightly:${util.getMajorMinorVersion(getProjectVersion())}"
}

String getNextProdImage() {
def currentNightlyImage = getCurrentNightlyImage()
def nightlyIndex = currentNightlyImage.indexOf('-nightly')
def nextProdImageName = currentNightlyImage.substring(0, nightlyIndex) + currentNightlyImage.substring(nightlyIndex + '-nightly'.length())
return nextProdImageName
String getDataIndexEphemeralReleaseImage() {
return "quay.io/kiegroup/kogito-data-index-ephemeral:${util.getMajorMinorVersion(getProjectVersion())}"
}

0 comments on commit 51d6b56

Please sign in to comment.