From 2be6e2e770f6f9836d12ff10ab5b3bd32e7d6892 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Fri, 4 Dec 2020 16:23:01 -0500 Subject: Use 'lftools deploy archives' for log upload - This is a pre-requisite for using amazon S3 for log storage. - Requires docker images built by updated docker scripts to include packages required by 'lftools' or other project specific docker images to be upgraded with same packages. This change only updates jobs which are using fdiotools docker images. - Add FD.io specific global macros to avoid inflating docker images with packages required by unneeded global-jjb scripts. - Sort VPP job parameters alphabetically - Dump installed python3 packages in setup_executor_env.sh Change-Id: Ifddd8f2b70b10acf834ffc837b27ef5453213a86 Signed-off-by: Dave Wallace --- jjb/global-macros.yaml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'jjb/global-macros.yaml') diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 66a70ba48..f4b009afe 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -24,6 +24,14 @@ default: '{arch}' description: "Architecture parameter" +- parameter: + name: archive-artifacts-parameter + parameters: + - string: + name: ARCHIVE_ARTIFACTS + default: '{artifacts}' + description: "Artifacts to archive on the log server." + - parameter: name: compiler-parameter parameters: @@ -187,6 +195,14 @@ name: TOPO default: '{topo}' description: "Topology parameter" + +- parameter: + name: workspace-archive-artifacts-parameter + parameters: + - string: + name: WS_ARCHIVE_ARTIFACTS + default: '{artifacts}' + description: "Artifacts to archive in $WORKSPACE/archives." # [end] Keep 'parameter' entries ordered alphabetically, please. #### SCMS @@ -634,6 +650,34 @@ - developers - recipients +- publisher: + name: fdio-infra-publish + # macro to finish up a build. + # + # Handles the following: + # - Shipping logs to Nexus or S3 logs repository + # - Cleanup workspace + publishers: + - postbuildscript: + builders: + - role: BOTH + build-on: + - ABORTED + - FAILURE + - NOT_BUILT + - SUCCESS + - UNSTABLE + build-steps: + - shell: !include-raw: scripts/post_build_deploy_archives.sh + - fdio-infra-ship-logs + mark-unstable-if-failed: true + - workspace-cleanup: + exclude: + # Do not clean up *.jenkins-trigger files for jobs that use a + # properties file as input for triggering another build. + - "**/*.jenkins-trigger" + fail-build: false + - publisher: name: fdio-infra-shiplogs # To archive things, the job will need to create an "archives" directory in @@ -718,6 +762,34 @@ days-to-keep: '{build-days-to-keep}' num-to-keep: '{build-num-to-keep}' +- builder: + name: fdio-infra-ship-logs + builders: + # Ensure no pre-existing .netrc files are overriding logs config + - lf-provide-maven-settings-cleanup + - config-file-provider: + files: + - file-id: "jenkins-log-archives-settings" + variable: "SETTINGS_FILE" + - conditional-step: + condition-kind: regex-match + regex: "^.*logs-s3.*" + label: $S3_BUCKET + on-evaluation-failure: dont-run + steps: + - config-file-provider: + files: + - file-id: "jenkins-s3-log-ship" + target: $HOME/.aws/credentials + - lf-infra-create-netrc: + server-id: logs + - shell: !include-raw: + - ../global-jjb/shell/logs-deploy.sh + - shell: !include-raw: + - ../global-jjb/shell/logs-clear-credentials.sh + - description-setter: + regexp: "(^(Nexus|S3) build logs: .*)" + - builder: name: packer-validate builders: -- cgit 1.2.3-korg