Skip to content

Commit

Permalink
ci:remove javadoc and move IM stage to the end (#15624)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tonsV2 committed Nov 13, 2023
1 parent 552d999 commit 46fc48b
Showing 1 changed file with 32 additions and 58 deletions.
90 changes: 32 additions & 58 deletions jenkinsfiles/canary
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {

options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout(time: 30)
timeout(time: 45)
}

environment {
Expand Down 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'
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 @@ -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}")
}
}
Expand All @@ -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 {
Expand Down

0 comments on commit 46fc48b

Please sign in to comment.