From: Anil Belur Date: Mon, 13 Nov 2017 02:02:52 +0000 (+1000) Subject: Enable maven jobs to archive artifacts X-Git-Tag: v0.12.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F7492%2F1;p=releng%2Fglobal-jjb.git Enable maven jobs to archive artifacts Projects which use the maven jobs in global-jjb may require to archive additional logs such as surefire reports. This needs to be handled by globstar patterns passed through the projects using these templates. Change-Id: I97dc8801a0fb05cccf75f32ad7ad621cb6e974bf Signed-off-by: Anil Belur --- diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-clm-master b/.jjb-test/expected-xml/gerrit-maven-maven-clm-master index c1934551..abe122fa 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-clm-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-clm-master @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master index 168d780d..65a43493 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master index 384bf40d..f0ce0f78 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-release-master b/.jjb-test/expected-xml/gerrit-maven-maven-release-master index e8b47a16..b52256dd 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-release-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-release-master @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 index c9f38b13..f4d4c8c8 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 index 451ed716..ef560e0e 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/gerrit-maven-sonar b/.jjb-test/expected-xml/gerrit-maven-sonar index b6b20e58..f7bebc63 100644 --- a/.jjb-test/expected-xml/gerrit-maven-sonar +++ b/.jjb-test/expected-xml/gerrit-maven-sonar @@ -102,6 +102,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-maven-clm-master b/.jjb-test/expected-xml/github-maven-maven-clm-master index a22d038e..239cda23 100644 --- a/.jjb-test/expected-xml/github-maven-maven-clm-master +++ b/.jjb-test/expected-xml/github-maven-maven-clm-master @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master index 636851e7..5cb3cbe9 100644 --- a/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master +++ b/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master index 69573be7..72318d2a 100644 --- a/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master +++ b/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-maven-release-master b/.jjb-test/expected-xml/github-maven-maven-release-master index f2d892f1..15e754eb 100644 --- a/.jjb-test/expected-xml/github-maven-maven-release-master +++ b/.jjb-test/expected-xml/github-maven-maven-release-master @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 index c255a3f0..3f4754f7 100644 --- a/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/.jjb-test/expected-xml/github-maven-sonar b/.jjb-test/expected-xml/github-maven-sonar index f4550c4d..017819b1 100644 --- a/.jjb-test/expected-xml/github-maven-sonar +++ b/.jjb-test/expected-xml/github-maven-sonar @@ -97,6 +97,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. uuddlrlrba + + ARCHIVE_ARTIFACTS + Artifacts to archive to the logs server. + + diff --git a/docs/jjb/lf-maven-jobs.rst b/docs/jjb/lf-maven-jobs.rst index 9c4d6ca1..9b945333 100644 --- a/docs/jjb/lf-maven-jobs.rst +++ b/docs/jjb/lf-maven-jobs.rst @@ -205,6 +205,7 @@ directory can then be reused later to deploy to Nexus. :Optional parameters: + :archive-artifacts: Artifacts to archive to the logs server (default: ''). :branch: The branch to build against. (default: master) :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) :build-timeout: Timeout in seconds before aborting build. (default: 60) diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 361c6c23..7758fb61 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -71,6 +71,10 @@ mvn-version: '{mvn-version}' # Staging repos do not make sense for CLM jobs so set it blank. staging-profile-id: '{staging-profile-id}' + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. wrappers: - lf-infra-wrappers: @@ -95,6 +99,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days for troubleshooting purposes build-timeout: 15 @@ -177,6 +182,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 30 @@ -290,6 +296,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 30 @@ -400,6 +407,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 30 @@ -511,6 +519,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master # Sonar should always be run on master branch build-days-to-keep: 7 build-timeout: 30 @@ -638,6 +647,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 7 build-timeout: 60 @@ -759,6 +769,7 @@ # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 7 build-timeout: 60