diff options
Diffstat (limited to 'jjb/global')
-rw-r--r-- | jjb/global/installer-params.yml | 27 | ||||
-rw-r--r-- | jjb/global/releng-defaults.yml | 13 | ||||
-rw-r--r-- | jjb/global/releng-macros.yml | 151 | ||||
-rw-r--r-- | jjb/global/slave-params.yml | 171 |
4 files changed, 298 insertions, 64 deletions
diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index 610072d1b..c3e775681 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -10,10 +10,6 @@ default: apex description: 'Installer used for deploying OPNFV on this POD' - string: - name: DEPLOY_SCENARIO - default: 'none' - description: 'Scenario to deploy and test' - - string: name: EXTERNAL_NETWORK default: 'external' description: 'external network for test' @@ -66,6 +62,10 @@ default: joid description: 'Installer used for deploying OPNFV on this POD' - string: + name: MODEL + default: 'os' + description: 'Model to deploy (os|k8)' + - string: name: OS_RELEASE default: 'newton' description: 'OpenStack release (mitaka|newton)' @@ -89,6 +89,19 @@ name: CPU_ARCHITECTURE default: 'amd64' description: "CPU Architecture to use for Ubuntu distro " + +- parameter: + name: 'daisy-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '10.20.0.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: daisy + description: 'Installer used for deploying OPNFV on this POD' + - parameter: name: 'infra-defaults' parameters: @@ -109,13 +122,9 @@ description: 'IP of the installer' - string: name: INSTALLER_TYPE - default: apex + default: netvirt description: 'Installer used for deploying OPNFV on this POD' - string: - name: DEPLOY_SCENARIO - default: 'none' - description: 'Scenario to deploy and test' - - string: name: EXTERNAL_NETWORK default: 'external' description: 'external network for test' diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml index bf3330657..283888603 100644 --- a/jjb/global/releng-defaults.yml +++ b/jjb/global/releng-defaults.yml @@ -3,19 +3,12 @@ - defaults: name: global - logrotate: - daysToKeep: 60 - numToKeep: 200 - artifactDaysToKeep: 30 - artifactNumToKeep: 100 - - ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper project-type: freestyle node: master + properties: + - logrotate-default diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 3afd355e6..9b09e315f 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -1,4 +1,15 @@ -# OLD Releng macros +# Releng macros +# +# NOTE: make sure macros are listed in execution ordered. +# +# 1. parameters/properties +# 2. scm +# 3. triggers +# 4. wrappers +# 5. prebuilders (maven only, configured like Builders) +# 6. builders (maven, freestyle, matrix, etc..) +# 7. postbuilders (maven only, configured like Builders) +# 8. publishers/reporters/notifications - parameter: name: project-parameter @@ -15,39 +26,41 @@ name: GS_BASE_PROXY default: build.opnfv.org/artifacts.opnfv.org/$PROJECT description: "URL to Google Storage proxy" - -- parameter: - name: gerrit-parameter - parameters: + - string: + name: BRANCH + default: '{branch}' + description: "JJB configured BRANCH parameter (e.g. master, stable/danube)" - string: name: GERRIT_BRANCH default: '{branch}' - description: "JJB configured GERRIT_BRANCH parameter" + description: "JJB configured GERRIT_BRANCH parameter (deprecated)" + +- property: + name: logrotate-default + properties: + - build-discarder: + days-to-keep: 60 + num-to-keep: 200 + artifact-days-to-keep: 60 + artifact-num-to-keep: 200 - scm: name: git-scm scm: - - git: - credentials-id: '{credentials-id}' + - git: &git-scm-defaults + credentials-id: '$SSH_CREDENTIAL_ID' url: '$GIT_BASE' - refspec: '' branches: - - 'origin/{branch}' - skip-tag: true - wipe-workspace: true + - 'origin/$BRANCH' + timeout: 15 - scm: - name: gerrit-trigger-scm + name: git-scm-gerrit scm: - git: - credentials-id: '{credentials-id}' - url: '$GIT_BASE' - refspec: '{refspec}' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: '{choosing-strategy}' - timeout: 15 + choosing-strategy: 'gerrit' + refspec: '$GERRIT_REFSPEC' + <<: *git-scm-defaults - trigger: name: 'daily-trigger-disabled' @@ -59,8 +72,9 @@ triggers: - timed: '' +# NOTE: unused macro, but we may use this for some jobs. - trigger: - name: gerrit-trigger-patch-submitted + name: gerrit-trigger-patchset-created triggers: - gerrit: server-name: 'gerrit.opnfv.org' @@ -74,13 +88,13 @@ comment-contains-value: 'recheck' projects: - project-compare-type: 'ANT' - project-pattern: '{name}' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' - trigger: - name: gerrit-trigger-patch-merged + name: gerrit-trigger-change-merged triggers: - gerrit: server-name: 'gerrit.opnfv.org' @@ -90,21 +104,40 @@ comment-contains-value: 'remerge' projects: - project-compare-type: 'ANT' - project-pattern: '{name}' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' -- publisher: - name: archive-artifacts - publishers: - - archive: - artifacts: '{artifacts}' - allow-empty: true - fingerprint: true - latest-only: true - -# New Releng macros +- trigger: + name: 'experimental' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'check-experimental' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'tests/**' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + +- wrapper: + name: ssh-agent-wrapper + wrappers: + - ssh-agent-credentials: + users: + - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' - builder: name: build-html-and-pdf-docs-output @@ -355,3 +388,51 @@ name: check-bash-syntax builders: - shell: "find . -name '*.sh' | xargs bash -n" + +- builder: + name: lint-yaml-code + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + # install python packages + pip install "yamllint==1.6.0" + + # generate and upload lint log + echo "Running yaml code on $PROJECT ..." + + # Ensure we start with a clean environment + rm -f yaml-violation.log lint.log + + # Get number of yaml violations. If none, this will be an + # empty string: "" + find . \ + -type f -name "*.yml" -print \ + -o -name "*.yaml" -print | \ + xargs yamllint > yaml-violation.log || true + + if [ -s "yaml-violation.log" ]; then + SHOWN=$(cat yaml-violation.log| grep -v "^$" |wc -l) + echo -e "First $SHOWN shown\n---" > lint.log + cat yaml-violation.log >> lint.log + sed -r -i '4,$s/^/ /g' lint.log + fi + +- builder: + name: clean-workspace-log + builders: + - shell: | + find $WORKSPACE -type f -print -name '*.log' | xargs rm -f + +- publisher: + name: archive-artifacts + publishers: + - archive: + artifacts: '{artifacts}' + allow-empty: true + fingerprint: true + latest-only: true diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 7eec70918..429828e8e 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -178,6 +178,23 @@ name: EXTERNAL_NETWORK default: ext-net description: "External network floating ips" +- parameter: + name: 'daisy-baremetal-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod2 + default-slaves: + - zte-pod2 + - label: + name: SLAVE_LABEL + default: 'daisy-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' ##################################################### # Parameters for CI virtual PODs ##################################################### @@ -239,15 +256,33 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'daisy-virtual-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-virtual1 + - zte-virtual2 + default-slaves: + - zte-virtual1 + - label: + name: SLAVE_LABEL + default: 'daisy-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' ##################################################### # Parameters for build slaves ##################################################### - parameter: - name: 'opnfv-build-arm-defaults' + name: 'opnfv-build-enea-defaults' parameters: - label: name: SLAVE_LABEL - default: 'opnfv-build-arm' + default: 'opnfv-build-enea' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -314,6 +349,21 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'opnfv-build-ubuntu-arm-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'opnfv-build-ubuntu-arm' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." ##################################################### # Parameters for none-CI PODs ##################################################### @@ -364,15 +414,43 @@ default: /root/.ssh/id_rsa description: 'SSH key to use for Apex' - parameter: - name: 'intel-pod3-defaults' + name: 'intel-pod9-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod9 + default-slaves: + - intel-pod9 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'intel-pod10-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod10 + default-slaves: + - intel-pod10 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'intel-pod12-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - intel-pod3 + - intel-pod12 default-slaves: - - intel-pod3 + - intel-pod12 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -412,15 +490,41 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - parameter: - name: 'huawei-pod5-defaults' + name: 'intel-pod8-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod8 + default-slaves: + - intel-pod8 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT +- parameter: + name: 'huawei-virtual7-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - huawei-pod5 + - huawei-virtual7 default-slaves: - - huawei-pod5 + - huawei-virtual7 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT +- parameter: + name: 'huawei-pod7-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod7 + default-slaves: + - huawei-pod7 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -643,15 +747,17 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - parameter: - name: 'ool-virtual1-defaults' + name: 'ool-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - ool-virtual1 + - ool-virtual2 + - ool-virtual3 default-slaves: - - ool-virtual1 + - '{default-slave}' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -661,6 +767,21 @@ default: /root/.ssh/id_rsa description: 'SSH key to be used' - parameter: + name: 'ool-virtual1-defaults' + parameters: + - 'ool-defaults': + default-slave: 'ool-virtual1' +- parameter: + name: 'ool-virtual2-defaults' + parameters: + - 'ool-defaults': + default-slave: 'ool-virtual2' +- parameter: + name: 'ool-virtual3-defaults' + parameters: + - 'ool-defaults': + default-slave: 'ool-virtual3' +- parameter: name: 'multisite-virtual-defaults' parameters: - label: @@ -681,6 +802,26 @@ default: https://git.opendaylight.org/gerrit/p/$PROJECT.git description: 'Git URL to use on this Jenkins Slave' - parameter: + name: 'ericsson-virtual12-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'ericsson-virtual12' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'ericsson-virtual13-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'ericsson-virtual13' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: name: 'odl-netvirt-virtual-defaults' parameters: - label: @@ -690,6 +831,16 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'odl-netvirt-virtual-intel-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'odl-netvirt-virtual-intel' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' ##################################################### # These slaves are just dummy slaves for sandbox jobs ##################################################### |