From 754eee3e1294c1381ecc802b1217895bcfab360f Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Wed, 9 Nov 2016 12:33:46 -0800 Subject: Rearrange Releng Job and Parameter Files Individual project jobs can now be tested using: jenkins-jobs test -r jjb/global:jjb/$project - Rename '.yaml' files to '.yml' so they get checked by the verify-releng.sh script, and update the script to include checking of '.yaml' files. - Move parameter and macro files under new 'global' directory. Change-Id: I6b74f5d8af2bced3256a7f4a33983df5310511a2 Signed-off-by: Trevor Bramwell --- jjb/global/installer-params.yml | 102 ++++++ jjb/global/releng-defaults.yml | 21 ++ jjb/global/releng-macros.yml | 357 ++++++++++++++++++++ jjb/global/slave-params.yml | 720 ++++++++++++++++++++++++++++++++++++++++ jjb/opnfv/artifact-cleanup.yml | 42 --- jjb/opnfv/installer-params.yml | 102 ------ jjb/opnfv/opnfv-docker.sh | 92 ----- jjb/opnfv/opnfv-docker.yml | 82 ----- jjb/opnfv/opnfv-docs.yml | 120 ------- jjb/opnfv/opnfv-lint.yml | 68 ---- jjb/opnfv/opnfv-utils.yml | 39 --- jjb/opnfv/slave-params.yml | 720 ---------------------------------------- jjb/releng-defaults.yaml | 21 -- jjb/releng-macros.yaml | 357 -------------------- jjb/releng/artifact-cleanup.yml | 42 +++ jjb/releng/opnfv-docker.sh | 92 +++++ jjb/releng/opnfv-docker.yml | 82 +++++ jjb/releng/opnfv-docs.yml | 120 +++++++ jjb/releng/opnfv-lint.yml | 68 ++++ jjb/releng/opnfv-utils.yml | 39 +++ jjb/releng/verify-releng.sh | 2 +- 21 files changed, 1644 insertions(+), 1644 deletions(-) create mode 100644 jjb/global/installer-params.yml create mode 100644 jjb/global/releng-defaults.yml create mode 100644 jjb/global/releng-macros.yml create mode 100644 jjb/global/slave-params.yml delete mode 100644 jjb/opnfv/artifact-cleanup.yml delete mode 100644 jjb/opnfv/installer-params.yml delete mode 100644 jjb/opnfv/opnfv-docker.sh delete mode 100644 jjb/opnfv/opnfv-docker.yml delete mode 100644 jjb/opnfv/opnfv-docs.yml delete mode 100644 jjb/opnfv/opnfv-lint.yml delete mode 100644 jjb/opnfv/opnfv-utils.yml delete mode 100644 jjb/opnfv/slave-params.yml delete mode 100644 jjb/releng-defaults.yaml delete mode 100644 jjb/releng-macros.yaml create mode 100644 jjb/releng/artifact-cleanup.yml create mode 100644 jjb/releng/opnfv-docker.sh create mode 100644 jjb/releng/opnfv-docker.yml create mode 100644 jjb/releng/opnfv-docs.yml create mode 100644 jjb/releng/opnfv-lint.yml create mode 100644 jjb/releng/opnfv-utils.yml diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml new file mode 100644 index 000000000..55f4769b7 --- /dev/null +++ b/jjb/global/installer-params.yml @@ -0,0 +1,102 @@ +- parameter: + name: 'apex-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '192.168.X.X' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + 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' + +- parameter: + name: 'compass-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '192.168.200.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: compass + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'ext-net' + description: 'external network for test' + +- parameter: + name: 'fuel-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '10.20.0.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: fuel + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'admin_floating_net' + description: 'external network for test' + - string: + name: BRIDGE + default: 'pxebr' + description: 'pxe bridge for booting of Fuel master' + +- parameter: + name: 'joid-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '192.168.122.5' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: joid + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: OS_RELEASE + default: 'newton' + description: 'OpenStack release (mitaka|newton)' + - string: + name: EXTERNAL_NETWORK + default: ext-net + description: "External network used for Floating ips." + - string: + name: LAB_CONFIG + default: "$HOME/joid_config" + description: "Local lab config and Openstack openrc location" + - string: + name: MAAS_REINSTALL + default: 'false' + description: "Reinstall MAAS and Bootstrap before deploy [true/false]" + - string: + name: UBUNTU_DISTRO + default: 'xenial' + description: "Ubuntu distribution to use for Openstack (xenial)" + - string: + name: CPU_ARCHITECTURE + default: 'amd64' + description: "CPU Architecture to use for Ubuntu distro " +- parameter: + name: 'infra-defaults' + parameters: + - string: + name: INSTALLER_IP + default: '192.168.122.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: infra + description: 'Installer used for deploying OPNFV on this POD' diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml new file mode 100644 index 000000000..bf3330657 --- /dev/null +++ b/jjb/global/releng-defaults.yml @@ -0,0 +1,21 @@ +# jjb defaults + +- defaults: + name: global + + logrotate: + daysToKeep: 60 + numToKeep: 200 + artifactDaysToKeep: 30 + artifactNumToKeep: 100 + + ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + + project-type: freestyle + + node: master + diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml new file mode 100644 index 000000000..3afd355e6 --- /dev/null +++ b/jjb/global/releng-macros.yml @@ -0,0 +1,357 @@ +# OLD Releng macros + +- parameter: + name: project-parameter + parameters: + - string: + name: PROJECT + default: '{project}' + description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project" + - string: + name: GS_BASE + default: artifacts.opnfv.org/$PROJECT + description: "URL to Google Storage." + - string: + 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: GERRIT_BRANCH + default: '{branch}' + description: "JJB configured GERRIT_BRANCH parameter" + +- scm: + name: git-scm + scm: + - git: + credentials-id: '{credentials-id}' + url: '$GIT_BASE' + refspec: '' + branches: + - 'origin/{branch}' + skip-tag: true + wipe-workspace: true + +- scm: + name: gerrit-trigger-scm + scm: + - git: + credentials-id: '{credentials-id}' + url: '$GIT_BASE' + refspec: '{refspec}' + branches: + - 'origin/$GERRIT_BRANCH' + skip-tag: true + choosing-strategy: '{choosing-strategy}' + timeout: 15 + +- trigger: + name: 'daily-trigger-disabled' + triggers: + - timed: '' + +- trigger: + name: 'weekly-trigger-disabled' + triggers: + - timed: '' + +- trigger: + name: gerrit-trigger-patch-submitted + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + projects: + - project-compare-type: 'ANT' + project-pattern: '{name}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + +- trigger: + name: gerrit-trigger-patch-merged + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{name}' + 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 + +- builder: + name: build-html-and-pdf-docs-output + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs + GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh + +- builder: + name: upload-under-review-docs-to-opnfv-artifacts + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] + [[ -d docs_output ]] || exit 0 + + echo + echo "###########################" + echo "UPLOADING DOCS UNDER REVIEW" + echo "###########################" + echo + + gs_base="artifacts.opnfv.org/$PROJECT/review" + gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" + local_path="upload/$GERRIT_CHANGE_NUMBER" + + mkdir -p upload + mv docs_output "$local_path" + gsutil -m cp -r "$local_path" "gs://$gs_base" + + gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + "gs://$gs_path"/**.html > /dev/null 2>&1 + + echo "Document link(s):" >> gerrit_comment.txt + find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ + sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt + +- builder: + name: upload-generated-docs-to-opnfv-artifacts + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ -d docs_output ]] || exit 0 + + echo + echo "########################" + echo "UPLOADING GENERATED DOCS" + echo "########################" + echo + + echo "gs_path="$GS_URL/docs"" + echo "local_path="upload/docs"" + + gs_path="$GS_URL/docs" + local_path="upload/docs" + + mkdir -p upload + mv docs_output "$local_path" + ls "$local_path" + + echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path"" + gsutil -m cp -r "$local_path"/* "gs://$gs_path" + + gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + "gs://$gs_path"/**.html > /dev/null 2>&1 + + echo "Document link(s):" >> gerrit_comment.txt + find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ + sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt + +- builder: + name: report-docs-build-result-to-gerrit + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + if [[ -e gerrit_comment.txt ]] ; then + echo + echo "posting review comment to gerrit..." + echo + cat gerrit_comment.txt + echo + ssh -p 29418 gerrit.opnfv.org \ + "gerrit review -p $GERRIT_PROJECT \ + -m '$(cat gerrit_comment.txt)' \ + $GERRIT_PATCHSET_REVISION \ + --notify NONE" + fi + +- builder: + name: remove-old-docs-from-opnfv-artifacts + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] + + gs_path="artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" + + if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then + echo + echo "Deleting Out-of-dated Documents..." + gsutil -m rm -r "gs://$gs_path" + fi + gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER" + + if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then + echo + echo "Deleting Out-of-dated Documents..." + gsutil -m rm -r "gs://$gs_path" + fi + +- builder: + name: build-and-upload-artifacts-json-api + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + export PATH=$PATH:/usr/local/bin/ + + virtualenv -p python2.7 $WORKSPACE/releng_artifacts + source $WORKSPACE/releng_artifacts/bin/activate + + # install python packages + pip install google-api-python-client + + # generate and upload index file + echo "Generating Artifacts API ..." + python $WORKSPACE/utils/opnfv-artifacts.py > index.json + gsutil cp index.json gs://artifacts.opnfv.org/index.json + + deactivate + +- builder: + name: lint-python-code + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + virtualenv -p python2.7 $WORKSPACE/releng_flake8 + source $WORKSPACE/releng_flake8/bin/activate + + # install python packages + pip install "flake8==2.6.2" + + # generate and upload lint log + echo "Running flake8 code on $PROJECT ..." + + # Get number of flake8 violations. If none, this will be an + # empty string: "" + FLAKE_COUNT="$(find . \ + -path './releng_flake8' -prune -o \ + -path './.tox' -prune -o \ + -type f -name "*.py" -print | \ + xargs flake8 --exit-zero -qq --count 2>&1)" + + # Ensure we start with a clean environment + rm -f lint.log + + if [ ! -z $FLAKE_COUNT ]; then + echo "Flake8 Violations: $FLAKE_COUNT" > lint.log + find . \ + -path './releng_flake8' -prune -o \ + -path './.tox' -prune -o \ + -type f -name "*.py" -print | \ + xargs flake8 --exit-zero --first >> violation.log + SHOWN=$(wc -l violation.log | cut -d' ' -f1) + echo -e "First $SHOWN shown\n---" >> lint.log + cat violation.log >> lint.log + sed -r -i '4,$s/^/ /g' lint.log + rm violation.log + fi + + deactivate + +- builder: + name: report-lint-result-to-gerrit + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + # If no violations were found, no lint log will exist. + if [[ -e lint.log ]] ; then + echo -e "\nposting linting report to gerrit...\n" + + cat lint.log + echo + + ssh -p 29418 gerrit.opnfv.org \ + "gerrit review -p $GERRIT_PROJECT \ + -m \"$(cat lint.log)\" \ + $GERRIT_PATCHSET_REVISION \ + --notify NONE" + + exit 1 + fi + +- builder: + name: upload-review-docs + builders: + - build-html-and-pdf-docs-output + - upload-under-review-docs-to-opnfv-artifacts + - report-docs-build-result-to-gerrit + +- builder: + name: upload-merged-docs + builders: + - build-html-and-pdf-docs-output + - upload-generated-docs-to-opnfv-artifacts + - report-docs-build-result-to-gerrit + - remove-old-docs-from-opnfv-artifacts + +- builder: + name: check-bash-syntax + builders: + - shell: "find . -name '*.sh' | xargs bash -n" diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml new file mode 100644 index 000000000..dd0c97996 --- /dev/null +++ b/jjb/global/slave-params.yml @@ -0,0 +1,720 @@ +##################################################### +# Parameters for slaves using old labels +# This will be cleaned up once the new job structure and +# use of the new labels are in place +##################################################### +- parameter: + name: 'apex-daily-master-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-daily-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 +- parameter: + name: 'apex-daily-colorado-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-daily-colorado' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 +- parameter: + name: 'apex-verify-master-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-verify-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-virtual3 + - intel-virtual4 + - intel-virtual5 + default-slaves: + - intel-virtual3 + - intel-virtual4 + - intel-virtual5 +- parameter: + name: 'apex-verify-colorado-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-verify-colorado' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-virtual3 + - intel-virtual4 + - intel-virtual5 + default-slaves: + - intel-virtual3 + - intel-virtual4 + - intel-virtual5 +- parameter: + name: 'lf-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' +##################################################### +# Parameters for CI baremetal PODs +##################################################### +- parameter: + name: 'apex-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' +- parameter: + name: 'compass-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'fuel-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'fuel-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'armband-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'armband-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' +- parameter: + name: 'joid-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'joid-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: EXTERNAL_NETWORK + default: ext-net + description: "External network floating ips" +##################################################### +# Parameters for CI virtual PODs +##################################################### +- parameter: + name: 'apex-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' +- parameter: + name: 'compass-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'fuel-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'fuel-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'armband-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'armband-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' +- parameter: + name: 'joid-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'joid-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' + parameters: + - label: + name: SLAVE_LABEL + default: 'opnfv-build-arm' + - 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." +- parameter: + name: 'opnfv-build-centos-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'opnfv-build-centos' + - 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." +- parameter: + name: 'opnfv-build-ubuntu-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'opnfv-build-ubuntu' + 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." +- parameter: + name: 'opnfv-build-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'opnfv-build' + 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." +- parameter: + name: 'huawei-build-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-build + default-slaves: + - huawei-build + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +##################################################### +# Parameters for none-CI PODs +##################################################### +- parameter: + name: 'ericsson-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ericsson-pod1 + default-slaves: + - ericsson-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'intel-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod1 + default-slaves: + - intel-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'intel-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod2 + default-slaves: + - intel-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' +- parameter: + name: 'intel-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod3 + default-slaves: + - intel-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'huawei-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod3 + default-slaves: + - huawei-pod3 + - label: + name: SLAVE_LABEL + default: 'huawei-test' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'huawei-pod4-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod4 + default-slaves: + - huawei-pod4 + - label: + name: SLAVE_LABEL + default: 'huawei-test' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'huawei-pod5-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod5 + default-slaves: + - huawei-pod5 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT +- parameter: + name: 'zte-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod1 + default-slaves: + - zte-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.6.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br6' + description: 'pxe bridge for booting of Fuel master' +- parameter: + name: 'zte-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod2 + default-slaves: + - zte-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.7.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br7' + description: 'pxe bridge for booting of Fuel master' +- parameter: + name: 'zte-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod3 + default-slaves: + - zte-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BRIDGE + default: 'br0' + description: 'pxe bridge for booting of Fuel master' +- parameter: + name: 'juniper-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - juniper-pod1 + default-slaves: + - juniper-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: CEPH_DISKS + default: /srv + description: "Disks to use by ceph (comma separated list)" +- parameter: + name: 'orange-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod1 + default-slaves: + - orange-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'orange-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod2 + default-slaves: + - orange-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'orange-pod5-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod5 + default-slaves: + - orange-pod5 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'dell-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - dell-pod1 + default-slaves: + - dell-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'dell-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - dell-pod2 + default-slaves: + - dell-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'nokia-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - nokia-pod1 + default-slaves: + - nokia-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' +- parameter: + name: 'arm-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - arm-pod2 + default-slaves: + - arm-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' +- parameter: + name: 'arm-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - arm-pod3 + default-slaves: + - arm-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' +- parameter: + name: 'intel-virtual6-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-virtual6 + default-slaves: + - intel-virtual6 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'ool-virtual1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ool-virtual1 + default-slaves: + - ool-virtual1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to be used' +- parameter: + name: 'multisite-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'multisite-virtual' + - 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 +##################################################### +- parameter: + name: 'sandbox-baremetal-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'sandbox-baremetal' + 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." +- parameter: + name: 'sandbox-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'sandbox-virtual' + 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." +- parameter: + name: 'dummy-pod1-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'dummy-pod1' + 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." diff --git a/jjb/opnfv/artifact-cleanup.yml b/jjb/opnfv/artifact-cleanup.yml deleted file mode 100644 index 1c609a4b2..000000000 --- a/jjb/opnfv/artifact-cleanup.yml +++ /dev/null @@ -1,42 +0,0 @@ -- project: - name: releng-artifact-cleanup - - project: 'releng' - - jobs: - - 'releng-artifact-cleanup-daily-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - - -- job-template: - name: 'releng-artifact-cleanup-daily-{stream}' - - # Job template for daily builders - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: master - - disabled: false - - parameters: - - project-parameter: - project: '{project}' - - scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' - - triggers: - - timed: 'H H * * *' - - builders: - - shell: | - $WORKSPACE/utils/retention_script.sh diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml deleted file mode 100644 index 55f4769b7..000000000 --- a/jjb/opnfv/installer-params.yml +++ /dev/null @@ -1,102 +0,0 @@ -- parameter: - name: 'apex-defaults' - parameters: - - string: - name: INSTALLER_IP - default: '192.168.X.X' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - 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' - -- parameter: - name: 'compass-defaults' - parameters: - - string: - name: INSTALLER_IP - default: '192.168.200.2' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: compass - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'ext-net' - description: 'external network for test' - -- parameter: - name: 'fuel-defaults' - parameters: - - string: - name: INSTALLER_IP - default: '10.20.0.2' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: fuel - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'admin_floating_net' - description: 'external network for test' - - string: - name: BRIDGE - default: 'pxebr' - description: 'pxe bridge for booting of Fuel master' - -- parameter: - name: 'joid-defaults' - parameters: - - string: - name: INSTALLER_IP - default: '192.168.122.5' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: joid - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: OS_RELEASE - default: 'newton' - description: 'OpenStack release (mitaka|newton)' - - string: - name: EXTERNAL_NETWORK - default: ext-net - description: "External network used for Floating ips." - - string: - name: LAB_CONFIG - default: "$HOME/joid_config" - description: "Local lab config and Openstack openrc location" - - string: - name: MAAS_REINSTALL - default: 'false' - description: "Reinstall MAAS and Bootstrap before deploy [true/false]" - - string: - name: UBUNTU_DISTRO - default: 'xenial' - description: "Ubuntu distribution to use for Openstack (xenial)" - - string: - name: CPU_ARCHITECTURE - default: 'amd64' - description: "CPU Architecture to use for Ubuntu distro " -- parameter: - name: 'infra-defaults' - parameters: - - string: - name: INSTALLER_IP - default: '192.168.122.2' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: infra - description: 'Installer used for deploying OPNFV on this POD' diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh deleted file mode 100644 index e0fbb7564..000000000 --- a/jjb/opnfv/opnfv-docker.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - - -echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..." -echo "--------------------------------------------------------" -echo - - -if [[ -n $(ps -ef|grep 'docker build'|grep -v grep) ]]; then - echo "There is already another build process in progress:" - echo $(ps -ef|grep 'docker build'|grep -v grep) - # Abort this job since it will collide and might mess up the current one. - echo "Aborting..." - exit 1 -fi - -# Remove previous running containers if exist -if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then - echo "Removing existing $DOCKER_REPO_NAME containers..." - docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f - t=60 - # Wait max 60 sec for containers to be removed - while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do - sleep 1 - let t=t-1 - done -fi - - -# Remove existing images if exist -if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then - echo "Docker images to remove:" - docker images | head -1 && docker images | grep $DOCKER_REPO_NAME - image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $tag)" ]]; then - echo "Removing docker image $DOCKER_REPO_NAME:$tag..." - docker rmi -f $DOCKER_REPO_NAME:$tag - fi - done -fi - - -# cd to directory where Dockerfile is located -cd $WORKSPACE/docker -if [ ! -f ./Dockerfile ]; then - echo "ERROR: Dockerfile not found." - exit 1 -fi - -# Get tag version -branch="${GIT_BRANCH##origin/}" -echo "Current branch: $branch" - -if [[ "$branch" == "master" ]]; then - DOCKER_TAG="latest" -else - DOCKER_TAG="stable" -fi - -# Start the build -echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" -echo "--------------------------------------------------------" -echo -cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$branch ." - -echo ${cmd} -${cmd} - - -# list the images -echo "Available images are:" -docker images - -# Push image to Dockerhub -if [[ "$PUSH_IMAGE" == "true" ]]; then - echo "Pushing $DOCKER_REPO_NAME:$DOCKER_TAG to the docker registry..." - echo "--------------------------------------------------------" - echo - docker push $DOCKER_REPO_NAME:$DOCKER_TAG -fi diff --git a/jjb/opnfv/opnfv-docker.yml b/jjb/opnfv/opnfv-docker.yml deleted file mode 100644 index 0df0ddf6f..000000000 --- a/jjb/opnfv/opnfv-docker.yml +++ /dev/null @@ -1,82 +0,0 @@ -############################################## -# job configuration for docker build and push -############################################## - -- project: - - name: opnfv-docker - - master: &master - stream: master - branch: '{stream}' - disabled: false - colorado: &colorado - stream: colorado - branch: 'stable/{stream}' - disabled: false - - project: - # projects with jobs for master - - 'bottlenecks': - <<: *master - - 'cperf': - <<: *master - - 'dovetail': - <<: *master - - 'functest': - <<: *master - - 'qtip': - <<: *master - - 'storperf': - <<: *master - - 'yardstick': - <<: *master - # projects with jobs for stable - - 'bottlenecks': - <<: *colorado - - 'functest': - <<: *colorado - - 'storperf': - <<: *colorado - - 'yardstick': - <<: *colorado - - jobs: - - '{project}-docker-build-push-{stream}' - - -######################## -# job templates -######################## -- job-template: - name: '{project}-docker-build-push-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - - 'opnfv-build-ubuntu-defaults' - - string: - name: PUSH_IMAGE - default: "true" - description: "To enable/disable pushing the image to Dockerhub." - - string: - name: DOCKER_REPO_NAME - default: "opnfv/{project}" - description: "Dockerhub repo to be pushed to." - - scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' - - builders: - - shell: - !include-raw-escape: ./opnfv-docker.sh - - triggers: - - pollscm: - cron: "*/30 * * * *" - diff --git a/jjb/opnfv/opnfv-docs.yml b/jjb/opnfv/opnfv-docs.yml deleted file mode 100644 index 442e8ea71..000000000 --- a/jjb/opnfv/opnfv-docs.yml +++ /dev/null @@ -1,120 +0,0 @@ -######################## -# Job configuration for opnfv-docs -######################## -- project: - - name: opnfv-docs - - project: opnfv-docs - - jobs: - - 'opnfv-docs-verify-{stream}' - - 'opnfv-docs-merge-{stream}' - - stream: - - master: - branch: '{stream}' - doc-version: '' - gs-pathname: '' - disabled: false - - colorado: - branch: 'stable/{stream}' - doc-version: '3.0' - gs-pathname: '/{stream}/{doc-version}' - disabled: false - -######################## -# job templates -######################## - -- job-template: - name: 'opnfv-docs-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - - gerrit-parameter: - branch: '{branch}' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '*' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: docs/** - - compare-type: ANT - pattern: yardstick/** - - builders: - - upload-review-docs - -- job-template: - name: 'opnfv-docs-merge-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - - gerrit-parameter: - branch: '{branch}' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: GERRIT_REFSPEC - default: 'refs/heads/{branch}' - description: "JJB configured GERRIT_REFSPEC parameter" - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - triggers: - - gerrit: - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - - comment-added-contains-event: - comment-contains-value: 'rebuild docs' - projects: - - project-compare-type: 'ANT' - project-pattern: '*' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: docs/** - - compare-type: ANT - pattern: yardstick/** - - builders: - - upload-merged-docs diff --git a/jjb/opnfv/opnfv-lint.yml b/jjb/opnfv/opnfv-lint.yml deleted file mode 100644 index 652f28292..000000000 --- a/jjb/opnfv/opnfv-lint.yml +++ /dev/null @@ -1,68 +0,0 @@ -######################## -# Job configuration for opnfv-lint -######################## -- project: - - name: opnfv-lint - - project: opnfv-lint - - jobs: - - 'opnfv-lint-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - colorado: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -######################## -# job templates -######################## - -- job-template: - name: 'opnfv-lint-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - - gerrit-parameter: - branch: '{branch}' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'REG_EXP' - project-pattern: 'functest|sdnvpn|qtip|daisy|sfc|escalator' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: '**/*.py' - - builders: - - lint-python-code - - report-lint-result-to-gerrit diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml deleted file mode 100644 index 717bb3cbc..000000000 --- a/jjb/opnfv/opnfv-utils.yml +++ /dev/null @@ -1,39 +0,0 @@ -- project: - - name: opnfv-utils - - jobs: - - 'prune-docker-images' -######################## -# job templates -######################## -- job-template: - name: 'prune-docker-images' - - disabled: false - - concurrent: true - - parameters: - - node: - name: SLAVE_NAME - description: Slaves to prune docker images - default-slaves: - - arm-build2 - - ericsson-build4 - - ericsson-build5 - - lf-build2 - allowed-multiselect: true - ignore-offline-nodes: true - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - shell: | - #!/bin/bash - - (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm - docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi - - triggers: - - timed: '@midnight' diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml deleted file mode 100644 index dd0c97996..000000000 --- a/jjb/opnfv/slave-params.yml +++ /dev/null @@ -1,720 +0,0 @@ -##################################################### -# Parameters for slaves using old labels -# This will be cleaned up once the new job structure and -# use of the new labels are in place -##################################################### -- parameter: - name: 'apex-daily-master-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-daily-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 -- parameter: - name: 'apex-daily-colorado-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-daily-colorado' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 -- parameter: - name: 'apex-verify-master-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-verify-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 - default-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 -- parameter: - name: 'apex-verify-colorado-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-verify-colorado' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 - default-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 -- parameter: - name: 'lf-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -##################################################### -# Parameters for CI baremetal PODs -##################################################### -- parameter: - name: 'apex-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -- parameter: - name: 'compass-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'compass-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'fuel-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'fuel-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'armband-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'armband-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'joid-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'joid-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: EXTERNAL_NETWORK - default: ext-net - description: "External network floating ips" -##################################################### -# Parameters for CI virtual PODs -##################################################### -- parameter: - name: 'apex-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'apex-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -- parameter: - name: 'compass-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'compass-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'fuel-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'fuel-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'armband-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'armband-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'joid-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'joid-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' - parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-arm' - - 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." -- parameter: - name: 'opnfv-build-centos-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-centos' - - 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." -- parameter: - name: 'opnfv-build-ubuntu-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-ubuntu' - 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." -- parameter: - name: 'opnfv-build-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build' - 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." -- parameter: - name: 'huawei-build-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-build - default-slaves: - - huawei-build - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -##################################################### -# Parameters for none-CI PODs -##################################################### -- parameter: - name: 'ericsson-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - ericsson-pod1 - default-slaves: - - ericsson-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'intel-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-pod1 - default-slaves: - - intel-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'intel-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-pod2 - default-slaves: - - intel-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -- parameter: - name: 'intel-pod3-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-pod3 - default-slaves: - - intel-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'huawei-pod3-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-pod3 - default-slaves: - - huawei-pod3 - - label: - name: SLAVE_LABEL - default: 'huawei-test' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'huawei-pod4-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-pod4 - default-slaves: - - huawei-pod4 - - label: - name: SLAVE_LABEL - default: 'huawei-test' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'huawei-pod5-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-pod5 - default-slaves: - - huawei-pod5 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT -- parameter: - name: 'zte-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod1 - default-slaves: - - zte-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: INSTALLER_IP - default: '10.20.6.2' - description: 'IP of the installer' - - string: - name: BRIDGE - default: 'br6' - description: 'pxe bridge for booting of Fuel master' -- parameter: - name: 'zte-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod2 - default-slaves: - - zte-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: INSTALLER_IP - default: '10.20.7.2' - description: 'IP of the installer' - - string: - name: BRIDGE - default: 'br7' - description: 'pxe bridge for booting of Fuel master' -- parameter: - name: 'zte-pod3-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod3 - default-slaves: - - zte-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BRIDGE - default: 'br0' - description: 'pxe bridge for booting of Fuel master' -- parameter: - name: 'juniper-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - juniper-pod1 - default-slaves: - - juniper-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: CEPH_DISKS - default: /srv - description: "Disks to use by ceph (comma separated list)" -- parameter: - name: 'orange-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod1 - default-slaves: - - orange-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'orange-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod2 - default-slaves: - - orange-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'orange-pod5-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod5 - default-slaves: - - orange-pod5 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'dell-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - dell-pod1 - default-slaves: - - dell-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'dell-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - dell-pod2 - default-slaves: - - dell-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'nokia-pod1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - nokia-pod1 - default-slaves: - - nokia-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -- parameter: - name: 'arm-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-pod2 - default-slaves: - - arm-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'arm-pod3-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-pod3 - default-slaves: - - arm-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'intel-virtual6-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-virtual6 - default-slaves: - - intel-virtual6 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'ool-virtual1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - ool-virtual1 - default-slaves: - - ool-virtual1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to be used' -- parameter: - name: 'multisite-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'multisite-virtual' - - 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 -##################################################### -- parameter: - name: 'sandbox-baremetal-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'sandbox-baremetal' - 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." -- parameter: - name: 'sandbox-virtual-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'sandbox-virtual' - 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." -- parameter: - name: 'dummy-pod1-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'dummy-pod1' - 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." diff --git a/jjb/releng-defaults.yaml b/jjb/releng-defaults.yaml deleted file mode 100644 index bf3330657..000000000 --- a/jjb/releng-defaults.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# jjb defaults - -- defaults: - name: global - - logrotate: - daysToKeep: 60 - numToKeep: 200 - artifactDaysToKeep: 30 - artifactNumToKeep: 100 - - ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' - wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' - - project-type: freestyle - - node: master - diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml deleted file mode 100644 index 3afd355e6..000000000 --- a/jjb/releng-macros.yaml +++ /dev/null @@ -1,357 +0,0 @@ -# OLD Releng macros - -- parameter: - name: project-parameter - parameters: - - string: - name: PROJECT - default: '{project}' - description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project" - - string: - name: GS_BASE - default: artifacts.opnfv.org/$PROJECT - description: "URL to Google Storage." - - string: - 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: GERRIT_BRANCH - default: '{branch}' - description: "JJB configured GERRIT_BRANCH parameter" - -- scm: - name: git-scm - scm: - - git: - credentials-id: '{credentials-id}' - url: '$GIT_BASE' - refspec: '' - branches: - - 'origin/{branch}' - skip-tag: true - wipe-workspace: true - -- scm: - name: gerrit-trigger-scm - scm: - - git: - credentials-id: '{credentials-id}' - url: '$GIT_BASE' - refspec: '{refspec}' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: '{choosing-strategy}' - timeout: 15 - -- trigger: - name: 'daily-trigger-disabled' - triggers: - - timed: '' - -- trigger: - name: 'weekly-trigger-disabled' - triggers: - - timed: '' - -- trigger: - name: gerrit-trigger-patch-submitted - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - projects: - - project-compare-type: 'ANT' - project-pattern: '{name}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - -- trigger: - name: gerrit-trigger-patch-merged - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: '{name}' - 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 - -- builder: - name: build-html-and-pdf-docs-output - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs - GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh - -- builder: - name: upload-under-review-docs-to-opnfv-artifacts - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - [[ -d docs_output ]] || exit 0 - - echo - echo "###########################" - echo "UPLOADING DOCS UNDER REVIEW" - echo "###########################" - echo - - gs_base="artifacts.opnfv.org/$PROJECT/review" - gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" - local_path="upload/$GERRIT_CHANGE_NUMBER" - - mkdir -p upload - mv docs_output "$local_path" - gsutil -m cp -r "$local_path" "gs://$gs_base" - - gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - "gs://$gs_path"/**.html > /dev/null 2>&1 - - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ - sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt - -- builder: - name: upload-generated-docs-to-opnfv-artifacts - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ -d docs_output ]] || exit 0 - - echo - echo "########################" - echo "UPLOADING GENERATED DOCS" - echo "########################" - echo - - echo "gs_path="$GS_URL/docs"" - echo "local_path="upload/docs"" - - gs_path="$GS_URL/docs" - local_path="upload/docs" - - mkdir -p upload - mv docs_output "$local_path" - ls "$local_path" - - echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path"" - gsutil -m cp -r "$local_path"/* "gs://$gs_path" - - gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - "gs://$gs_path"/**.html > /dev/null 2>&1 - - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ - sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt - -- builder: - name: report-docs-build-result-to-gerrit - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - if [[ -e gerrit_comment.txt ]] ; then - echo - echo "posting review comment to gerrit..." - echo - cat gerrit_comment.txt - echo - ssh -p 29418 gerrit.opnfv.org \ - "gerrit review -p $GERRIT_PROJECT \ - -m '$(cat gerrit_comment.txt)' \ - $GERRIT_PATCHSET_REVISION \ - --notify NONE" - fi - -- builder: - name: remove-old-docs-from-opnfv-artifacts - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - - gs_path="artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" - - if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then - echo - echo "Deleting Out-of-dated Documents..." - gsutil -m rm -r "gs://$gs_path" - fi - gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER" - - if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then - echo - echo "Deleting Out-of-dated Documents..." - gsutil -m rm -r "gs://$gs_path" - fi - -- builder: - name: build-and-upload-artifacts-json-api - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - export PATH=$PATH:/usr/local/bin/ - - virtualenv -p python2.7 $WORKSPACE/releng_artifacts - source $WORKSPACE/releng_artifacts/bin/activate - - # install python packages - pip install google-api-python-client - - # generate and upload index file - echo "Generating Artifacts API ..." - python $WORKSPACE/utils/opnfv-artifacts.py > index.json - gsutil cp index.json gs://artifacts.opnfv.org/index.json - - deactivate - -- builder: - name: lint-python-code - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - virtualenv -p python2.7 $WORKSPACE/releng_flake8 - source $WORKSPACE/releng_flake8/bin/activate - - # install python packages - pip install "flake8==2.6.2" - - # generate and upload lint log - echo "Running flake8 code on $PROJECT ..." - - # Get number of flake8 violations. If none, this will be an - # empty string: "" - FLAKE_COUNT="$(find . \ - -path './releng_flake8' -prune -o \ - -path './.tox' -prune -o \ - -type f -name "*.py" -print | \ - xargs flake8 --exit-zero -qq --count 2>&1)" - - # Ensure we start with a clean environment - rm -f lint.log - - if [ ! -z $FLAKE_COUNT ]; then - echo "Flake8 Violations: $FLAKE_COUNT" > lint.log - find . \ - -path './releng_flake8' -prune -o \ - -path './.tox' -prune -o \ - -type f -name "*.py" -print | \ - xargs flake8 --exit-zero --first >> violation.log - SHOWN=$(wc -l violation.log | cut -d' ' -f1) - echo -e "First $SHOWN shown\n---" >> lint.log - cat violation.log >> lint.log - sed -r -i '4,$s/^/ /g' lint.log - rm violation.log - fi - - deactivate - -- builder: - name: report-lint-result-to-gerrit - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - # If no violations were found, no lint log will exist. - if [[ -e lint.log ]] ; then - echo -e "\nposting linting report to gerrit...\n" - - cat lint.log - echo - - ssh -p 29418 gerrit.opnfv.org \ - "gerrit review -p $GERRIT_PROJECT \ - -m \"$(cat lint.log)\" \ - $GERRIT_PATCHSET_REVISION \ - --notify NONE" - - exit 1 - fi - -- builder: - name: upload-review-docs - builders: - - build-html-and-pdf-docs-output - - upload-under-review-docs-to-opnfv-artifacts - - report-docs-build-result-to-gerrit - -- builder: - name: upload-merged-docs - builders: - - build-html-and-pdf-docs-output - - upload-generated-docs-to-opnfv-artifacts - - report-docs-build-result-to-gerrit - - remove-old-docs-from-opnfv-artifacts - -- builder: - name: check-bash-syntax - builders: - - shell: "find . -name '*.sh' | xargs bash -n" diff --git a/jjb/releng/artifact-cleanup.yml b/jjb/releng/artifact-cleanup.yml new file mode 100644 index 000000000..1c609a4b2 --- /dev/null +++ b/jjb/releng/artifact-cleanup.yml @@ -0,0 +1,42 @@ +- project: + name: releng-artifact-cleanup + + project: 'releng' + + jobs: + - 'releng-artifact-cleanup-daily-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + + +- job-template: + name: 'releng-artifact-cleanup-daily-{stream}' + + # Job template for daily builders + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: master + + disabled: false + + parameters: + - project-parameter: + project: '{project}' + + scm: + - git-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + branch: '{branch}' + + triggers: + - timed: 'H H * * *' + + builders: + - shell: | + $WORKSPACE/utils/retention_script.sh diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh new file mode 100644 index 000000000..e0fbb7564 --- /dev/null +++ b/jjb/releng/opnfv-docker.sh @@ -0,0 +1,92 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Ericsson AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o errexit +set -o nounset +set -o pipefail + + +echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..." +echo "--------------------------------------------------------" +echo + + +if [[ -n $(ps -ef|grep 'docker build'|grep -v grep) ]]; then + echo "There is already another build process in progress:" + echo $(ps -ef|grep 'docker build'|grep -v grep) + # Abort this job since it will collide and might mess up the current one. + echo "Aborting..." + exit 1 +fi + +# Remove previous running containers if exist +if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then + echo "Removing existing $DOCKER_REPO_NAME containers..." + docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f + t=60 + # Wait max 60 sec for containers to be removed + while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do + sleep 1 + let t=t-1 + done +fi + + +# Remove existing images if exist +if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then + echo "Docker images to remove:" + docker images | head -1 && docker images | grep $DOCKER_REPO_NAME + image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}')) + for tag in "${image_tags[@]}"; do + if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $tag)" ]]; then + echo "Removing docker image $DOCKER_REPO_NAME:$tag..." + docker rmi -f $DOCKER_REPO_NAME:$tag + fi + done +fi + + +# cd to directory where Dockerfile is located +cd $WORKSPACE/docker +if [ ! -f ./Dockerfile ]; then + echo "ERROR: Dockerfile not found." + exit 1 +fi + +# Get tag version +branch="${GIT_BRANCH##origin/}" +echo "Current branch: $branch" + +if [[ "$branch" == "master" ]]; then + DOCKER_TAG="latest" +else + DOCKER_TAG="stable" +fi + +# Start the build +echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" +echo "--------------------------------------------------------" +echo +cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$branch ." + +echo ${cmd} +${cmd} + + +# list the images +echo "Available images are:" +docker images + +# Push image to Dockerhub +if [[ "$PUSH_IMAGE" == "true" ]]; then + echo "Pushing $DOCKER_REPO_NAME:$DOCKER_TAG to the docker registry..." + echo "--------------------------------------------------------" + echo + docker push $DOCKER_REPO_NAME:$DOCKER_TAG +fi diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml new file mode 100644 index 000000000..0df0ddf6f --- /dev/null +++ b/jjb/releng/opnfv-docker.yml @@ -0,0 +1,82 @@ +############################################## +# job configuration for docker build and push +############################################## + +- project: + + name: opnfv-docker + + master: &master + stream: master + branch: '{stream}' + disabled: false + colorado: &colorado + stream: colorado + branch: 'stable/{stream}' + disabled: false + + project: + # projects with jobs for master + - 'bottlenecks': + <<: *master + - 'cperf': + <<: *master + - 'dovetail': + <<: *master + - 'functest': + <<: *master + - 'qtip': + <<: *master + - 'storperf': + <<: *master + - 'yardstick': + <<: *master + # projects with jobs for stable + - 'bottlenecks': + <<: *colorado + - 'functest': + <<: *colorado + - 'storperf': + <<: *colorado + - 'yardstick': + <<: *colorado + + jobs: + - '{project}-docker-build-push-{stream}' + + +######################## +# job templates +######################## +- job-template: + name: '{project}-docker-build-push-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + - 'opnfv-build-ubuntu-defaults' + - string: + name: PUSH_IMAGE + default: "true" + description: "To enable/disable pushing the image to Dockerhub." + - string: + name: DOCKER_REPO_NAME + default: "opnfv/{project}" + description: "Dockerhub repo to be pushed to." + + scm: + - git-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + branch: '{branch}' + + builders: + - shell: + !include-raw-escape: ./opnfv-docker.sh + + triggers: + - pollscm: + cron: "*/30 * * * *" + diff --git a/jjb/releng/opnfv-docs.yml b/jjb/releng/opnfv-docs.yml new file mode 100644 index 000000000..442e8ea71 --- /dev/null +++ b/jjb/releng/opnfv-docs.yml @@ -0,0 +1,120 @@ +######################## +# Job configuration for opnfv-docs +######################## +- project: + + name: opnfv-docs + + project: opnfv-docs + + jobs: + - 'opnfv-docs-verify-{stream}' + - 'opnfv-docs-merge-{stream}' + + stream: + - master: + branch: '{stream}' + doc-version: '' + gs-pathname: '' + disabled: false + - colorado: + branch: 'stable/{stream}' + doc-version: '3.0' + gs-pathname: '/{stream}/{doc-version}' + disabled: false + +######################## +# job templates +######################## + +- job-template: + name: 'opnfv-docs-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + - gerrit-parameter: + branch: '{branch}' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '*' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: docs/** + - compare-type: ANT + pattern: yardstick/** + + builders: + - upload-review-docs + +- job-template: + name: 'opnfv-docs-merge-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + - gerrit-parameter: + branch: '{branch}' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GERRIT_REFSPEC + default: 'refs/heads/{branch}' + description: "JJB configured GERRIT_REFSPEC parameter" + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + - comment-added-contains-event: + comment-contains-value: 'rebuild docs' + projects: + - project-compare-type: 'ANT' + project-pattern: '*' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: docs/** + - compare-type: ANT + pattern: yardstick/** + + builders: + - upload-merged-docs diff --git a/jjb/releng/opnfv-lint.yml b/jjb/releng/opnfv-lint.yml new file mode 100644 index 000000000..652f28292 --- /dev/null +++ b/jjb/releng/opnfv-lint.yml @@ -0,0 +1,68 @@ +######################## +# Job configuration for opnfv-lint +######################## +- project: + + name: opnfv-lint + + project: opnfv-lint + + jobs: + - 'opnfv-lint-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - colorado: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +######################## +# job templates +######################## + +- job-template: + name: 'opnfv-lint-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + - gerrit-parameter: + branch: '{branch}' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'REG_EXP' + project-pattern: 'functest|sdnvpn|qtip|daisy|sfc|escalator' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*.py' + + builders: + - lint-python-code + - report-lint-result-to-gerrit diff --git a/jjb/releng/opnfv-utils.yml b/jjb/releng/opnfv-utils.yml new file mode 100644 index 000000000..717bb3cbc --- /dev/null +++ b/jjb/releng/opnfv-utils.yml @@ -0,0 +1,39 @@ +- project: + + name: opnfv-utils + + jobs: + - 'prune-docker-images' +######################## +# job templates +######################## +- job-template: + name: 'prune-docker-images' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: Slaves to prune docker images + default-slaves: + - arm-build2 + - ericsson-build4 + - ericsson-build5 + - lf-build2 + allowed-multiselect: true + ignore-offline-nodes: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: | + #!/bin/bash + + (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm + docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi + + triggers: + - timed: '@midnight' diff --git a/jjb/releng/verify-releng.sh b/jjb/releng/verify-releng.sh index 5c2dbff7a..682a8beda 100755 --- a/jjb/releng/verify-releng.sh +++ b/jjb/releng/verify-releng.sh @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## #test for non-ascii characters, these can pass the test and end up breaking things in production -for x in $(find . -name *\.yml); do +for x in $(find . -name *\.yml -or -name *\.yaml); do if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then echo "file "$x" contains non-ascii characters" -- cgit