summaryrefslogtreecommitdiffstats
path: root/jjb/global-macros.yaml
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2020-12-04 16:23:01 -0500
committerDave Wallace <dwallacelf@gmail.com>2020-12-15 16:53:50 -0500
commit2be6e2e770f6f9836d12ff10ab5b3bd32e7d6892 (patch)
tree2968c6bf8c2bd3184a6fa7b35512fac573cc6073 /jjb/global-macros.yaml
parent883c9a1b6c314d7f6729ff746cb4cacd06a16184 (diff)
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 <dwallacelf@gmail.com>
Diffstat (limited to 'jjb/global-macros.yaml')
-rw-r--r--jjb/global-macros.yaml72
1 files changed, 72 insertions, 0 deletions
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml
index 66a70ba4..f4b009af 100644
--- a/jjb/global-macros.yaml
+++ b/jjb/global-macros.yaml
@@ -25,6 +25,14 @@
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:
- string:
@@ -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
@@ -635,6 +651,34 @@
- 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
# the workspace and this macro will handle copying the contents of the
@@ -719,6 +763,34 @@
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:
- config-file-provider: