Skip to content

Commit

Permalink
Revert "Correct deploy pipeline (#3145)"
Browse files Browse the repository at this point in the history
This reverts commit 9a18a58.
  • Loading branch information
radtriste committed Aug 4, 2023
1 parent d838ba2 commit ba4e3d6
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,20 @@ pipeline {

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

if (params.SKIP_TESTS) {
mvnCmd.skipTests() // Conflict somehow with Python testing. If `skipTests={anyvalue}` is set, then exec plugin is not executed ...
}
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')
.withProfiles(['full'])
.skipTests(params.SKIP_TESTS)
.getFullRunCommand('clean install')
util.runWithPythonVirtualEnv(mvnCmd, 'swf')
}
}
}
Expand Down Expand Up @@ -298,7 +293,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 @@ -331,10 +326,13 @@ String getWorkflowCommonDeploymentPath() {
return "${getRepoName()}/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment"
}

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

String getDataIndexEphemeralReleaseImage() {
return "quay.io/kiegroup/kogito-data-index-ephemeral:${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
}

0 comments on commit ba4e3d6

Please sign in to comment.