CI job for fabric.p4
Additionally introduces new defaults
Change-Id: I8d85855931de32b01fac0a436be4f6844919e97c
diff --git a/jjb/onf-macros.yaml b/jjb/onf-macros.yaml
index 41c85b1..4656c9c 100644
--- a/jjb/onf-macros.yaml
+++ b/jjb/onf-macros.yaml
@@ -1,5 +1,29 @@
# JJB Macros for ONF jobs
+# basic string parameters for onf projects
+# differs from lf-infra-parameters as it allows to speficy a different gerrit project
+- parameter:
+ name: onf-infra-parameters
+ parameters:
+ - string:
+ name: PROJECT
+ default: '{project}'
+ - string:
+ name: STREAM
+ default: '{stream}'
+ - string:
+ name: GERRIT_PROJECT
+ default: '{gerrit_project}'
+ - string:
+ name: GERRIT_BRANCH
+ default: '{stream}'
+ - string:
+ name: GERRIT_REFSPEC
+ default: "refs/heads/{stream}"
+ - string:
+ name: sha1
+ default: "origin/{stream}"
+
# control how long builds and artifact are retained
# differs from lf-infra-properties as it retains artifacts
- property:
@@ -9,6 +33,12 @@
days-to-keep: '{build-days-to-keep}'
artifact-num-to-keep: '{artifact-num-to-keep}'
+- property:
+ name: onf-infra-docker-properties
+ properties:
+ - docker-container:
+ credentials-id: '{docker-credentials-id}'
+ docker-registry-url: '{docker-registry}'
# trigger on gerrit patchsets and actions
# docs: https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
@@ -100,3 +130,18 @@
- file-id: known_hosts
target: '$HOME/.ssh/known_hosts'
+# publisher to clean up the workspace after the build whatever the result
+- publisher:
+ name: onf-infra-wscleanup-publisher
+ publishers:
+ - workspace-cleanup:
+ clean-if:
+ - success: true
+ - unstable: true
+ - failure: true
+ - aborted: true
+ - not-built: true
+ dirmatch: false
+ fail-build: true
+ clean-parent: false
+ disable-deferred-wipeout: false