Skip to content

Commit

Permalink
ci: move IM stage to the end of the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsV2 committed Nov 8, 2023
1 parent 973e8a1 commit 5f7c68b
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions jenkinsfiles/canary
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,36 @@ pipeline {
}
}

stage ('Build') {
steps {
echo 'Building DHIS2 ...'
script {
withMaven(options: [artifactsPublisher(disabled: true)]) {
sh 'mvn -X -T 4 --batch-mode --no-transfer-progress clean install -f dhis-2/pom.xml -P -default --update-snapshots -pl -dhis-web-embedded-jetty,-dhis-test-coverage'
sh 'mvn -X -T 4 --batch-mode --no-transfer-progress package -f dhis-2/dhis-web/pom.xml -P -default --update-snapshots'
}
}
}
}

stage ('Sync WAR') {
steps {
echo 'Syncing WAR ...'
sh 'curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/copy-war-s3.sh" -O'
sh 'chmod +x copy-war-s3.sh'
sh './copy-war-s3.sh canary ${GIT_BRANCH}'
}
}

stage ('Delete old WARs') {
steps {
echo 'Deleting old WARs ...'
sh 'curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/delete-old-wars.sh" -O'
sh 'chmod +x delete-old-wars.sh'
sh './delete-old-wars.sh ${GIT_BRANCH}'
}
}

stage('Update IM Play instance') {
environment {
HTTP = "http --check-status"
Expand Down Expand Up @@ -95,36 +125,6 @@ pipeline {
}
}
}

stage ('Build') {
steps {
echo 'Building DHIS2 ...'
script {
withMaven(options: [artifactsPublisher(disabled: true)]) {
sh 'mvn -X -T 4 --batch-mode --no-transfer-progress clean install -f dhis-2/pom.xml -P -default --update-snapshots -pl -dhis-web-embedded-jetty,-dhis-test-coverage'
sh 'mvn -X -T 4 --batch-mode --no-transfer-progress package -f dhis-2/dhis-web/pom.xml -P -default --update-snapshots'
}
}
}
}

stage ('Sync WAR') {
steps {
echo 'Syncing WAR ...'
sh 'curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/copy-war-s3.sh" -O'
sh 'chmod +x copy-war-s3.sh'
sh './copy-war-s3.sh canary ${GIT_BRANCH}'
}
}

stage ('Delete old WARs') {
steps {
echo 'Deleting old WARs ...'
sh 'curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/delete-old-wars.sh" -O'
sh 'chmod +x delete-old-wars.sh'
sh './delete-old-wars.sh ${GIT_BRANCH}'
}
}
}

post {
Expand Down

0 comments on commit 5f7c68b

Please sign in to comment.