# OLD Releng macros
- parameter:
- name: project-parameter
+ name: opendaylight-infra-parameters
parameters:
- string:
name: PROJECT
default: '{project}'
- description: "JJB configured PROJECT parameter to identify an ODL Gerrit project"
-
-- parameter:
- name: gerrit-parameters
- parameters:
+ description: 'Parameter to identify an ODL Gerrit project'
+ - string:
+ name: ARCHIVE_ARTIFACTS
+ default: '{artifacts} **/target/surefire-reports/*-output.txt'
+ description: 'Space separated glob patterns for artifacts to archive into logs.opendaylight.org'
- string:
name: GERRIT_PROJECT
default: '{project}'
name: git-scm
scm:
- git:
- credentials-id: '{credentials-id}'
+ credentials-id: 'opendaylight-jenkins-ssh'
url: '$GIT_BASE'
refspec: ''
branches:
name: git-scm-with-submodules
scm:
- git:
- credentials-id: '{credentials-id}'
+ credentials-id: 'opendaylight-jenkins-ssh'
url: '$GIT_BASE'
refspec: ''
branches:
name: gerrit-trigger-scm
scm:
- git:
- credentials-id: '{credentials-id}'
+ credentials-id: 'opendaylight-jenkins-ssh'
url: '$GIT_BASE'
refspec: '{refspec}'
branches:
unstable: true
fixed: true
send-to:
- - developers
- recipients
- publisher:
unhealthy: 40
- publisher:
- name: archive-build
+ name: opendaylight-infra-shiplogs
# To archive things the job will need to create a "archives" directory in
# the workspace and this macro will handle copying the contents of the
# archives directory.
+ #
+ # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
+ # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
+ # as the archive pattern. This is a space separated list of files to archive.
+ #
# Also ensure that the workspace is cleaned up at the end of the build.
publishers:
- postbuildscript:
global-settings-type: cfp
- description-setter:
regexp: '^Build logs: .*'
+ # Cleanup after ourselves
+ - wipe-org-opendaylight-repo
script-only-if-succeeded: False
script-only-if-failed: False
mark-unstable-if-failed: True
name: releng-stage-release
builders:
- shell: !include-raw: include-raw-stage-release.sh
+
+- wrapper:
+ # This wrapper is required for all jobs as it configures the wrappers
+ # needed by OpenDaylight infra.
+ name: opendaylight-infra-wrappers
+ wrappers:
+ - timeout:
+ type: absolute
+ timeout: '{build-timeout}'
+ timeout-var: 'BUILD_TIMEOUT'
+ fail: true
+ - timestamps
+ - ssh-agent-credentials:
+ users:
+ - 'opendaylight-jenkins-ssh'
+ - jclouds:
+ single-use: True
+ - openstack:
+ single-use: True
+
+- builder:
+ name: packer-validate
+ builders:
+ - config-file-provider:
+ files:
+ - file-id: 'packer-cloud-env'
+ variable: 'CLOUDENV'
+ - shell: |
+ cd packer
+ export PACKER_LOG="yes" && \
+ export PACKER_LOG_PATH="packer-validate.log" && \
+ packer.io validate -var-file=$CLOUDENV \
+ -var-file=../packer/vars/{platform}.json \
+ ../packer/templates/{template}.json
+
+- builder:
+ name: packer-build
+ builders:
+ - shell: |
+ cd packer
+ export PACKER_LOG="yes" && \
+ export PACKER_LOG_PATH="packer-build.log" && \
+ packer.io build -var-file=$CLOUDENV \
+ -var-file=../packer/vars/{platform}.json \
+ ../packer/templates/{template}.json