Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: ci:remove javadoc and move IM stage to the end #15674

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,-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 @@ -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 -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 ('Generate Javadocs') {
steps {
echo 'Generating Javadocs ...'
script {
withMaven(options: [artifactsPublisher(disabled: true)]) {
sh 'mvn --batch-mode --no-transfer-progress clean install javadoc:aggregate -Pjavadoc -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