From 0c78b803cf62f2797615e18e24f56074488585a4 Mon Sep 17 00:00:00 2001 From: tonsV2 Date: Mon, 13 Nov 2023 23:35:22 +0700 Subject: [PATCH] ci:remove javadoc and move IM stage to the end (#15624) (#15677) * ci:remove javadoc and move IM stage to the end (#15624) * ci: remove Javadoc * ci: move IM stage to the end of the pipeline * ci: increase overall timeout to 45 and instance timeout to 10 minutes # Conflicts: # jenkinsfiles/canary * ci:remove javadoc and move IM stage to the end (#15624) * ci: remove Javadoc * ci: move IM stage to the end of the pipeline * ci: increase overall timeout to 45 and instance timeout to 10 minutes # Conflicts: # jenkinsfiles/canary * ci:remove javadoc and move IM stage to the end (#15624) * ci: remove Javadoc * ci: move IM stage to the end of the pipeline * ci: increase overall timeout to 45 and instance timeout to 10 minutes # Conflicts: # jenkinsfiles/canary --- jenkinsfiles/canary | 90 ++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 58 deletions(-) diff --git a/jenkinsfiles/canary b/jenkinsfiles/canary index 9fcd4de8972c..52cba1b4e37f 100644 --- a/jenkinsfiles/canary +++ b/jenkinsfiles/canary @@ -13,7 +13,7 @@ pipeline { options { buildDiscarder(logRotator(numToKeepStr: '5')) - timeout(time: 30) + timeout(time: 45) } environment { @@ -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 jdk8,-default --update-snapshots -pl -dhis-web-embedded-jetty' + sh 'mvn -X -T 4 --batch-mode --no-transfer-progress package -f dhis-2/dhis-web/pom.xml -P jdk8,-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" @@ -86,7 +116,7 @@ pipeline { dir('scripts/instances') { sh "(./findByName.sh play nightly${branch} && ./restart.sh play nightly${branch}) || ./deploy-dhis2.sh play nightly${branch}" - timeout(5) { + timeout(10) { waitFor.statusOk("${env.INSTANCE_URL}${branch}") } } @@ -95,62 +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 jdk8,-default --update-snapshots -pl -dhis-web-embedded-jetty' - sh 'mvn -X -T 4 --batch-mode --no-transfer-progress package -f dhis-2/dhis-web/pom.xml -P jdk8,-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 ('Generate Javadocs') { - steps { - echo 'Generating Javadocs ...' - script { - withMaven(options: [artifactsPublisher(disabled: true)]) { - sh 'mvn --batch-mode --no-transfer-progress clean install javadoc:aggregate -DskipTests=true -Dmaven.test.skip=true -f dhis-2/pom.xml' - } - } - } - - post { - success { - javadoc javadocDir: 'dhis-2/target/site/apidocs', keepAll: false - } - } - } - - stage ('Sync Javadocs') { - steps { - echo 'Syncing Javadocs ...' - sh 'curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/sync-javadocs-s3.sh" -O' - sh 'chmod +x sync-javadocs-s3.sh' - sh './sync-javadocs-s3.sh ${GIT_BRANCH}' - } - } } post {