diff options
Diffstat (limited to 'jjb')
121 files changed, 4761 insertions, 2074 deletions
diff --git a/jjb/3rd_party_ci/create-apex-vms.sh b/jjb/3rd_party_ci/create-apex-vms.sh index a076dd084..0744ac89a 100755 --- a/jjb/3rd_party_ci/create-apex-vms.sh +++ b/jjb/3rd_party_ci/create-apex-vms.sh @@ -1,11 +1,11 @@ #!/bin/bash -set -e - -# wipe the WORKSPACE -/bin/rm -rf $WORKSPACE/* +set -o errexit +set -o nounset +set -o pipefail # clone opnfv sdnvpn repo git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn + . $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh pushd $LIB ./test_environment.sh --env-number $APEX_ENV_NUMBER --cloner-info $CLONER_INFO --snapshot-disks $SNAPSHOT_DISKS --vjump-hosts $VIRTUAL_JUMPHOSTS diff --git a/jjb/3rd_party_ci/download-netvirt-artifact.sh b/jjb/3rd_party_ci/download-netvirt-artifact.sh index 0a48e3aec..6aea01d2a 100755 --- a/jjb/3rd_party_ci/download-netvirt-artifact.sh +++ b/jjb/3rd_party_ci/download-netvirt-artifact.sh @@ -1,23 +1,30 @@ #!/bin/bash -set -e +set -o errexit +set -o nounset +set -o pipefail -# wipe the WORKSPACE -/bin/rm -rf $WORKSPACE/* +ODL_ZIP=distribution-karaf-0.6.0-SNAPSHOT.zip echo "Attempting to fetch the artifact location from ODL Jenkins" CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~master~$GERRIT_CHANGE_ID/detail" # due to limitation with the Jenkins Gerrit Trigger, we need to use Gerrit REST API to get the change details -ODL_JOB_URL=$(curl -s $CHANGE_DETAILS_URL | grep netvirt-patch-test-current-carbon | tail -1 | \ - sed 's/\\n//g' | awk '{print $6}') -NETVIRT_ARTIFACT_URL="${ODL_JOB_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/0.6.0-SNAPSHOT/distribution-karaf-0.6.0-SNAPSHOT.tar.gz" +ODL_BUILD_JOB_NUM=$(curl -s $CHANGE_DETAILS_URL | grep -Eo 'netvirt-distribution-check-carbon/[0-9]+' | tail -1 | grep -Eo [0-9]+) + +NETVIRT_ARTIFACT_URL="https://jenkins.opendaylight.org/releng/job/netvirt-distribution-check-carbon/${ODL_BUILD_JOB_NUM}/artifact/${ODL_ZIP}" echo -e "URL to artifact is\n\t$NETVIRT_ARTIFACT_URL" echo "Downloading the artifact. This could take time..." -wget -q -O $NETVIRT_ARTIFACT $NETVIRT_ARTIFACT_URL +wget -q -O $ODL_ZIP $NETVIRT_ARTIFACT_URL if [[ $? -ne 0 ]]; then echo "The artifact does not exist! Probably removed due to ODL Jenkins artifact retention policy." echo "Rerun netvirt-patch-test-current-carbon to get artifact rebuilt." exit 1 fi + +#TODO(trozet) remove this once odl-pipeline accepts zip files +echo "Converting artifact zip to tar.gz" +unzip $ODL_ZIP +tar czf /tmp/${NETVIRT_ARTIFACT} $(echo $ODL_ZIP | sed -n 's/\.zip//p') + echo "Download complete" -ls -al $NETVIRT_ARTIFACT +ls -al /tmp/${NETVIRT_ARTIFACT} diff --git a/jjb/3rd_party_ci/functest-netvirt.sh b/jjb/3rd_party_ci/functest-netvirt.sh deleted file mode 100755 index adffaf42d..000000000 --- a/jjb/3rd_party_ci/functest-netvirt.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -# wipe the WORKSPACE -/bin/rm -rf $WORKSPACE/* - -echo "Hello World" diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh index 96c4b9634..ed1a12bc8 100755 --- a/jjb/3rd_party_ci/install-netvirt.sh +++ b/jjb/3rd_party_ci/install-netvirt.sh @@ -1,8 +1,33 @@ #!/bin/bash -set -e +set -o errexit +set -o nounset +set -o pipefail + +SNAP_CACHE=$HOME/snap_cache # clone opnfv sdnvpn repo git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn -. $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh -pushd $LIB -./odl_reinstaller.sh --cloner-info $CLONER_INFO --odl-artifact $NETVIRT_ARTIFACT -popd
\ No newline at end of file + +if [ ! -f "/tmp/${NETVIRT_ARTIFACT}" ]; then + echo "ERROR: /tmp/${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist" + exit 1 +fi + +if [ ! -f "${SNAP_CACHE}/node.yaml" ]; then + echo "ERROR: node.yaml pod config missing in ${SNAP_CACHE}" + exit 1 +fi + +if [ ! -f "${SNAP_CACHE}/id_rsa" ]; then + echo "ERROR: id_rsa ssh creds missing in ${SNAP_CACHE}" + exit 1 +fi + +# TODO (trozet) snapshot should have already been unpacked into cache folder +# but we really should check the cache here, and not use a single cache folder +# for when we support multiple jobs on a single slave +pushd sdnvpn/odl-pipeline/lib > /dev/null +# FIXME (trozet) remove this once permissions are fixed in sdnvpn repo +chmod +x odl_reinstaller.sh +./odl_reinstaller.sh --pod-config ${SNAP_CACHE}/node.yaml \ + --odl-artifact /tmp/${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa +popd > /dev/null diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index 3dd4c0b44..7a9998433 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -3,7 +3,7 @@ project: 'netvirt' - installer: 'apex' + installer: 'netvirt' ##################################### # branch definitions ##################################### @@ -17,13 +17,11 @@ ##################################### phase: - 'create-apex-vms': - slave-label: 'ericsson-virtual5' + slave-label: 'odl-netvirt-virtual-intel' - 'install-netvirt': - slave-label: 'odl-netvirt-virtual' - - 'functest': - slave-label: 'odl-netvirt-virtual' + slave-label: 'odl-netvirt-virtual-intel' - 'postprocess': - slave-label: 'odl-netvirt-virtual' + slave-label: 'odl-netvirt-virtual-intel' ##################################### # jobs ##################################### @@ -43,30 +41,38 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 5 max-per-node: 1 option: 'project' + scm: + - git: + url: https://gerrit.opnfv.org/gerrit/apex + branches: + - 'origin/master' + timeout: 15 + wipe-workspace: true + parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: NETVIRT_ARTIFACT - default: $WORKSPACE/distribution-karaf.tar.gz - - 'odl-netvirt-virtual-defaults' + default: distribution-karaf.tar.gz + - 'odl-netvirt-virtual-intel-defaults' triggers: - gerrit: server-name: 'git.opendaylight.org' trigger-on: - - comment-added-contains-event: - comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : SUCCESS' - - comment-added-contains-event: - comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : UNSTABLE' + # - comment-added-contains-event: + # comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : SUCCESS' + # - comment-added-contains-event: + # comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : UNSTABLE' - comment-added-contains-event: comment-contains-value: 'opnfv-test' projects: @@ -87,7 +93,7 @@ - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID @@ -95,7 +101,7 @@ GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT APEX_ENV_NUMBER=$APEX_ENV_NUMBER - node-parameters: false + node-parameters: true kill-phase-on: FAILURE abort-all-job: true - multijob: @@ -105,7 +111,7 @@ - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID @@ -121,8 +127,8 @@ projects: - name: 'functest-netvirt-virtual-suite-{stream}' predefined-parameters: | - FUNCTEST_SUITE_NAME=vping_userdata,bgpvpn - RC_FILE_PATH=/home/jenkins/cloner-info/overcloudrc + DEPLOY_SCENARIO=os-odl_l3-nofeature-ha + FUNCTEST_SUITE_NAME=healthcheck node-parameters: true kill-phase-on: FAILURE abort-all-job: false @@ -133,7 +139,7 @@ - name: 'odl-netvirt-verify-virtual-postprocess-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID @@ -142,7 +148,7 @@ NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT node-parameters: true kill-phase-on: FAILURE - abort-all-job: true + abort-all-job: false - job-template: name: 'odl-netvirt-verify-virtual-{phase}-{stream}' @@ -152,6 +158,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 5 @@ -160,26 +167,40 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'odl-netvirt-verify-virtual-install-.*' - - 'odl-netvirt-verify-virtual-functest-.*' + - 'odl-netvirt-verify-virtual-create-apex-vms-.*' + - 'odl-netvirt-verify-virtual-install-netvirt-.*' + - 'functest-netvirt-virtual-suite-.*' - 'odl-netvirt-verify-virtual-postprocess-.*' block-level: 'NODE' wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true + scm: + - git: + url: https://gerrit.opnfv.org/gerrit/apex + branches: + - 'origin/master' + timeout: 15 + wipe-workspace: true + parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-bgpvpn-noha' + description: 'Scenario to deploy and test' + - string: + name: GS_URL + default: artifacts.opnfv.org/apex + description: "URL to Google Storage with snapshot artifacts." builders: - description-setter: @@ -192,7 +213,7 @@ name: 'netvirt-verify-create-apex-vms-builder' builders: - shell: - !include-raw: ./create-apex-vms.sh + !include-raw: ../apex/apex-snapshot-deploy.sh - builder: name: 'netvirt-verify-install-netvirt-builder' builders: @@ -201,11 +222,6 @@ - shell: !include-raw: ./install-netvirt.sh - builder: - name: 'netvirt-verify-functest-builder' - builders: - - shell: - !include-raw: ./functest-netvirt.sh -- builder: name: 'netvirt-verify-postprocess-builder' builders: - shell: diff --git a/jjb/3rd_party_ci/postprocess-netvirt.sh b/jjb/3rd_party_ci/postprocess-netvirt.sh index adffaf42d..796514259 100755 --- a/jjb/3rd_party_ci/postprocess-netvirt.sh +++ b/jjb/3rd_party_ci/postprocess-netvirt.sh @@ -1,7 +1,11 @@ #!/bin/bash -set -e +set -o errexit +set -o nounset +set -o pipefail -# wipe the WORKSPACE -/bin/rm -rf $WORKSPACE/* - -echo "Hello World" +# clone opnfv sdnvpn repo +git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn +. $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh +pushd $LIB +./post_process.sh +popd diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index ee1dfb5d3..220d02435 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -12,6 +12,9 @@ echo if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER} export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" +elif echo $BUILD_TAG | grep "csit" 1> /dev/null; then + export OPNFV_ARTIFACT_VERSION=csit${BUILD_NUMBER} + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" elif [ "$ARTIFACT_VERSION" == "daily" ]; then export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 8d5c4cb13..b68225f15 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -15,7 +15,7 @@ if ! rpm -q wget > /dev/null; then sudo yum -y install wget fi -if [[ $BUILD_DIRECTORY == *verify* ]]; then +if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *csit* ]]; then # Build is from a verify, use local build artifacts (not RPMs) cd $WORKSPACE/../${BUILD_DIRECTORY} WORKSPACE=$(pwd) @@ -62,10 +62,25 @@ fi if [ -z "$DEPLOY_SCENARIO" ]; then echo "Deploy scenario not set!" exit 1 +elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then + echo "Detecting Gating scenario..." + if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then + echo "ERROR: Gate job triggered without comment!" + exit 1 + else + DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$') + if [ -z "$DEPLOY_SCENARIO" ]; then + echo "ERROR: Unable to detect scenario in Gerrit Comment!" + echo "Format of comment to trigger gate should be 'start-gate-scenario: <scenario>'" + exit 1 + else + echo "Gate scenario detected: ${DEPLOY_SCENARIO}" + fi + fi fi -# use local build for verify -if [[ "$BUILD_DIRECTORY" == *verify* ]]; then +# use local build for verify and csit promote +if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *csit* ]]; then if [ ! -e "${WORKSPACE}/build/lib" ]; then ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib fi @@ -144,7 +159,7 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then else clean_opts='' fi - if [[ "$BUILD_DIRECTORY" == *verify* ]]; then + if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *csit* ]]; then sudo CONFIG=${CONFIG} LIB=${LIB} ./clean.sh ${clean_opts} else sudo CONFIG=${CONFIG} LIB=${LIB} opnfv-clean ${clean_opts} @@ -172,6 +187,9 @@ if [[ "$JOB_NAME" == *virtual* ]]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml" fi DEPLOY_CMD="${DEPLOY_CMD} -v" + if [[ "$JOB_NAME" == *csit* ]]; then + DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml --virtual-computes 2" + fi else # settings for bare metal deployment if [ "$IPV6_FLAG" == "True" ]; then @@ -200,6 +218,16 @@ fi # start deployment sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug +if [[ "$JOB_NAME" == *csit* ]]; then + echo "CSIT job: setting host route for floating ip routing" + # csit route to allow docker container to reach floating ips + UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo "[0-9\.]+{3}[0-9]+") + if sudo route | grep 192.168.37.128 > /dev/null; then + sudo route del -net 192.168.37.128 netmask 255.255.255.128 + fi + sudo route add -net 192.168.37.128 netmask 255.255.255.128 gw ${UNDERCLOUD} +fi + echo echo "--------------------------------------------------------" echo "Done!" diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh new file mode 100644 index 000000000..f146dd810 --- /dev/null +++ b/jjb/apex/apex-snapshot-create.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +############################################################################## +# Copyright (c) 2016 Tim Rozet (Red Hat) 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 + +SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error) + +echo "Creating Apex snapshot..." +echo "-------------------------" +echo + +# create tmp directory +tmp_dir=$(pwd)/.tmp +mkdir -p ${tmp_dir} + +# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these +pushd ${tmp_dir} > /dev/null +echo "Copying overcloudrc and ssh key from Undercloud..." +# Store overcloudrc +UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') +sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./ +# Copy out ssh key of stack from undercloud +sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./ +popd > /dev/null + +echo "Gathering introspection information" +git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git +pushd sdnvpn/odl-pipeline/lib > /dev/null +sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml +popd > /dev/null +sudo rm -rf sdnvpn + +echo "Shutting down nodes" +# Shut down nodes +nodes=$(sudo virsh list | grep -Eo "baremetal[0-9]") +for node in $nodes; do + sudo virsh shutdown ${node} --mode acpi +done + +for node in $nodes; do + count=0 + while [ "$count" -lt 10 ]; do + sleep 10 + if sudo virsh list | grep ${node}; then + echo "Waiting for $node to shutdown, try $count" + else + break + fi + count=$((count+1)) + done + + if [ "$count" -ge 10 ]; then + echo "Node $node failed to shutdown" + exit 1 + fi +done + +pushd ${tmp_dir} > /dev/null +echo "Gathering virsh definitions" +# copy qcow2s, virsh definitions +for node in $nodes; do + sudo cp -f /var/lib/libvirt/images/${node}.qcow2 ./ + sudo virsh dumpxml ${node} > ${node}.xml +done + +# copy virsh net definitions +for net in admin api external storage tenant; do + sudo virsh net-dumpxml ${net} > ${net}.xml +done + +sudo chown jenkins-ci:jenkins-ci * + +# tar up artifacts +DATE=`date +%Y-%m-%d` +tar czf ../apex-csit-snap-${DATE}.tar.gz . +popd > /dev/null +sudo rm -rf ${tmp_dir} +echo "Snapshot saved as apex-csit-snap-${DATE}.tar.gz" + +# update opnfv properties file +curl -O -L http://$GS_URL/snapshot.properties +sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties +snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1) +sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties +echo "OPNFV_SNAP_URL=$GS_URL/apex-csit-snap-${DATE}.tar.gz" +echo "OPNFV_SNAP_SHA512SUM=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)" +echo "Updated properties file: " +cat snapshot.properties diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh new file mode 100644 index 000000000..773edd228 --- /dev/null +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash +############################################################################## +# Copyright (c) 2016 Tim Rozet (Red Hat) 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 + +SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error) +SNAP_CACHE=$HOME/snap_cache + + +echo "Deploying Apex snapshot..." +echo "--------------------------" +echo + +echo "Cleaning server" +pushd ci > /dev/null +sudo CONFIG=../build/ LIB=../lib ./clean.sh +popd > /dev/null + +echo "Downloading latest snapshot properties file" +if ! wget -O $WORKSPACE/opnfv.properties http://$GS_URL/snapshot.properties; then + echo "ERROR: Unable to find snapshot.properties at ${GS_URL}...exiting" + exit 1 +fi + +# find latest check sum +latest_snap_checksum=$(cat opnfv.properties | grep OPNFV_SNAP_SHA512SUM | awk -F "=" '{print $2}') +if [ -z "$latest_snap_checksum" ]; then + echo "ERROR: checksum of latest snapshot from snapshot.properties is null!" + exit 1 +fi + +local_snap_checksum="" + +# check snap cache directory exists +# if snapshot cache exists, find the checksum +if [ -d "$SNAP_CACHE" ]; then + latest_snap=$(ls ${SNAP_CACHE} | grep tar.gz | tail -n 1) + if [ -n "$latest_snap" ]; then + local_snap_checksum=$(sha512sum ${SNAP_CACHE}/${latest_snap} | cut -d' ' -f1) + fi +else + mkdir -p ${SNAP_CACHE} +fi + +# compare check sum and download latest snap if not up to date +if [ "$local_snap_checksum" != "$latest_snap_checksum" ]; then + snap_url=$(cat opnfv.properties | grep OPNFV_SNAP_URL | awk -F "=" '{print $2}') + if [ -z "$snap_url" ]; then + echo "ERROR: Snap URL from snapshot.properties is null!" + exit 1 + fi + echo "INFO: SHA mismatch, will download latest snapshot" + # wipe cache + rm -rf ${SNAP_CACHE}/* + wget --directory-prefix=${SNAP_CACHE}/ ${snap_url} + snap_tar=$(basename ${snap_url}) +else + snap_tar=${latest_snap} +fi + +echo "INFO: Snapshot to be used is ${snap_tar}" + +# move to snap cache dir and unpack +pushd ${SNAP_CACHE} > /dev/null +tar xvf ${snap_tar} + +# create each network +virsh_networks=$(ls *.xml | grep -v baremetal) + +if [ -z "$virsh_networks" ]; then + echo "ERROR: no virsh networks found in snapshot unpack" + exit 1 +fi + +for network_def in ${virsh_networks}; do + sudo virsh net-create ${network_def} + network=$(echo ${network_def} | awk -F '.' '{print $1}') + if ! sudo virsh net-list | grep ${network}; then + sudo virsh net-start ${network} + fi + echo "Checking if OVS bridge is missing for network: ${network}" + if ! sudo ovs-vsctl show | grep "br-${network}"; then + sudo ovs-vsctl add-br br-${network} + echo "OVS Bridge created: br-${network}" + if [ "br-${network}" == 'br-admin' ]; then + echo "Configuring IP 192.0.2.99 on br-admin" + sudo ip addr add 192.0.2.99/24 dev br-admin + sudo ip link set up dev br-admin + elif [ "br-${network}" == 'br-external' ]; then + echo "Configuring IP 192.168.37.99 on br-external" + sudo ip addr add 192.168.37.99/24 dev br-external + sudo ip link set up dev br-external + fi + fi +done + +echo "Virsh networks up: $(sudo virsh net-list)" +echo "Bringing up Overcloud VMs..." +virsh_vm_defs=$(ls baremetal*.xml) + +if [ -z "$virsh_vm_defs" ]; then + echo "ERROR: no virsh VMs found in snapshot unpack" + exit 1 +fi + +for node_def in ${virsh_vm_defs}; do + sudo virsh define ${node_def} + node=$(echo ${node_def} | awk -F '.' '{print $1}') + sudo cp -f ${node}.qcow2 /var/lib/libvirt/images/ + sudo virsh start ${node} + echo "Node: ${node} started" +done + +echo "Checking overcloudrc" +if ! stat overcloudrc; then + echo "ERROR: overcloudrc does not exist in snap unpack" + exit 1 +fi + +# copy overcloudrc for functest +mkdir -p $HOME/cloner-info +cp -f overcloudrc $HOME/cloner-info/ + +admin_controller_ip=$(cat overcloudrc | grep -Eo "192.0.2.[0-9]+") +netvirt_url="http://${admin_controller_ip}:8081/restconf/operational/network-topology:network-topology/topology/netvirt:1" + +source overcloudrc +counter=1 +while [ "$counter" -le 10 ]; do + if curl --fail --silent ${admin_controller_ip}:80 > /dev/null; then + echo "Overcloud Horizon is up...Checking if OpenDaylight NetVirt is up..." + if curl --fail --silent -u admin:admin ${netvirt_url} > /dev/null; then + echo "OpenDaylight is up. Overcloud deployment complete" + exit 0 + else + echo "OpenDaylight not yet up, try ${counter}" + fi + else + echo "Horizon/Apache not yet up, try ${counter}" + fi + counter=$((counter+1)) + sleep 60 +done + +echo "ERROR: Deployment not up after 10 minutes...exiting." +exit 1 diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 64f13f4e6..ef8ad5329 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -73,7 +73,17 @@ gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log } -if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then +uploadsnap () { + # Uploads snapshot artifact and updated properties file + echo "Uploading snapshot artifacts" + gsutil cp $WORKSPACE/apex-csit-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log + gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log + echo "Upload complete for Snapshot" +} + +if echo $WORKSPACE | grep csit > /dev/null; then + uploadsnap +elif gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then echo "Signing Key avaliable" signiso uploadiso diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index d8784c678..e3f0f53bc 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -2,6 +2,7 @@ name: apex jobs: - 'apex-verify-{stream}' + - 'apex-verify-gate-{stream}' - 'apex-verify-unit-tests-{stream}' - 'apex-runner-{platform}-{scenario}-{stream}' - 'apex-runner-cperf-{stream}' @@ -9,6 +10,10 @@ - 'apex-deploy-virtual-{scenario}-{stream}' - 'apex-deploy-baremetal-{scenario}-{stream}' - 'apex-daily-{stream}' + - 'apex-daily-colorado' + - 'apex-build-colorado' + - 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' + - 'apex-csit-promote-daily-{stream}' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) @@ -28,12 +33,20 @@ - 'os-nosdn-nofeature-ha-ipv6' - 'os-nosdn-ovs-noha' - 'os-nosdn-fdio-noha' - - 'os-odl_l3-bgpvpn-ha' - - 'os-odl_l2-fdio-noha' + - 'os-nosdn-fdio-ha' - 'os-odl_l2-fdio-ha' + - 'os-odl_l2-netvirt_gbp_fdio-noha' - 'os-odl_l2-sfc-noha' - 'os-odl_l3-nofeature-ha' + - 'os-odl-bgpvpn-ha' + - 'os-odl-gluon-noha' + - 'os-odl_l3-fdio-noha' + - 'os-odl_l3-fdio-ha' + - 'os-odl_l3-fdio_dvr-noha' + - 'os-odl_l3-fdio_dvr-ha' + - 'os-odl_l3-csit-noha' - 'os-onos-nofeature-ha' + - 'gate' platform: - 'baremetal' @@ -52,7 +65,6 @@ gs-pathname: '{gs-pathname}' - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: GIT_BASE @@ -60,10 +72,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -88,6 +97,7 @@ - compare-type: ANT pattern: 'tests/**' properties: + - logrotate-default - throttle: max-per-node: 1 max-total: 10 @@ -109,7 +119,6 @@ gs-pathname: '{gs-pathname}' - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: GIT_BASE @@ -117,10 +126,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -152,6 +158,7 @@ pattern: 'config/**' properties: + - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' @@ -201,6 +208,86 @@ same-node: true - 'apex-workspace-cleanup' +# Verify Scenario Gate +- job-template: + name: 'apex-verify-gate-{stream}' + + node: '{verify-slave}' + + concurrent: true + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*' + projects: + - project-compare-type: 'ANT' + project-pattern: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + - 'apex-verify.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-build' + - trigger-builds: + - project: 'apex-deploy-virtual-gate-{stream}' + predefined-parameters: | + BUILD_DIRECTORY=apex-verify-gate-{stream} + OPNFV_CLEAN=yes + current-parameters: true + git-revision: false + block: true + same-node: true + - trigger-builds: + - project: 'functest-apex-{verify-slave}-suite-{stream}' + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-ha + FUNCTEST_SUITE_NAME=healthcheck + block: true + same-node: true + - 'apex-workspace-cleanup' + - job-template: name: 'apex-runner-{platform}-{scenario}-{stream}' @@ -215,7 +302,6 @@ gs-pathname: '{gs-pathname}' - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: GIT_BASE @@ -223,17 +309,16 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm properties: + - logrotate-default - build-blocker: use-build-blocker: true blocking-jobs: - 'apex-daily.*' - 'apex-verify.*' + - 'apex-csit.*' builders: - trigger-builds: @@ -275,7 +360,6 @@ gs-pathname: '{gs-pathname}' - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: GIT_BASE @@ -283,12 +367,10 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm properties: + - logrotate-default - build-blocker: use-build-blocker: false block-level: 'NODE' @@ -301,7 +383,7 @@ builders: - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream}' + - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream}' predefined-parameters: OPNFV_CLEAN=yes git-revision: false @@ -310,7 +392,7 @@ - trigger-builds: - project: 'cperf-apex-intel-pod2-daily-{stream}' predefined-parameters: - DEPLOY_SCENARIO=os-odl_l2-nofeature-ha + DEPLOY_SCENARIO=os-odl_l3-nofeature-ha block: true same-node: true @@ -331,22 +413,19 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - - gerrit-parameter: - branch: '{branch}' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: "Used for overriding the GIT URL coming from parameters macro." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm properties: + - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' @@ -384,14 +463,12 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - string: @@ -404,6 +481,7 @@ description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" properties: + - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' @@ -431,14 +509,12 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - string: @@ -447,6 +523,7 @@ description: "Scenario to deploy with." properties: + - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' @@ -474,18 +551,17 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' properties: + - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' @@ -494,6 +570,7 @@ - 'apex-deploy.*' - 'apex-build.*' - 'apex-runner.*' + - 'apex-csit.*' triggers: - 'apex-{stream}' @@ -565,6 +642,247 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'apex-deploy-baremetal-os-odl-bgpvpn-ha-{stream}' + predefined-parameters: | + BUILD_DIRECTORY=apex-build-{stream}/.build + OPNFV_CLEAN=yes + git-revision: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + block: true + - trigger-builds: + - project: 'functest-apex-{daily-slave}-daily-{stream}' + predefined-parameters: + DEPLOY_SCENARIO=os-odl-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'yardstick-apex-{slave}-daily-{stream}' + predefined-parameters: + DEPLOY_SCENARIO=os-odl-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' +# Colorado Build +- job-template: + name: 'apex-build-colorado' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-daily-colorado' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: 'stable/colorado' + - apex-parameter: + gs-pathname: '/colorado' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-build' + - 'apex-upload-artifact' + + +# Colorado FDIO Deploy +- job-template: + name: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' + + # Job template for baremetal deployment + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'lf-pod1' + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: 'stable/colorado' + - apex-parameter: + gs-pathname: '/colorado' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-fdio-ha' + description: "Scenario to deploy with." + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + + + builders: + - 'apex-deploy' + - 'apex-workspace-cleanup' + +# Colorado FDIO Daily +- job-template: + name: 'apex-daily-colorado' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-daily-colorado' + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: 'stable/colorado' + - apex-parameter: + gs-pathname: '/colorado' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + + triggers: + - 'apex-colorado' + + builders: + - trigger-builds: + - project: 'apex-build-colorado' + git-revision: true + current-parameters: true + same-node: true + block: true + - trigger-builds: + - project: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' + predefined-parameters: | + BUILD_DIRECTORY=apex-build-colorado/.build + OPNFV_CLEAN=yes + git-revision: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + block: true + - trigger-builds: + - project: 'functest-apex-apex-daily-colorado-daily-colorado' + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-fdio-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + +# CSIT promote +- job-template: + name: 'apex-csit-promote-daily-{stream}' + + # Job template for promoting CSIT Snapshots + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{daily-slave}' + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + - 'apex-daily.*' + + triggers: + - timed: '0 12 * * 0' + + builders: + - 'apex-build' + - trigger-builds: + - project: 'apex-deploy-virtual-os-odl_l3-csit-noha-{stream}' + predefined-parameters: | + BUILD_DIRECTORY=apex-csit-promote-daily-{stream} + OPNFV_CLEAN=yes + git-revision: false + block: true + same-node: true + - trigger-builds: + - project: 'functest-apex-{daily-slave}-suite-{stream}' + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + FUNCTEST_SUITE_NAME=tempest_smoke_serial + block: true + same-node: true + - shell: + !include-raw-escape: ./apex-snapshot-create.sh + - shell: + !include-raw-escape: ./apex-upload-artifact.sh - job-template: name: 'apex-gs-clean-{stream}' @@ -580,6 +898,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' @@ -673,6 +992,10 @@ triggers: - timed: '0 3 * * *' - trigger: + name: 'apex-colorado' + triggers: + - timed: '0 12 * * *' +- trigger: name: 'apex-gs-clean-{stream}' triggers: - timed: '0 2 * * *' diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 77718e181..4cb58d916 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -10,26 +10,28 @@ stream: master branch: '{stream}' gs-pathname: '' - colorado: &colorado - stream: colorado + disabled: false + danube: &danube + stream: danube branch: 'stable/{stream}' gs-pathname: '/{stream}' + disabled: true #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- # CI POD's #-------------------------------- -# colorado +# danube #-------------------------------- pod: - armband-baremetal: slave-label: armband-baremetal installer: fuel - <<: *colorado + <<: *danube - armband-virtual: slave-label: armband-virtual installer: fuel - <<: *colorado + <<: *danube #-------------------------------- # master #-------------------------------- @@ -44,16 +46,16 @@ #-------------------------------- # NONE-CI POD's #-------------------------------- -# colorado +# danube #-------------------------------- - arm-pod2: slave-label: arm-pod2 installer: fuel - <<: *colorado + <<: *danube - arm-pod3: slave-label: arm-pod3 installer: fuel - <<: *colorado + <<: *danube #-------------------------------- # master #-------------------------------- @@ -97,9 +99,12 @@ - job-template: name: '{installer}-{scenario}-{pod}-daily-{stream}' + disabled: '{obj:disabled}' + concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -121,6 +126,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -184,6 +190,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -199,6 +206,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -209,10 +217,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: @@ -257,23 +262,23 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 1' + - timed: '0 8 * * 1,3,5,7' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 2' + - timed: '0 16 * * 2,7' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 3' + - timed: '0 16 * * 1,4,6' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 4' + - timed: '0 8 * * 2,4,6' - trigger: name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 5' + - timed: '0 16 * * 3,5' - trigger: name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-master-trigger' triggers: @@ -284,34 +289,34 @@ - timed: '0 0 * * 7' #---------------------------------------------------------------------- -# Enea Armband CI Baremetal Triggers running against colorado branch +# Enea Armband CI Baremetal Triggers running against danube branch #---------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8 * * 1,3,5,7' + - timed: '0 0 * * 1' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 2,7' + - timed: '0 0 * * 2' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8 * * 2,4,6' + - timed: '0 0 * * 4' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 1,4,6' + - timed: '0 0 * * 3' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 3,5' + - timed: '0 0 * * 5' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-danube-trigger' triggers: - timed: '' #--------------------------------------------------------------- @@ -346,34 +351,34 @@ triggers: - timed: '0 2 * * 7' #-------------------------------------------------------------------- -# Enea Armband CI Virtual Triggers running against colorado branch +# Enea Armband CI Virtual Triggers running against danube branch #-------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-armband-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-virtual-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-armband-virtual-danube-trigger' triggers: - timed: '' #---------------------------------------------------------- @@ -408,34 +413,34 @@ triggers: - timed: '' #--------------------------------------------------------------- -# Enea Armband POD 2 Triggers running against colorado branch +# Enea Armband POD 2 Triggers running against danube branch #--------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-arm-pod2-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod2-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-arm-pod2-danube-trigger' triggers: - timed: '' #---------------------------------------------------------- @@ -470,33 +475,33 @@ triggers: - timed: '' #--------------------------------------------------------------- -# Enea Armband POD 3 Triggers running against colorado branch +# Enea Armband POD 3 Triggers running against danube branch #--------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-danube-trigger' triggers: - timed: '' diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh index 4df9acfd8..adabfcaeb 100755 --- a/jjb/armband/armband-deploy.sh +++ b/jjb/armband/armband-deploy.sh @@ -8,7 +8,6 @@ # 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 @@ -49,8 +48,8 @@ mkdir -p $TMPDIR cd $WORKSPACE if [[ $LAB_CONFIG_URL =~ ^(git|ssh):// ]]; then - echo "Cloning securedlab repo ${GIT_BRANCH##origin/}" - git clone --quiet --branch ${GIT_BRANCH##origin/} $LAB_CONFIG_URL lab-config + echo "Cloning securedlab repo $BRANCH" + git clone --quiet --branch $BRANCH $LAB_CONFIG_URL lab-config LAB_CONFIG_URL=file://${WORKSPACE}/lab-config # Source local_env if present, which contains POD-specific config @@ -73,7 +72,7 @@ FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" # Deploy Cache (to enable just create the deploy-cache subdir) # NOTE: Only available when ISO files are cached using ISOSTORE mechanism -DEPLOY_CACHE=${ISOSTORE:-/iso_mount/opnfv_ci}/${GIT_BRANCH##*/}/deploy-cache +DEPLOY_CACHE=${ISOSTORE:-/iso_mount/opnfv_ci}/${BRANCH##*/}/deploy-cache if [[ -d "${DEPLOY_CACHE}" ]]; then echo "Deploy cache dir present." echo "--------------------------------------------------------" diff --git a/jjb/armband/armband-download-artifact.sh b/jjb/armband/armband-download-artifact.sh index ed7897b8e..e2dd097b6 100755 --- a/jjb/armband/armband-download-artifact.sh +++ b/jjb/armband/armband-download-artifact.sh @@ -38,7 +38,7 @@ ISO_FILE=${WORKSPACE}/opnfv.iso # using ISOs for verify & merge jobs from local storage will be enabled later if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # check if we already have the ISO to avoid redownload - ISOSTORE=${ISOSTORE:-/iso_mount/opnfv_ci}/${GIT_BRANCH##*/} + ISOSTORE=${ISOSTORE:-/iso_mount/opnfv_ci}/${BRANCH##*/} if [[ -f "$ISOSTORE/$OPNFV_ARTIFACT" ]]; then echo "ISO exists locally. Skipping the download and using the file from ISO store" ln -s $ISOSTORE/$OPNFV_ARTIFACT ${ISO_FILE} diff --git a/jjb/armband/armband-project-jobs.yml b/jjb/armband/armband-project-jobs.yml index 4b2a7b50e..fd37c5af6 100644 --- a/jjb/armband/armband-project-jobs.yml +++ b/jjb/armband/armband-project-jobs.yml @@ -16,16 +16,21 @@ - master: branch: '{stream}' gs-pathname: '' - - colorado: + disabled: false + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' + disabled: true - job-template: name: 'armband-{installer}-build-daily-{stream}' + disabled: '{obj:disabled}' + concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 1 @@ -35,16 +40,14 @@ parameters: - project-parameter: project: '{project}' - - 'opnfv-build-arm-defaults' + branch: '{branch}' + - 'opnfv-build-enea-defaults' - '{installer}-defaults' - armband-project-parameter: gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - pollscm: diff --git a/jjb/armband/armband-verify-jobs.yml b/jjb/armband/armband-verify-jobs.yml index f99ed572c..3486718e4 100644 --- a/jjb/armband/armband-verify-jobs.yml +++ b/jjb/armband/armband-verify-jobs.yml @@ -12,7 +12,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -21,13 +21,13 @@ ##################################### phase: - 'basic': - slave-label: 'opnfv-build-arm' + slave-label: 'opnfv-build-enea' - 'build': - slave-label: 'opnfv-build-arm' + slave-label: 'opnfv-build-enea' - 'deploy-virtual': - slave-label: 'opnfv-build-arm' + slave-label: 'opnfv-build-enea' - 'smoke-test': - slave-label: 'opnfv-build-arm' + slave-label: 'opnfv-build-enea' ##################################### # jobs ##################################### @@ -47,21 +47,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -98,9 +94,8 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - - 'opnfv-build-arm-defaults' + - 'opnfv-build-enea-defaults' - 'armband-verify-defaults': gs-pathname: '{gs-pathname}' @@ -114,7 +109,7 @@ - name: 'armband-verify-basic-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -128,7 +123,7 @@ - name: 'armband-verify-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -142,7 +137,7 @@ - name: 'armband-verify-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -156,7 +151,7 @@ - name: 'armband-verify-smoke-test-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -172,6 +167,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 6 @@ -184,22 +180,16 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' diff --git a/jjb/armband/build.sh b/jjb/armband/build.sh index a058ca158..a71cf1112 100755 --- a/jjb/armband/build.sh +++ b/jjb/armband/build.sh @@ -96,6 +96,7 @@ ls -al $BUILD_DIRECTORY echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" + echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" ) > $WORKSPACE/opnfv.properties diff --git a/jjb/armband/upload-artifacts.sh b/jjb/armband/upload-artifacts.sh index 7059ac344..97987e2c5 100755 --- a/jjb/armband/upload-artifacts.sh +++ b/jjb/armband/upload-artifacts.sh @@ -28,7 +28,7 @@ if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # store ISO locally on NFS first ISOSTORE=${ISOSTORE:-/iso_mount/opnfv_ci} if [[ -d "$ISOSTORE" ]]; then - ISOSTORE=${ISOSTORE}/${GIT_BRANCH##*/} + ISOSTORE=${ISOSTORE}/${BRANCH##*/} mkdir -p $ISOSTORE # remove all but most recent 3 ISOs first to keep iso_mount clean & tidy diff --git a/jjb/availability/availability.yml b/jjb/availability/availability.yml index 485010def..9cb7f8899 100644 --- a/jjb/availability/availability.yml +++ b/jjb/availability/availability.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: 'false' - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: 'false' @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index c763f3001..6a17e1706 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -17,10 +17,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true - job-template: name: 'barometer-verify-{stream}' @@ -30,15 +30,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -80,6 +76,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 3 @@ -89,15 +86,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -121,8 +114,8 @@ pwd cd src ./install_build_deps.sh - sudo make clobber - sudo make + make clobber + make - job-template: name: 'barometer-daily-{stream}' @@ -134,6 +127,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 3 @@ -143,15 +137,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '@midnight' @@ -161,5 +151,5 @@ pwd cd src ./install_build_deps.sh - sudo make clobber - sudo make + make clobber + make diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml index 7f2e6bf8a..a9ccd6977 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml @@ -18,8 +18,8 @@ gs-packagepath: '/{suite}' #docker tag used for version control docker-tag: 'latest' - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' gs-pathname: '/{stream}' gs-packagepath: '/{stream}/{suite}' @@ -48,12 +48,12 @@ slave-label: compass-baremetal installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - virtual: slave-label: compass-virtual installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube #-------------------------------- # None-CI PODs @@ -62,7 +62,7 @@ # slave-label: '{pod}' # installer: joid # auto-trigger-name: 'daily-trigger-disabled' - # <<: *colorado + # <<: *danube # - orange-pod2: # slave-label: '{pod}' # installer: joid @@ -72,6 +72,7 @@ suite: - 'rubbos' - 'vstf' + - 'posca' jobs: - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}' @@ -95,6 +96,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' - 'bottlenecks-params-{slave-label}' @@ -119,10 +121,7 @@ description: "docker image tag used for version control" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'bottlenecks-env-cleanup' diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml index 27eb01afa..12ea31b13 100644 --- a/jjb/bottlenecks/bottlenecks-project-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml @@ -20,7 +20,7 @@ #This is used for different test suite dependent packages storage gs-packagepath: '/{suite}' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' gs-packagepath: '/{stream}/{suite}' @@ -29,6 +29,7 @@ suite: - 'rubbos' - 'vstf' + - 'posca' ################################ # job templates @@ -42,15 +43,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -83,15 +80,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -120,6 +113,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 1 @@ -129,15 +123,13 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - bottlenecks-parameter: gs-packagepath: '{gs-packagepath}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'bottlenecks-builder-upload-artifact' diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 0d97fef75..7258e89f4 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -10,10 +10,12 @@ stream: master branch: '{stream}' gs-pathname: '' -# colorado: &colorado -# stream: colorado -# branch: 'stable/{stream}' -# gs-pathname: '/{stream}' + disabled: false + danube: &danube + stream: danube + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- @@ -22,25 +24,25 @@ pod: - baremetal: slave-label: compass-baremetal - os-version: 'trusty' + os-version: 'xenial' <<: *master - virtual: slave-label: compass-virtual - os-version: 'trusty' + os-version: 'xenial' <<: *master -# - baremetal: -# slave-label: compass-baremetal -# os-version: 'trusty' -# <<: *colorado -# - virtual: -# slave-label: compass-virtual -# os-version: 'trusty' -# <<: *colorado + - baremetal: + slave-label: compass-baremetal + os-version: 'trusty' + <<: *danube + - virtual: + slave-label: compass-virtual + os-version: 'trusty' + <<: *danube #-------------------------------- # master #-------------------------------- - - huawei-pod5: - slave-label: '{pod}' + - baremetal-centos: + slave-label: 'intel-pod8' os-version: 'centos7' <<: *master @@ -80,9 +82,12 @@ - job-template: name: 'compass-{scenario}-{pod}-daily-{stream}' + disabled: '{obj:disabled}' + concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -102,6 +107,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - compass-ci-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' @@ -169,6 +175,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -190,6 +197,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - compass-ci-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' @@ -197,10 +205,7 @@ - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: @@ -215,12 +220,6 @@ - shell: !include-raw-escape: ./compass-deploy.sh - publishers: - - archive: - artifacts: 'ansible.log' - allow-empty: 'true' - fingerprint: true - ######################## # parameter macros ######################## @@ -238,43 +237,41 @@ - choice: name: COMPASS_OPENSTACK_VERSION choices: - - 'mitaka' - 'newton' - - 'liberty' ######################## # trigger macros ######################## - trigger: - name: 'compass-os-nosdn-nofeature-ha-huawei-pod5-master-trigger' + name: 'compass-os-nosdn-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '0 19 * * *' - trigger: - name: 'compass-os-odl_l2-nofeature-ha-huawei-pod5-master-trigger' + name: 'compass-os-odl_l2-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '0 23 * * *' - trigger: - name: 'compass-os-odl_l3-nofeature-ha-huawei-pod5-master-trigger' + name: 'compass-os-odl_l3-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '0 15 * * *' - trigger: - name: 'compass-os-onos-nofeature-ha-huawei-pod5-master-trigger' + name: 'compass-os-onos-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '0 7 * * *' - trigger: - name: 'compass-os-ocl-nofeature-ha-huawei-pod5-master-trigger' + name: 'compass-os-ocl-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '0 11 * * *' - trigger: - name: 'compass-os-onos-sfc-ha-huawei-pod5-master-trigger' + name: 'compass-os-onos-sfc-ha-baremetal-centos-master-trigger' triggers: - timed: '0 3 * * *' - trigger: - name: 'compass-os-odl_l2-moon-ha-huawei-pod5-master-trigger' + name: 'compass-os-odl_l2-moon-ha-baremetal-centos-master-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-nosdn-kvm-ha-huawei-pod5-master-trigger' + name: 'compass-os-nosdn-kvm-ha-baremetal-centos-master-trigger' triggers: - timed: '' @@ -312,35 +309,35 @@ - timed: '' - trigger: - name: 'compass-os-nosdn-nofeature-ha-baremetal-colorado-trigger' + name: 'compass-os-nosdn-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-odl_l2-nofeature-ha-baremetal-colorado-trigger' + name: 'compass-os-odl_l2-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-odl_l3-nofeature-ha-baremetal-colorado-trigger' + name: 'compass-os-odl_l3-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-onos-nofeature-ha-baremetal-colorado-trigger' + name: 'compass-os-onos-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-ocl-nofeature-ha-baremetal-colorado-trigger' + name: 'compass-os-ocl-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-onos-sfc-ha-baremetal-colorado-trigger' + name: 'compass-os-onos-sfc-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-odl_l2-moon-ha-baremetal-colorado-trigger' + name: 'compass-os-odl_l2-moon-ha-baremetal-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-nosdn-kvm-ha-baremetal-colorado-trigger' + name: 'compass-os-nosdn-kvm-ha-baremetal-danube-trigger' triggers: - timed: '' @@ -378,34 +375,34 @@ - timed: '' - trigger: - name: 'compass-os-nosdn-nofeature-ha-virtual-colorado-trigger' + name: 'compass-os-nosdn-nofeature-ha-virtual-danube-trigger' triggers: - timed: '0 21 * * *' - trigger: - name: 'compass-os-odl_l2-nofeature-ha-virtual-colorado-trigger' + name: 'compass-os-odl_l2-nofeature-ha-virtual-danube-trigger' triggers: - timed: '0 20 * * *' - trigger: - name: 'compass-os-odl_l3-nofeature-ha-virtual-colorado-trigger' + name: 'compass-os-odl_l3-nofeature-ha-virtual-danube-trigger' triggers: - timed: '0 19 * * *' - trigger: - name: 'compass-os-onos-nofeature-ha-virtual-colorado-trigger' + name: 'compass-os-onos-nofeature-ha-virtual-danube-trigger' triggers: - timed: '0 18 * * *' - trigger: - name: 'compass-os-ocl-nofeature-ha-virtual-colorado-trigger' + name: 'compass-os-ocl-nofeature-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-onos-sfc-ha-virtual-colorado-trigger' + name: 'compass-os-onos-sfc-ha-virtual-danube-trigger' triggers: - timed: '0 15 * * *' - trigger: - name: 'compass-os-odl_l2-moon-ha-virtual-colorado-trigger' + name: 'compass-os-odl_l2-moon-ha-virtual-danube-trigger' triggers: - timed: '0 14 * * *' - trigger: - name: 'compass-os-nosdn-kvm-ha-virtual-colorado-trigger' + name: 'compass-os-nosdn-kvm-ha-virtual-danube-trigger' triggers: - timed: '' diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index c8d6159a2..6696e4b3d 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -38,6 +38,10 @@ else export NETWORK_CONF_FILE=network.yml fi +if [[ "$NODE_NAME" =~ "intel-pod8" ]]; then + export OS_MGMT_NIC=em4 +fi + if [[ "$NODE_NAME" =~ "-virtual" ]]; then export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/${NETWORK_CONF_FILE} export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml @@ -61,7 +65,4 @@ echo echo "--------------------------------------------------------" echo "Done!" -ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null - exit $deploy_ret diff --git a/jjb/compass4nfv/compass-dovetail-jobs.yml b/jjb/compass4nfv/compass-dovetail-jobs.yml new file mode 100644 index 000000000..d49d0ec5f --- /dev/null +++ b/jjb/compass4nfv/compass-dovetail-jobs.yml @@ -0,0 +1,208 @@ +- project: + + name: 'compass-dovetail-jobs' + installer: 'compass' + project: 'compass4nfv' +#---------------------------------- +# BRANCH ANCHORS +#---------------------------------- + colorado: &colorado + stream: colorado + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + dovetail-branch: master +#------------------------------------ +# POD, INSTALLER, AND BRANCH MAPPING +#------------------------------------ +# CI PODs +#------------------------------------ + pod: + - baremetal: + slave-label: compass-baremetal + os-version: 'trusty' + <<: *colorado +#----------------------------------- +# scenarios +#----------------------------------- + scenario: + - 'os-nosdn-nofeature-ha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-weekly-{stream}-trigger' + + jobs: + - 'compass-{scenario}-{pod}-weekly-{stream}' + - 'compass-deploy-{pod}-weekly-{stream}' + +######################## +# job templates +######################## +- job-template: + name: 'compass-{scenario}-{pod}-weekly-{stream}' + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'compass-os-.*?-{pod}-daily-.*?' + - 'compass-os-.*?-{pod}-weekly-.*?' + block-level: 'NODE' + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + + triggers: + - '{auto-trigger-name}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - compass-dovetail-parameter: + installer: '{installer}' + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + - '{slave-label}-defaults' + - '{installer}-defaults' + + triggers: + - '{auto-trigger-name}' + + builders: + - description-setter: + description: "POD: $NODE_NAME" + - trigger-builds: + - project: 'compass-deploy-{pod}-weekly-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={scenario} + COMPASS_OS_VERSION={os-version} + same-node: true + block: true + - trigger-builds: + - project: 'dovetail-compass-{pod}-compliance_set-weekly-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'dovetail-compass-{pod}-debug-weekly-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'dovetail-compass-{pod}-proposed_tests-weekly-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + +- job-template: + name: 'compass-deploy-{pod}-weekly-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'compass-deploy-{pod}-daily-.*?' + - 'compass-deploy-{pod}-weekly-.*' + - 'compass-verify-deploy-.*?' + block-level: 'NODE' + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 120 + abort: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - compass-dovetail-parameter: + installer: '{installer}' + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults' + - '{installer}-defaults' + + scm: + - git-scm + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + + + builders: + - description-setter: + description: "POD: $NODE_NAME" + - shell: + !include-raw-escape: ./compass-download-artifact.sh + - shell: + !include-raw-escape: ./compass-deploy.sh + +######################## +# parameter macros +######################## +- parameter: + name: compass-dovetail-parameter + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "URL to Google Storage." + - choice: + name: COMPASS_OPENSTACK_VERSION + choices: + - 'mitaka' + +######################## +# trigger macros +######################## +- trigger: + name: 'compass-os-nosdn-nofeature-ha-baremetal-weekly-colorado-trigger' + triggers: + - timed: 'H H * * 0' + +- trigger: + name: 'dovetail-weekly-trigger' + triggers: + - timed: 'H H * * 0' diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml index 50ff072fb..ed0fee6c0 100644 --- a/jjb/compass4nfv/compass-project-jobs.yml +++ b/jjb/compass4nfv/compass-project-jobs.yml @@ -12,9 +12,11 @@ - master: branch: '{stream}' gs-pathname: '' - - colorado: + disabled: false + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' + disabled: true jobs: - 'compass-build-iso-{stream}' @@ -26,9 +28,12 @@ - job-template: name: 'compass-build-iso-{stream}' + disabled: '{obj:disabled}' + concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 1 @@ -38,6 +43,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - compass-project-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' @@ -45,10 +51,7 @@ - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H 8 * * *' @@ -66,11 +69,14 @@ description: "build ppa(using docker) in huawei lab" + disabled: '{obj:disabled}' + node: huawei-build concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 1 @@ -80,16 +86,14 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - compass-project-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' - '{node}-defaults' - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - shell: @@ -121,15 +125,4 @@ - string: name: PPA_CACHE default: "$WORKSPACE/work/repo/" - - choice: - name: COMPASS_OPENSTACK_VERSION - choices: - - 'mitaka' - - 'newton' - - 'liberty' - - choice: - name: COMPASS_OS_VERSION - choices: - - 'trusty' - - 'centos7' diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index 69cc958a8..d58138088 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -12,15 +12,15 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false distro: - - 'trusty': + - 'xenial': disabled: false - os-version: 'trusty' + os-version: 'xenial' openstack-os-version: '' - 'centos7': disabled: false @@ -51,6 +51,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -64,15 +65,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 120 fail: true @@ -107,7 +103,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'compass-virtual-defaults' - '{installer}-defaults' @@ -141,17 +136,24 @@ node-parameters: true kill-phase-on: FAILURE abort-all-job: true -# - multijob: -# name: smoke-test -# condition: SUCCESSFUL -# projects: -# - name: 'functest-compass-virtual-suite-{stream}' -# current-parameters: true -# predefined-parameters: -# FUNCTEST_SUITE_NAME=healthcheck -# node-parameters: true -# kill-phase-on: NEVER -# abort-all-job: true + - multijob: + name: smoke-test + condition: SUCCESSFUL + projects: + - name: 'functest-compass-virtual-suite-{stream}' + current-parameters: true + predefined-parameters: + FUNCTEST_SUITE_NAME=healthcheck + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + - name: 'functest-compass-virtual-suite-{stream}' + current-parameters: true + predefined-parameters: + FUNCTEST_SUITE_NAME=vping_ssh + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true - job-template: name: 'compass-verify-{phase}-{distro}-{stream}' @@ -161,6 +163,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -174,15 +177,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 120 fail: true @@ -192,11 +190,6 @@ description: "Built on $NODE_NAME" - '{project}-verify-{phase}-macro' - publishers: - - archive: - artifacts: 'ansible.log' - allow-empty: 'true' - fingerprint: true ##################################### # builder macros ##################################### @@ -242,11 +235,9 @@ - choice: name: COMPASS_OPENSTACK_VERSION choices: - - 'mitaka' - 'newton' - - 'liberty' - choice: name: COMPASS_OS_VERSION choices: - - 'trusty' + - 'xenial' - 'centos7' diff --git a/jjb/conductor/conductor.yml b/jjb/conductor/conductor.yml index 15a3b59e1..1d47624e1 100644 --- a/jjb/conductor/conductor.yml +++ b/jjb/conductor/conductor.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/copper/copper.yml b/jjb/copper/copper.yml index 19cd394f1..ea1af473c 100644 --- a/jjb/copper/copper.yml +++ b/jjb/copper/copper.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index d6c8601c6..125937e80 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -42,6 +42,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -57,6 +58,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{pod}-defaults' - '{installer}-defaults' - cperf-parameter: @@ -65,10 +67,7 @@ docker-tag: '{docker-tag}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'cperf-{testsuite}-builder' diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml new file mode 100644 index 000000000..156740980 --- /dev/null +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -0,0 +1,232 @@ +###################################################################### +# Add daily jobs, for buidoing, deploying and testing +# TODO: +# - [ ] Add yardstick and functest for test stage +# - [x] Use daisy-baremetal-defauls for choosing baremetal deployment +###################################################################### + +############################# +# Job configuration for daisy +############################# +- project: + name: daisy-project-jobs + + project: 'daisy' + + installer: 'daisy' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true + + phase: + - 'build': + slave-label: 'opnfv-build-centos' + - 'deploy': + slave-label: 'daisy-baremetal' + - 'test': + slave-label: 'opnfv-build-centos' + jobs: + - '{installer}-daily-{stream}' + - '{installer}-{phase}-daily-{stream}' + +######################## +# job templates +######################## +- job-template: + name: '{installer}-daily-{stream}' + + project-type: multijob + + disabled: false + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + + scm: + - git-scm + + triggers: + - timed: '0 H/8 * * *' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - 'daisy-defaults' + - '{installer}-project-parameter': + gs-pathname: '{gs-pathname}' + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: '{installer}-build-daily-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: '{installer}-deploy-daily-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: test + condition: SUCCESSFUL + projects: + - name: '{installer}-test-daily-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + + publishers: + - '{installer}-recipients' + +- job-template: + name: '{installer}-{phase}-daily-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 6 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-.*deploy-.*' + block-level: 'NODE' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'daisy-defaults' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + - 'daisy-defaults' + - '{slave-label}-defaults' + - '{installer}-project-parameter': + gs-pathname: '{gs-pathname}' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{installer}-{phase}-daily-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'daisy-build-daily-macro' + builders: + - shell: + !include-raw: ./daisy4nfv-basic.sh + - shell: + !include-raw: ./daisy4nfv-build.sh + - shell: + !include-raw: ./daisy4nfv-upload-artifact.sh + - shell: + !include-raw: ./daisy4nfv-workspace-cleanup.sh + +- builder: + name: 'daisy-deploy-daily-macro' + builders: + - shell: + !include-raw: ./daisy4nfv-download-artifact.sh + - shell: + !include-raw: ./daisy4nfv-deploy.sh + +- builder: + name: 'daisy-test-daily-macro' + builders: + - shell: | + #!/bin/bash + + echo "Not activated!" + +##################################### +# parameter macros +##################################### +- publisher: + name: 'daisy-recipients' + publishers: + - email: + recipients: hu.zhijiang@zte.com.cn lu.yao135@zte.com.cn zhou.ya@zte.com.cn yangyang1@zte.com.cn julienjut@gmail.com + +- parameter: + name: 'daisy-project-parameter' + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: CACHE_DIRECTORY + default: $HOME/opnfv/cache/$INSTALLER_TYPE + description: "Directory where the cache to be used during the build is located." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." diff --git a/jjb/daisy4nfv/daisy4nfv-deploy.sh b/jjb/daisy4nfv/daisy4nfv-deploy.sh new file mode 100755 index 000000000..cc2c10388 --- /dev/null +++ b/jjb/daisy4nfv/daisy4nfv-deploy.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Daisy deployment WIP" diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 5964adb32..a6659b2bf 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -2,6 +2,14 @@ name: 'daisy4nfv-merge-jobs' project: 'daisy' + + installer: 'daisy' + +########################################################### +# use alias to keep the jobs'name existed already unchanged +########################################################### + alias: 'daisy4nfv' + ##################################### # branch definitions ##################################### @@ -10,31 +18,29 @@ branch: '{stream}' gs-pathname: '' disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true ##################################### # patch merge phases ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-centos' - 'build': slave-label: 'opnfv-build-centos' - 'deploy-virtual': slave-label: 'opnfv-build-centos' - - 'smoke-test': - slave-label: 'opnfv-build-centos' - - 'promote': - slave-label: 'opnfv-build-centos' ##################################### # jobs ##################################### jobs: - - 'daisy4nfv-merge-{stream}' - - 'daisy4nfv-merge-{phase}-{stream}' + - '{alias}-merge-{stream}' + - '{alias}-merge-{phase}-{stream}' ##################################### # job templates ##################################### - job-template: - name: 'daisy4nfv-merge-{stream}' + name: '{alias}-merge-{stream}' project-type: multijob @@ -43,21 +49,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -70,50 +72,44 @@ - comment-added-contains-event: comment-contains-value: 'remerge' projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'code/**' + - compare-type: ANT + pattern: 'deploy/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: '.gitignore' readable-message: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - - 'opnfv-build-defaults' - - 'daisy4nfv-merge-defaults': + - 'opnfv-build-centos-defaults' + - '{alias}-merge-defaults': gs-pathname: '{gs-pathname}' builders: - description-setter: description: "Built on $NODE_NAME" - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-merge-basic-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: name: build condition: SUCCESSFUL projects: - - name: 'daisy4nfv-merge-build-{stream}' + - name: '{alias}-merge-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -124,38 +120,10 @@ name: deploy-virtual condition: SUCCESSFUL projects: - - name: 'daisy4nfv-merge-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: smoke-test - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-merge-smoke-test-{stream}' + - name: '{alias}-merge-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: promote - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-merge-promote-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -164,34 +132,29 @@ abort-all-job: true - job-template: - name: 'daisy4nfv-merge-{phase}-{stream}' + name: '{alias}-merge-{phase}-{stream}' disabled: '{obj:disabled}' concurrent: true properties: + - logrotate-default - throttle: enabled: true - max-total: 6 + max-total: 4 option: 'project' - build-blocker: use-build-blocker: true blocking-jobs: - - 'daisy4nfv-merge-deploy-.*' - - 'daisy4nfv-merge-test-.*' + - '{alias}-merge-deploy-.*' block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -199,58 +162,41 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - - 'daisy4nfv-merge-defaults': + - '{alias}-merge-defaults': gs-pathname: '{gs-pathname}' builders: - description-setter: description: "Built on $NODE_NAME" - '{project}-merge-{phase}-macro' + ##################################### # builder macros ##################################### - builder: - name: 'daisy-merge-basic-macro' + name: 'daisy-merge-build-macro' builders: - shell: !include-raw: ./daisy4nfv-basic.sh - -- builder: - name: 'daisy-merge-build-macro' - builders: - shell: - !include-raw: - - ./daisy4nfv-build.sh - - ./daisy4nfv-upload-artifact.sh - - ./daisy4nfv-workspace-cleanup.sh + !include-raw: ./daisy4nfv-build.sh + - shell: + !include-raw: ./daisy4nfv-upload-artifact.sh + - shell: + !include-raw: ./daisy4nfv-workspace-cleanup.sh - builder: name: 'daisy-merge-deploy-virtual-macro' builders: - shell: - !include-raw: - - ./daisy4nfv-download-artifact.sh - - ./daisy4nfv-virtual-deploy.sh - - ./daisy4nfv-workspace-cleanup.sh - -- builder: - name: 'daisy-merge-smoke-test-macro' - builders: - - shell: | - #!/bin/bash - - echo "Not activated!" - -- builder: - name: 'daisy-merge-promote-macro' - builders: - - shell: | - #!/bin/bash + !include-raw: ./daisy4nfv-download-artifact.sh + - shell: + !include-raw: ./daisy4nfv-virtual-deploy.sh + - shell: + !include-raw: ./daisy4nfv-workspace-cleanup.sh - echo "Not activated!" ##################################### # parameter macros ##################################### diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index bd9f1b51e..ee82c14b2 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -2,6 +2,14 @@ name: 'daisy4nfv-verify-jobs' project: 'daisy' + + installer: 'daisy' + +########################################################## +# use alias to keep the jobs'name existed alread unchanged +########################################################## + alias: 'daisy4nfv' + ##################################### # branch definitions ##################################### @@ -10,29 +18,27 @@ branch: '{stream}' gs-pathname: '' disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true ##################################### # patch verification phases ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-centos' - 'build': slave-label: 'opnfv-build-centos' - - 'deploy-virtual': - slave-label: 'opnfv-build' - - 'smoke-test': - slave-label: 'opnfv-build' ##################################### # jobs ##################################### jobs: - - 'daisy4nfv-verify-{stream}' - - 'daisy4nfv-verify-{phase}-{stream}' + - '{alias}-verify-{stream}' + - '{alias}-verify-{phase}-{stream}' ##################################### # job templates ##################################### - job-template: - name: 'daisy4nfv-verify-{stream}' + name: '{alias}-verify-{stream}' project-type: multijob @@ -41,21 +47,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -74,78 +76,44 @@ - comment-added-contains-event: comment-contains-value: 'reverify' projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'code/**' + - compare-type: ANT + pattern: 'deploy/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: '.gitignore' readable-message: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - - 'opnfv-build-defaults' - - 'daisy4nfv-verify-defaults': + - 'opnfv-build-centos-defaults' + - '{alias}-verify-defaults': gs-pathname: '{gs-pathname}' builders: - description-setter: description: "Built on $NODE_NAME" - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-verify-basic-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: name: build condition: SUCCESSFUL projects: - - name: 'daisy4nfv-verify-build-{stream}' + - name: '{alias}-verify-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-verify-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: smoke-test - condition: SUCCESSFUL - projects: - - name: 'daisy4nfv-verify-smoke-test-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -154,13 +122,14 @@ abort-all-job: true - job-template: - name: 'daisy4nfv-verify-{phase}-{stream}' + name: '{alias}-verify-{phase}-{stream}' disabled: '{obj:disabled}' concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 6 @@ -168,20 +137,14 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'daisy4nfv-verify-deploy-.*' - - 'daisy4nfv-verify-test-.*' + - '{alias}-verify-deploy-.*' block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -189,44 +152,29 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - - 'daisy4nfv-verify-defaults': + - '{alias}-verify-defaults': gs-pathname: '{gs-pathname}' builders: - description-setter: description: "Built on $NODE_NAME" - '{project}-verify-{phase}-macro' + ##################################### # builder macros ##################################### - builder: - name: 'daisy-verify-basic-macro' + name: 'daisy-verify-build-macro' builders: - shell: !include-raw: ./daisy4nfv-basic.sh - -- builder: - name: 'daisy-verify-build-macro' - builders: - shell: !include-raw: ./daisy4nfv-build.sh - -- builder: - name: 'daisy-verify-deploy-virtual-macro' - builders: - shell: - !include-raw: ./daisy4nfv-virtual-deploy.sh - -- builder: - name: 'daisy-verify-smoke-test-macro' - builders: - - shell: | - #!/bin/bash + !include-raw: ./daisy4nfv-workspace-cleanup.sh - echo "Not activated!" ##################################### # parameter macros ##################################### diff --git a/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh b/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh index 4aa7b0bd5..ef4a07b8d 100755 --- a/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh +++ b/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh @@ -15,7 +15,7 @@ else exit 0 fi -./ci/deploy/deploy.sh ${DHA_CONF} ${NETWORK_CONF} +sudo ./ci/deploy/deploy.sh -d ${DHA_CONF} -n ${NETWORK_CONF} -p ${NODE_NAME:-"zte-virtual1"} if [ $? -ne 0 ]; then echo "depolyment failed!" diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index f9ee3de79..2333fca14 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -7,9 +7,9 @@ - master: branch: '{stream}' gs-pathname: '' - docker-tag: 'master' + docker-tag: 'latest' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' docker-tag: 'stable' @@ -19,14 +19,28 @@ - apex: slave-label: 'ool-virtual1' pod: 'ool-virtual1' + - fuel: + slave-label: 'ool-virtual2' + pod: 'ool-virtual2' + - joid: + slave-label: 'ool-virtual3' + pod: 'ool-virtual3' inspector: - 'sample' - 'congress' + task: + - verify: + profiler: 'none' + auto-trigger-name: 'doctor-verify' + - profiling: + profiler: 'poc' + auto-trigger-name: 'experimental' + jobs: - 'doctor-verify-{stream}' - - 'doctor-verify-{installer}-{inspector}-{stream}' + - 'doctor-{task}-{installer}-{inspector}-{stream}' - job-template: name: 'doctor-verify-{stream}' @@ -36,15 +50,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -73,24 +83,20 @@ - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" - job-template: - name: 'doctor-verify-{installer}-{inspector}-{stream}' + name: 'doctor-{task}-{installer}-{inspector}-{stream}' node: '{slave-label}' parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: OS_CREDS default: /home/jenkins/openstack.creds description: 'OpenStack credentials' - '{slave-label}-defaults' - - string: - name: INSTALLER_TYPE - default: '{installer}' - description: 'Installer used for deploying OPNFV on this POD' + - '{installer}-defaults' - string: name: DOCKER_TAG default: '{docker-tag}' @@ -109,7 +115,7 @@ default: '{project}' - string: name: TESTCASE_OPTIONS - default: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:/home/opnfv/repos/doctor' + default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -v $WORKSPACE:/home/opnfv/repos/doctor' description: 'Addtional parameters specific to test case(s)' # functest-parameter - string: @@ -130,12 +136,35 @@ description: "Show debug output information" scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: + - '{auto-trigger-name}': + project: '{project}' + branch: '{branch}' + + builders: + - 'clean-workspace-log' + - 'functest-suite-builder' + - shell: | + functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log" + to_be_archived="$WORKSPACE/tests/functest-{project}.log" + cp $functest_log $to_be_archived + # NOTE: checking the test result, as the previous job could return + # 0 regardless the result of doctor test scenario. + grep -e ' OK$' $functest_log || exit 1 + + publishers: + - archive: + artifacts: 'tests/*.log' + + +##################################### +# trigger macros +##################################### +- trigger: + name: 'doctor-verify' + triggers: - gerrit: server-name: 'gerrit.opnfv.org' trigger-on: @@ -162,17 +191,3 @@ failed: true unstable: true notbuilt: true - - builders: - - 'functest-suite-builder' - - shell: | - functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log" - to_be_archived="$WORKSPACE/tests/functest-{project}.log" - cp $functest_log $to_be_archived - # NOTE: checking the test result, as the previous job could return - # 0 regardless the result of doctor test scenario. - grep -e ' OK$' $functest_log || exit 1 - - publishers: - - archive: - artifacts: 'tests/*.log' diff --git a/jjb/domino/domino.yml b/jjb/domino/domino.yml index d34f8fadf..5fd9db3f1 100644 --- a/jjb/domino/domino.yml +++ b/jjb/domino/domino.yml @@ -11,7 +11,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -24,15 +24,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/dovetail/dovetail-artifacts-upload.sh b/jjb/dovetail/dovetail-artifacts-upload.sh new file mode 100755 index 000000000..b23decad1 --- /dev/null +++ b/jjb/dovetail/dovetail-artifacts-upload.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd 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 pipefail + +echo "dovetail: pull and save the images" + +[[ -d ${CACHE_DIR} ]] || mkdir -p ${CACHE_DIR} + +cd ${CACHE_DIR} +sudo docker pull ${DOCKER_REPO_NAME}:${DOCKER_TAG} +sudo docker save -o ${STORE_FILE_NAME} ${DOCKER_REPO_NAME}:${DOCKER_TAG} +sudo chmod og+rw ${STORE_FILE_NAME} + +OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") +GS_UPLOAD_LOCATION="${STORE_URL}/${OPNFV_ARTIFACT_VERSION}" +( + echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" + echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" + echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" + echo "OPNFV_ARTIFACT_URL=$GS_UPLOAD_LOCATION" + echo "OPNFV_BUILD_URL=$BUILD_URL" +) > $WORKSPACE/opnfv.properties +source $WORKSPACE/opnfv.properties + +importkey () { +# clone releng repository +echo "Cloning releng repository..." +[ -d releng ] && rm -rf releng +git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null +#this is where we import the siging key +if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then + source $WORKSPACE/releng/utils/gpg_import_key.sh +fi +} + +sign () { +gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig ${CACHE_DIR}/${STORE_FILE_NAME} + +gsutil cp ${CACHE_DIR}/${STORE_FILE_NAME}.sig ${STORE_URL}/${STORE_FILE_NAME}.sig +echo "signature Upload Complete!" +} + +upload () { +# log info to console +echo "Uploading to artifact. This could take some time..." +echo + +cd $WORKSPACE +# upload artifact and additional files to google storage +gsutil cp ${CACHE_DIR}/${STORE_FILE_NAME} \ +${STORE_URL}/${STORE_FILE_NAME} > gsutil.dockerfile.log 2>&1 +gsutil cp $WORKSPACE/opnfv.properties \ +${STORE_URL}/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 +gsutil cp $WORKSPACE/opnfv.properties \ + ${STORE_URL}/latest.properties > gsutil.latest.log 2>&1 + +gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + ${STORE_URL}/latest.properties \ + ${STORE_URL}/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1 + +gsutil -m setmeta \ + -h "Cache-Control:private, max-age=0, no-transform" \ + ${STORE_URL}/${STORE_FILE_NAME} > /dev/null 2>&1 + +# disabled errexit due to gsutil setmeta complaints +# BadRequestException: 400 Invalid argument +# check if we uploaded the file successfully to see if things are fine +gsutil ls ${STORE_URL}/${STORE_FILE_NAME} > /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "Problem while uploading artifact!" + exit 1 +fi + +echo "dovetail: uploading Done!" +echo +echo "--------------------------------------------------------" +echo +} + +#importkey +#sign +upload diff --git a/jjb/dovetail/dovetail-artifacts-upload.yml b/jjb/dovetail/dovetail-artifacts-upload.yml new file mode 100644 index 000000000..3d9af5ed7 --- /dev/null +++ b/jjb/dovetail/dovetail-artifacts-upload.yml @@ -0,0 +1,130 @@ +############################################ +# dovetail upload artifacts job +############################################ +- project: + name: dovetail-artifacts-upload + + project: 'dovetail' + + jobs: + - 'dovetail-{image}-artifacts-upload-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + image: + - 'dovetail' + - 'functest' + - 'yardstick' + +############################################# +# job template +############################################# + +- job-template: + name: 'dovetail-{image}-artifacts-upload-{stream}' + + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - dovetail-parameter: + gs-pathname: '{gs-pathname}' + image: '{image}' + branch: '{branch}' + + scm: + - git-scm + + builders: + - 'dovetail-builder-artifacts-upload' + - 'dovetail-workspace-cleanup' + +#################### +# parameter macros +#################### +- parameter: + name: dovetail-parameter + parameters: + - string: + name: CACHE_DIR + default: $WORKSPACE/cache{gs-pathname} + description: "the cache to store packages downloaded" + - string: + name: STORE_URL + default: gs://artifacts.opnfv.org/dovetail{gs-pathname} + description: "LF artifacts url for storage of dovetail packages" + - string: + name: DOCKER_REPO_NAME + default: opnfv/{image} + description: "docker repo name" + - string: + name: DOCKER_TAG + default: latest + description: "docker image tag of which will be uploaded to artifacts" + - string: + name: STORE_FILE_NAME + default: image_{image}_{branch}_$BUILD_ID.docker + description: "stored file name" + +#################################### +#builders for dovetail project +#################################### +- builder: + name: dovetail-builder-artifacts-upload + builders: + - shell: + !include-raw: ./dovetail-artifacts-upload.sh + +- builder: + name: dovetail-workspace-cleanup + builders: + - shell: | + #!/bin/bash + set -o errexit + + echo "Dovetail: cleanup cache used for storage downloaded packages" + + /bin/rm -rf $CACHE_DIR + + # 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 diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 0c7dbe33a..e2a334d40 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -103,22 +103,22 @@ auto-trigger-name: 'daily-trigger-disabled' <<: *colorado #armband CI PODs - - armband_baremetal: + - armband-baremetal: slave-label: armband-baremetal SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *master - - armband_virtual: + - armband-virtual: slave-label: armband-virtual SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *master - - armband_baremetal: + - armband-baremetal: slave-label: armband-baremetal SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *colorado - - armband_virtual: + - armband-virtual: slave-label: armband-virtual SUT: fuel auto-trigger-name: 'daily-trigger-disabled' @@ -126,8 +126,8 @@ #-------------------------------- # None-CI PODs #-------------------------------- - - huawei-pod5: - slave-label: '{pod}' + - baremetal-centos: + slave-label: 'intel-pod8' SUT: compass auto-trigger-name: 'daily-trigger-disabled' <<: *master @@ -161,6 +161,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -179,6 +180,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{dovetail-branch}' - '{SUT}-defaults' - '{slave-label}-defaults' - string: @@ -202,10 +204,7 @@ description: "Directory where the dovetail repository is cloned" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{dovetail-branch}' + - git-scm builders: - description-setter: @@ -228,13 +227,6 @@ - shell: !include-raw: ./dovetail-run.sh - -- builder: - name: dovetail-fetch-os-creds - builders: - - shell: - !include-raw: ../../utils/fetch_os_creds.sh - - builder: name: dovetail-cleanup builders: diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh index f215278db..22b2ba2ce 100755 --- a/jjb/dovetail/dovetail-cleanup.sh +++ b/jjb/dovetail/dovetail-cleanup.sh @@ -2,14 +2,35 @@ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" -echo "Cleaning up docker containers/images..." -# Remove previous running containers if exist +#clean up dependent project docker images, which has no containers and image tag None +clean_images=(opnfv/functest opnfv/yardstick) +for clean_image in "${clean_images[@]}"; do + echo "Removing image $image_id, which has no containers and image tag is None" + dangling_images=($(docker images -f "dangling=true" | grep ${clean_image} | awk '{print $3}')) + if [[ -n ${dangling_images} ]]; then + for image_id in "${dangling_images[@]}"; do + docker rmi $image_id >${redirect} + done + fi +done + +echo "Remove containers with image dovetail:<None>..." +dangling_images=($(docker images -f "dangling=true" | grep opnfv/dovetail | awk '{print $3}')) +if [[ -n ${dangling_images} ]]; then + for image_id in "${dangling_images[@]}"; do + echo "Removing image $image_id with tag None and its related containers" + docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} + docker rmi $image_id >${redirect} + done +fi + +echo "Cleaning up dovetail docker containers/images..." if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then echo "Removing existing opnfv/dovetail containers..." docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >${redirect} fi -# Remove existing images if exist +echo "Remove dovetail existing images if exist..." if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then echo "Docker images to remove:" docker images | head -1 && docker images | grep opnfv/dovetail >${redirect} diff --git a/jjb/dovetail/dovetail-project-jobs.yml b/jjb/dovetail/dovetail-project-jobs.yml index 07106f609..9dc4808b4 100644 --- a/jjb/dovetail/dovetail-project-jobs.yml +++ b/jjb/dovetail/dovetail-project-jobs.yml @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -68,15 +64,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -99,25 +91,21 @@ #builders for dovetail project ############################### - builder: - name: dovetail-unit-tests + name: dovetail-hello-world builders: - shell: | #!/bin/bash set -o errexit - set -o pipefail - echo "Running unit tests..." - cd $WORKSPACE - virtualenv $WORKSPACE/dovetail_venv - source $WORKSPACE/dovetail_venv/bin/activate + echo "hello world" - #packages installation - easy_install -U setuptools - easy_install -U pip - pip install -r unittests/requirements.txt - pip install -e . - #unit tests - /bin/bash $WORKSPACE/unittests/unittest.sh +- builder: + name: dovetail-unit-tests + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail - deactivate + tox diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 4082c34fe..0a2f156cc 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -57,7 +57,7 @@ if [ -z ${container_id} ]; then docker ps -a exit 1 fi -echo "COntainer Start: docker start ${container_id}" +echo "Container Start: docker start ${container_id}" docker start ${container_id} sleep 5 docker ps >${redirect} @@ -66,9 +66,12 @@ if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi -exec_cmd="python ${DOVETAIL_REPO_DIR}/dovetail/run.py --testsuite ${TESTSUITE} -d true" -echo "Container exec command: ${exec_cmd}" -docker exec ${container_id} ${exec_cmd} +list_cmd="dovetail list ${TESTSUITE}" +run_cmd="dovetail run --testsuite ${TESTSUITE} -d true" +echo "Container exec command: ${list_cmd}" +docker exec $container_id ${list_cmd} +echo "Container exec command: ${run_cmd}" +docker exec $container_id ${run_cmd} sudo cp -r ${DOVETAIL_REPO_DIR}/results ./ #To make sure the file owner is jenkins, for the copied results files in the above line diff --git a/jjb/dovetail/dovetail-weekly-jobs.yml b/jjb/dovetail/dovetail-weekly-jobs.yml new file mode 100644 index 000000000..8edce4246 --- /dev/null +++ b/jjb/dovetail/dovetail-weekly-jobs.yml @@ -0,0 +1,135 @@ +- project: + name: dovetail-weekly-jobs + project: dovetail +#-------------------------------- +# BRANCH ANCHORS +#-------------------------------- + master: &master + stream: master + branch: '{stream}' + dovetail-branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' + colorado: &colorado + stream: colorado + branch: 'stable/{stream}' + dovetail-branch: master + gs-pathname: '/{stream}' + docker-tag: 'latest' + +#-------------------------------- +# POD, INSTALLER, AND BRANCH MAPPING +#-------------------------------- +# Installers using labels +# CI PODs +# This section should only contain the installers +# that have been switched using labels for slaves +#-------------------------------- + pod: +# - baremetal: +# slave-label: apex-baremetal +# sut: apex +# <<: *colorado + - baremetal: + slave-label: compass-baremetal + sut: compass + <<: *colorado +# - baremetal: +# slave-label: fuel-baremetal +# sut: fuel +# <<: *master +# - baremetal: +# slave-label: joid-baremetal +# sut: joid +# <<: *colorado + + testsuite: + - 'debug' + - 'proposed_tests' + - 'compliance_set' + + loop: + - 'weekly': + job-timeout: 60 + + jobs: + - 'dovetail-{sut}-{pod}-{testsuite}-{loop}-{stream}' + +################################ +# job template +################################ +- job-template: + name: 'dovetail-{sut}-{pod}-{testsuite}-{loop}-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + wrappers: + - build-name: + name: '$BUILD_NUMBER Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: '{job-timeout}' + abort: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{dovetail-branch}' + - '{sut}-defaults' + - '{slave-label}-defaults' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull dovetail docker image' + - string: + name: CI_DEBUG + default: 'true' + description: "Show debug output information" + - string: + name: TESTSUITE + default: '{testsuite}' + description: "dovetail testsuite to run" + - string: + name: DOVETAIL_REPO_DIR + default: "/home/opnfv/dovetail" + description: "Directory where the dovetail repository is cloned" + + scm: + - git-scm + + builders: + - description-setter: + description: "POD: $NODE_NAME" + - 'dovetail-cleanup' + - 'dovetail-run' + + publishers: + - archive: + artifacts: 'results/**/*' + allow-empty: true + fingerprint: true + +######################## +# builder macros +######################## +- builder: + name: dovetail-run-weekly + builders: + - shell: + !include-raw: ./dovetail-run.sh +- builder: + name: dovetail-cleanup-weekly + builders: + - shell: + !include-raw: ./dovetail-cleanup.sh diff --git a/jjb/dpacc/dpacc.yml b/jjb/dpacc/dpacc.yml index bcad2a329..bc61d7447 100644 --- a/jjb/dpacc/dpacc.yml +++ b/jjb/dpacc/dpacc.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/escalator/escalator.yml b/jjb/escalator/escalator.yml index 11da789f0..2265dafce 100644 --- a/jjb/escalator/escalator.yml +++ b/jjb/escalator/escalator.yml @@ -39,21 +39,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -85,7 +81,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-defaults' - 'escalator-defaults': @@ -101,7 +96,7 @@ - name: 'escalator-verify-basic-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -115,7 +110,7 @@ - name: 'escalator-verify-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -131,15 +126,10 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -147,7 +137,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - 'escalator-defaults': @@ -168,21 +157,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -208,7 +193,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-defaults' - 'escalator-defaults': @@ -224,7 +208,7 @@ - name: 'escalator-merge-basic-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -238,7 +222,7 @@ - name: 'escalator-merge-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -254,15 +238,10 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -270,7 +249,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - 'escalator-defaults': diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 6c2d6f021..f78c4a317 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -15,10 +15,10 @@ branch: '{stream}' disabled: false gs-pathname: '' - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' - disabled: false + disabled: true gs-pathname: '/{stream}' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING @@ -34,10 +34,10 @@ <<: *master - baremetal: slave-label: fuel-baremetal - <<: *colorado + <<: *danube - virtual: slave-label: fuel-virtual - <<: *colorado + <<: *danube #-------------------------------- # None-CI PODs #-------------------------------- @@ -52,10 +52,10 @@ <<: *master - zte-pod1: slave-label: zte-pod1 - <<: *colorado + <<: *danube - zte-pod3: slave-label: zte-pod3 - <<: *colorado + <<: *danube #-------------------------------- # scenarios #-------------------------------- @@ -81,6 +81,10 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-kvm_ovs-ha': auto-trigger-name: 'daily-trigger-disabled' + - 'os-nosdn-kvm_ovs_dpdk-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-nosdn-kvm_ovs_dpdk_bar-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' # NOHA scenarios - 'os-nosdn-nofeature-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' @@ -100,6 +104,8 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-ovs-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-nosdn-kvm_ovs_dpdk-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' jobs: - 'fuel-{scenario}-{pod}-daily-{stream}' @@ -116,6 +122,7 @@ concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -137,6 +144,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -191,6 +199,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -206,6 +215,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -220,10 +230,7 @@ description: 'Deployment timeout in minutes' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: @@ -239,7 +246,7 @@ publishers: - email: - recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com peter.barabas@ericsson.com fzhadaev@mirantis.com + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com ######################## # parameter macros @@ -273,11 +280,15 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 23 * * *' + - timed: '5 23 * * *' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 2 * * *' + - timed: '5 2 * * *' +- trigger: + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-master-trigger' + triggers: + - timed: '5 5 * * *' - trigger: name: 'fuel-os-onos-sfc-ha-baremetal-daily-master-trigger' triggers: @@ -289,20 +300,23 @@ - trigger: name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 11 * * *' + - timed: '5 11 * * *' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 14 * * *' + - timed: '5 14 * * *' - trigger: name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 17 * * *' + - timed: '5 17 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-master-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 20 * * *' - + - timed: '30 12 * * *' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master-trigger' + triggers: + - timed: '30 8 * * *' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' @@ -340,82 +354,97 @@ name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-master-trigger' + triggers: + - timed: '30 16 * * *' #----------------------------------------------- -# Triggers for job running on fuel-baremetal against colorado branch +# Triggers for job running on fuel-baremetal against danube branch #----------------------------------------------- # HA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 20 * * *' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 23 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 2 * * *' - trigger: - name: 'fuel-os-onos-sfc-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 5 * * *' - trigger: - name: 'fuel-os-onos-nofeature-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 8 * * *' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 11 * * *' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 14 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 17 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-danube-trigger' triggers: - timed: '0 20 * * *' - +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-danube-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl_l2-nofeature-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-danube-trigger' triggers: - timed: '' #----------------------------------------------- @@ -457,6 +486,14 @@ name: 'fuel-os-nosdn-ovs-ha-virtual-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-master-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-master-trigger' @@ -473,11 +510,11 @@ - trigger: name: 'fuel-os-onos-sfc-noha-virtual-daily-master-trigger' triggers: - - timed: '35 20 * * *' + - timed: '' # '35 20 * * *' - trigger: name: 'fuel-os-onos-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: '5 23 * * *' + - timed: '' # '5 23 * * *' - trigger: name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-master-trigger' triggers: @@ -494,82 +531,98 @@ name: 'fuel-os-nosdn-ovs-noha-virtual-daily-master-trigger' triggers: - timed: '5 9 * * *' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master-trigger' + triggers: + - timed: '' #----------------------------------------------- -# Triggers for job running on fuel-virtual against colorado branch +# Triggers for job running on fuel-virtual against danube branch #----------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-ha-virtual-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-ha-virtual-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-danube-trigger' triggers: - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-danube-trigger' triggers: - timed: '0 13 * * *' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-virtual-daily-danube-trigger' triggers: - timed: '30 15 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-danube-trigger' triggers: - timed: '0 18 * * *' - trigger: - name: 'fuel-os-onos-sfc-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-noha-virtual-daily-danube-trigger' triggers: - timed: '30 20 * * *' - trigger: - name: 'fuel-os-onos-nofeature-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-noha-virtual-daily-danube-trigger' triggers: - timed: '0 23 * * *' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-danube-trigger' triggers: - timed: '30 1 * * *' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-noha-virtual-daily-danube-trigger' triggers: - timed: '0 4 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-noha-virtual-daily-danube-trigger' triggers: - timed: '30 6 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-noha-virtual-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-noha-virtual-daily-danube-trigger' triggers: - timed: '0 9 * * *' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-danube-trigger' + triggers: + - timed: '' #----------------------------------------------- # ZTE POD1 Triggers running against master branch #----------------------------------------------- @@ -609,6 +662,14 @@ name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-master-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-master-trigger' @@ -646,6 +707,10 @@ name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-master-trigger' + triggers: + - timed: '' #----------------------------------------------- # ZTE POD2 Triggers running against master branch @@ -686,6 +751,14 @@ name: 'fuel-os-nosdn-ovs-ha-zte-pod2-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod2-daily-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod2-daily-master-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-zte-pod2-daily-master-trigger' @@ -723,6 +796,10 @@ name: 'fuel-os-nosdn-ovs-noha-zte-pod2-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod2-daily-master-trigger' + triggers: + - timed: '' #----------------------------------------------- # ZTE POD3 Triggers running against master branch #----------------------------------------------- @@ -762,6 +839,14 @@ name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-master-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-master-trigger' @@ -799,232 +884,272 @@ name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-master-trigger' + triggers: + - timed: '' #----------------------------------------------- -# ZTE POD1 Triggers running against colorado branch +# ZTE POD1 Triggers running against danube branch #----------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '0 2 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-zte-pod1-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-danube-trigger' triggers: - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-danube-trigger' triggers: - timed: '' #----------------------------------------------- -# ZTE POD2 Triggers running against colorado branch +# ZTE POD2 Triggers running against danube branch #----------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod2-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl_l2-nofeature-ha-zte-pod2-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl_l3-nofeature-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod2-daily-danube-trigger' triggers: - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod2-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl_l2-nofeature-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod2-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod2-daily-danube-trigger' triggers: - timed: '' #----------------------------------------------- -# ZTE POD3 Triggers running against colorado branch +# ZTE POD3 Triggers running against danube branch #----------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '0 18 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-danube-trigger' triggers: - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl_l2-nofeature-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l2-sfc-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-colorado-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-danube-trigger' triggers: - timed: '' diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 48b1dac2f..4efccd611 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -57,9 +57,9 @@ chmod a+x $TMPDIR # clone the securedlab repo cd $WORKSPACE -echo "Cloning securedlab repo ${GIT_BRANCH##origin/}" +echo "Cloning securedlab repo $BRANCH" git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet \ - --branch ${GIT_BRANCH##origin/} + --branch $BRANCH # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh index 2a0f09a3f..8cc552e8d 100755 --- a/jjb/fuel/fuel-download-artifact.sh +++ b/jjb/fuel/fuel-download-artifact.sh @@ -36,7 +36,7 @@ echo "Using $OPNFV_ARTIFACT for deployment" # using ISOs for verify & merge jobs from local storage will be enabled later if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # check if we already have the ISO to avoid redownload - ISOSTORE="/iso_mount/opnfv_ci/${GIT_BRANCH##*/}" + ISOSTORE="/iso_mount/opnfv_ci/${BRANCH##*/}" if [[ -f "$ISOSTORE/$OPNFV_ARTIFACT" ]]; then echo "ISO exists locally. Skipping the download and using the file from ISO store" ln -s $ISOSTORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso diff --git a/jjb/fuel/fuel-plugin-build.sh b/jjb/fuel/fuel-plugin-build.sh deleted file mode 100755 index f7f613dc0..000000000 --- a/jjb/fuel/fuel-plugin-build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then - JOB_TYPE=${BASH_REMATCH[0]} -else - echo "Unable to determine job type!" - exit 1 -fi - -echo "Not activated!" diff --git a/jjb/fuel/fuel-plugin-test.sh b/jjb/fuel/fuel-plugin-test.sh deleted file mode 100755 index f7f613dc0..000000000 --- a/jjb/fuel/fuel-plugin-test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then - JOB_TYPE=${BASH_REMATCH[0]} -else - echo "Unable to determine job type!" - exit 1 -fi - -echo "Not activated!" diff --git a/jjb/fuel/fuel-plugin-verify-jobs.yml b/jjb/fuel/fuel-plugin-verify-jobs.yml deleted file mode 100644 index 4fea26b32..000000000 --- a/jjb/fuel/fuel-plugin-verify-jobs.yml +++ /dev/null @@ -1,240 +0,0 @@ -- project: - name: 'fuel-plugin-verify-jobs' - - project: 'fuel-plugin' - - installer: 'fuel' -##################################### -# branch definitions -##################################### - stream: - - master: - upstream-branch: '{stream}' - opnfv-branch: 'experimental' - gs-pathname: '' - disabled: false -##################################### -# patch verification phases -##################################### - phase: - - 'build': - slave-label: 'opnfv-build-ubuntu' - - 'test': - slave-label: 'opnfv-build-ubuntu' -##################################### -# jobs -##################################### - jobs: - - 'fuel-verify-plugin-{stream}' - - 'fuel-verify-plugin-{phase}-{stream}' -##################################### -# job templates -##################################### -- job-template: - name: 'fuel-verify-plugin-{stream}' - - project-type: multijob - - disabled: '{obj:disabled}' - - concurrent: true - - properties: - - throttle: - enabled: true - max-total: 4 - option: 'project' - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: '{upstream-branch}' - description: 'OpenStack branch to use' - - string: - name: OPNFV_BRANCH - default: '{opnfv-branch}' - description: 'OPNFV branch to use' - - 'opnfv-build-defaults' - - 'fuel-verify-plugin-defaults': - gs-pathname: '{gs-pathname}' - - scm: - - git: - url: 'https://git.openstack.org/$GERRIT_PROJECT' - refspec: '$GERRIT_REFSPEC' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: 'gerrit' - timeout: 10 - wipe-workspace: true - - wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' - - timeout: - timeout: 360 - fail: true - - triggers: - - gerrit: - server-name: 'review.openstack.org' - silent-start: false - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - escape-quotes: true - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'openstack/fuel-plugin-bgpvpn' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{upstream-branch}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'README.md|.gitignore|.gitreview' - - project-compare-type: 'PLAIN' - project-pattern: 'openstack/fuel-plugin-onos' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{upstream-branch}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'README.md|.gitignore|.gitreview' - readable-message: true - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-plugin-build-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: test - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-plugin-test-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - -- job-template: - name: 'fuel-verify-plugin-{phase}-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - properties: - - throttle: - enabled: true - max-total: 6 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-verify-plugin-test-.*' - block-level: 'NODE' - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: '{upstream-branch}' - description: 'OpenStack branch to use' - - string: - name: OPNFV_BRANCH - default: '{opnfv-branch}' - description: 'OPNFV branch to use' - - '{slave-label}-defaults' - - '{installer}-defaults' - - 'fuel-verify-plugin-defaults': - gs-pathname: '{gs-pathname}' - - scm: - - git: - url: 'https://git.openstack.org/$GERRIT_PROJECT' - refspec: '$GERRIT_REFSPEC' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: 'gerrit' - timeout: 10 - wipe-workspace: true - - wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' - - timeout: - timeout: 360 - fail: true - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'fuel-verify-plugin-{phase}-macro' -##################################### -# builder macros -##################################### -- builder: - name: 'fuel-verify-plugin-build-macro' - builders: - - shell: - !include-raw: ./fuel-plugin-build.sh - -- builder: - name: 'fuel-verify-plugin-test-macro' - builders: - - shell: - !include-raw: ./fuel-plugin-test.sh -##################################### -# parameter macros -##################################### -- parameter: - name: 'fuel-verify-plugin-defaults' - parameters: - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: CACHE_DIRECTORY - default: $HOME/opnfv/cache/$INSTALLER_TYPE - description: "Directory where the cache to be used during the build is located." - - string: - name: GS_URL - default: artifacts.opnfv.org/$PROJECT{gs-pathname} - description: "URL to Google Storage." diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index 2aa17abd5..32ad8907e 100644 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -13,10 +13,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true jobs: - 'fuel-build-daily-{stream}' @@ -35,6 +35,7 @@ concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 1 @@ -44,6 +45,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - '{installer}-defaults' - choice: @@ -56,10 +58,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '0 H/4 * * *' @@ -79,7 +78,7 @@ publishers: - email: - recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com fzhadaev@mirantis.com + recipients: fzhadaev@mirantis.com - job-template: name: 'fuel-merge-build-{stream}' @@ -91,7 +90,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - '{installer}-defaults' @@ -99,15 +97,10 @@ gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -152,6 +145,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 2 @@ -167,7 +161,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'fuel-virtual-defaults': installer: '{installer}' @@ -175,15 +168,10 @@ - fuel-project-parameter: gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper triggers: - gerrit: @@ -220,7 +208,7 @@ publishers: - email: - recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com fzhadaev@mirantis.com + recipients: fzhadaev@mirantis.com - job-template: name: 'fuel-deploy-generic-daily-{stream}' @@ -230,6 +218,7 @@ disabled: '{obj:disabled}' properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -244,6 +233,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - string: name: GIT_BASE @@ -265,10 +255,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: diff --git a/jjb/fuel/fuel-upload-artifact.sh b/jjb/fuel/fuel-upload-artifact.sh index ca4ba00b0..d1ac3509b 100755 --- a/jjb/fuel/fuel-upload-artifact.sh +++ b/jjb/fuel/fuel-upload-artifact.sh @@ -23,7 +23,7 @@ nfsstore () { # storing ISOs for verify & merge jobs will be done once we get the disk array if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # store ISO locally on NFS first - ISOSTORE="/iso_mount/opnfv_ci/${GIT_BRANCH##*/}" + ISOSTORE="/iso_mount/opnfv_ci/${BRANCH##*/}" if [[ -d "$ISOSTORE" ]]; then # remove all but most recent 5 ISOs first to keep iso_mount clean & tidy cd $ISOSTORE diff --git a/jjb/fuel/fuel-verify-jobs-experimental.yml b/jjb/fuel/fuel-verify-jobs-experimental.yml index cc16133f6..ae6458021 100644 --- a/jjb/fuel/fuel-verify-jobs-experimental.yml +++ b/jjb/fuel/fuel-verify-jobs-experimental.yml @@ -52,21 +52,17 @@ concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -105,7 +101,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-defaults' - 'fuel-verify-defaults-exp': @@ -121,7 +116,7 @@ - name: 'fuel-verify-basic-{stream-exp}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -135,7 +130,7 @@ - name: 'fuel-verify-build-{stream-exp}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -149,7 +144,7 @@ - name: 'fuel-verify-deploy-virtual-{stream-exp}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -163,7 +158,7 @@ - name: 'fuel-verify-smoke-test-{stream-exp}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -179,6 +174,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 6 @@ -191,22 +187,16 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml index 7b8656800..7f9eff04d 100644 --- a/jjb/fuel/fuel-verify-jobs.yml +++ b/jjb/fuel/fuel-verify-jobs.yml @@ -12,22 +12,22 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true ##################################### # patch verification phases ##################################### phase: - 'basic': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' - 'build': slave-label: 'opnfv-build-ubuntu' - 'deploy-virtual': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' - 'smoke-test': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' ##################################### # jobs ##################################### @@ -47,21 +47,17 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -100,9 +96,8 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - - 'opnfv-build-defaults' + - 'opnfv-build-ubuntu-defaults' - 'fuel-verify-defaults': gs-pathname: '{gs-pathname}' @@ -116,7 +111,7 @@ - name: 'fuel-verify-basic-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -130,7 +125,7 @@ - name: 'fuel-verify-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -144,7 +139,7 @@ - name: 'fuel-verify-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -158,7 +153,7 @@ - name: 'fuel-verify-smoke-test-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -174,6 +169,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 6 @@ -186,22 +182,16 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index a578fcecd..49901bea2 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -14,8 +14,8 @@ branch: '{stream}' gs-pathname: '' docker-tag: 'latest' - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' gs-pathname: '/{stream}' docker-tag: 'stable' @@ -40,11 +40,11 @@ - baremetal: slave-label: fuel-baremetal installer: fuel - <<: *colorado + <<: *danube - virtual: slave-label: fuel-virtual installer: fuel - <<: *colorado + <<: *danube # joid CI PODs - baremetal: slave-label: joid-baremetal @@ -57,11 +57,11 @@ - baremetal: slave-label: joid-baremetal installer: joid - <<: *colorado + <<: *danube - virtual: slave-label: joid-virtual installer: joid - <<: *colorado + <<: *danube # compass CI PODs - baremetal: slave-label: compass-baremetal @@ -74,11 +74,11 @@ - baremetal: slave-label: compass-baremetal installer: compass - <<: *colorado + <<: *danube - virtual: slave-label: compass-virtual installer: compass - <<: *colorado + <<: *danube # apex CI PODs - apex-verify-master: slave-label: '{pod}' @@ -88,14 +88,14 @@ slave-label: '{pod}' installer: apex <<: *master - - apex-verify-colorado: - slave-label: '{pod}' - installer: apex - <<: *colorado - - apex-daily-colorado: - slave-label: '{pod}' - installer: apex - <<: *colorado +# - apex-verify-danube: +# slave-label: '{pod}' +# installer: apex +# <<: *danube +# - apex-daily-danube: +# slave-label: '{pod}' +# installer: apex +# <<: *danube # armband CI PODs - armband-baremetal: slave-label: armband-baremetal @@ -108,11 +108,11 @@ - armband-baremetal: slave-label: armband-baremetal installer: fuel - <<: *colorado + <<: *danube - armband-virtual: slave-label: armband-virtual installer: fuel - <<: *colorado + <<: *danube # netvirt 3rd party ci - virtual: slave-label: odl-netvirt-virtual @@ -133,8 +133,8 @@ slave-label: '{pod}' installer: joid <<: *master - - huawei-pod5: - slave-label: '{pod}' + - baremetal-centos: + slave-label: 'intel-pod8' installer: compass <<: *master - nokia-pod1: @@ -156,7 +156,7 @@ - zte-pod1: slave-label: '{pod}' installer: fuel - <<: *colorado + <<: *danube - zte-pod2: slave-label: '{pod}' installer: fuel @@ -168,15 +168,15 @@ - zte-pod3: slave-label: '{pod}' installer: fuel - <<: *colorado + <<: *danube - arm-pod2: slave-label: '{pod}' installer: fuel - <<: *colorado + <<: *danube - arm-pod3: slave-label: '{pod}' installer: fuel - <<: *colorado + <<: *danube # PODs for verify jobs triggered by each patch upload - ool-virtual1: slave-label: '{pod}' @@ -204,6 +204,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -219,6 +220,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' - 'functest-{testsuite}-parameter' @@ -232,15 +234,12 @@ - string: name: CLEAN_DOCKER_IMAGES default: 'false' - description: 'Remove downloaded docker images (opnfv/functest:*)' + description: 'Remove downloaded docker images (opnfv/functest*:*)' - functest-parameter: gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: @@ -348,6 +347,8 @@ - 'functest-cleanup' - 'set-functest-env' - 'functest-suite' + - 'functest-store-results' + - 'functest-exit' - builder: name: functest-daily diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh index 3c4c7f965..3ef9b90dd 100755 --- a/jjb/functest/functest-cleanup.sh +++ b/jjb/functest/functest-cleanup.sh @@ -3,19 +3,39 @@ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" echo "Cleaning up docker containers/images..." +HOST_ARCH=$(uname -m) +FUNCTEST_IMAGE=opnfv/functest +if [ "$HOST_ARCH" = "aarch64" ]; then + FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" +fi + +# Remove containers along with image opnfv/functest*:<none> +dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}')) +if [[ -n ${dangling_images} ]]; then + echo " Removing $FUNCTEST_IMAGE:<none> images and their containers..." + for image_id in "${dangling_images[@]}"; do + echo " Removing image_id: $image_id and its containers" + docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} + docker rmi $image_id >${redirect} + done +fi + # Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then - echo "Removing existing opnfv/functest containers..." - docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >${redirect} +functest_containers=$(docker ps -a | grep $FUNCTEST_IMAGE | awk '{print $1}') +if [[ -n ${functest_containers} ]]; then + echo " Removing existing $FUNCTEST_IMAGE containers..." + docker rm -f $functest_containers >${redirect} fi # Remove existing images if exist -if [[ $CLEAN_DOCKER_IMAGES ]] && [[ ! -z $(docker images | grep opnfv/functest) ]]; then - echo "Docker images to remove:" - docker images | head -1 && docker images | grep opnfv/functest >${redirect} - image_tags=($(docker images | grep opnfv/functest | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image opnfv/functest:$tag..." - docker rmi opnfv/functest:$tag >/dev/null - done +if [[ $CLEAN_DOCKER_IMAGES == true ]]; then + functest_image_tags=($(docker images | grep $FUNCTEST_IMAGE | awk '{print $2}')) + if [[ -n ${functest_image_tags} ]]; then + echo " Docker images to be removed:" >${redirect} + (docker images | head -1 && docker images | grep $FUNCTEST_IMAGE) >${redirect} + for tag in "${functest_image_tags[@]}"; do + echo " Removing docker image $FUNCTEST_IMAGE:$tag..." + docker rmi $FUNCTEST_IMAGE:$tag >${redirect} + done + fi fi diff --git a/jjb/functest/functest-exit.sh b/jjb/functest/functest-exit.sh index 10edab005..925a3cfbb 100644 --- a/jjb/functest/functest-exit.sh +++ b/jjb/functest/functest-exit.sh @@ -1,7 +1,6 @@ #!/bin/bash -branch=${GIT_BRANCH##*/} -ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value" +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" if [ ! -f ${ret_val_file} ]; then echo "Return value not found!" exit -1 @@ -9,4 +8,4 @@ fi ret_val=`cat ${ret_val_file}` -exit ${ret_val}
\ No newline at end of file +exit ${ret_val} diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh index 4528c00d1..893c428a2 100755 --- a/jjb/functest/functest-loop.sh +++ b/jjb/functest/functest-loop.sh @@ -3,9 +3,9 @@ set +e branch=${GIT_BRANCH##*/} [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" -if [[ ${branch} == *"brahmaputra"* ]]; then +if [[ "$BRANCH" =~ 'brahmaputra' ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}" -elif [[ ${branch} == *"colorado"* ]]; then +elif [[ "$BRANCH" =~ 'colorado' ]]; then cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" else cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" @@ -14,7 +14,7 @@ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd ret_value=$? -ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value" +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo ${ret_value}>${ret_val_file} exit 0 diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml index 888f0ed79..42c19a777 100644 --- a/jjb/functest/functest-project-jobs.yml +++ b/jjb/functest/functest-project-jobs.yml @@ -15,10 +15,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false - job-template: name: 'functest-verify-{stream}' @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index a30fb5973..f28d3d037 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -1,14 +1,19 @@ #!/bin/bash set -e -branch=${GIT_BRANCH##*/} -echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}" -if [[ ${branch} == *"brahmaputra"* ]]; then +echo "Functest: run $FUNCTEST_SUITE_NAME on branch $BRANCH" +if [[ "$BRANCH" =~ 'brahmaputra' ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME" -elif [[ ${branch} == *"colorado"* ]]; then +elif [[ "$BRANCH" =~ 'colorado' ]]; then cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME" else cmd="functest testcase run $FUNCTEST_SUITE_NAME" fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd + +ret_value=$? +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo ${ret_value}>${ret_val_file} + +exit 0 diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index 583ce8041..5224793dc 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -56,8 +56,7 @@ DEPLOY_TYPE=baremetal echo "Functest: Start Docker and prepare environment" -branch=${GIT_BRANCH##*/} -dir_result="${HOME}/opnfv/functest/results/${branch}" +dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}" mkdir -p ${dir_result} sudo rm -rf ${dir_result}/* results_vol="-v ${dir_result}:/home/opnfv/functest/results" @@ -71,17 +70,22 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" +HOST_ARCH=$(uname -m) +FUNCTEST_IMAGE="opnfv/functest" +if [ "$HOST_ARCH" = "aarch64" ]; then + FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" +fi -echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}" -docker pull opnfv/functest:$DOCKER_TAG >/dev/null +echo "Functest: Pulling image ${FUNCTEST_IMAGE}:${DOCKER_TAG}" +docker pull ${FUNCTEST_IMAGE}:$DOCKER_TAG >/dev/null cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \ ${custom_params} ${TESTCASE_OPTIONS} \ - opnfv/functest:${DOCKER_TAG} /bin/bash" + ${FUNCTEST_IMAGE}:${DOCKER_TAG} /bin/bash" echo "Functest: Running docker run command: ${cmd}" ${cmd} >${redirect} sleep 5 -container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1) +container_id=$(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | awk '{print $1}' | head -1) echo "Container ID=${container_id}" if [ -z ${container_id} ]; then echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing." @@ -92,13 +96,13 @@ echo "Starting the container: docker start ${container_id}" docker start ${container_id} sleep 5 docker ps >${redirect} -if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then - echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." +if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then + echo "The container ${FUNCTEST_IMAGE} with ID=${container_id} has not been properly started. Exiting..." exit 1 fi -if [[ ${branch} == *"brahmaputra"* ]]; then +if [[ "$BRANCH" =~ 'brahmaputra' ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" -elif [[ ${branch} == *"colorado"* ]]; then +elif [[ "$BRANCH" =~ 'colorado' ]]; then cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" else cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" 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 ##################################################### diff --git a/jjb/infra/bifrost-verify-jobs.yml b/jjb/infra/bifrost-verify-jobs.yml index 422a42274..c99023edf 100644 --- a/jjb/infra/bifrost-verify-jobs.yml +++ b/jjb/infra/bifrost-verify-jobs.yml @@ -38,9 +38,6 @@ dib-os-element: 'opensuse-minimal' dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' extra-dib-elements: 'openssh-server' - vm-disk: '30' - vm-memory: '4096' - vm-cpu: '2' #-------------------------------- # type #-------------------------------- @@ -57,9 +54,10 @@ #-------------------------------- - defaults: name: vm_defaults - vm-disk: '100' - vm-memory: '8192' - vm-cpu: '4' + vm-disk: '30' + vm-disk-cache: 'unsafe' + vm-memory: '4096' + vm-cpu: '2' #-------------------------------- # job templates @@ -74,6 +72,7 @@ concurrent: false properties: + - logrotate-default - build-blocker: use-build-blocker: true blocking-jobs: @@ -109,6 +108,9 @@ name: VM_DISK default: '{vm-disk}' - string: + name: VM_DISK_CACHE + default: '{vm-disk-cache}' + - string: name: VM_MEMORY default: '{vm-memory}' - string: @@ -120,13 +122,16 @@ - label: name: SLAVE_LABEL default: 'infra-{type}-{distro}' + - string: + name: BIFROST_LOG_URL + default: 'http://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER/$JOB_NAME' scm: - git: url: '$PROJECT_REPO' refspec: '$GERRIT_REFSPEC' branches: - - 'origin/$GERRIT_BRANCH' + - 'origin/$BRANCH' skip-tag: true choosing-strategy: 'gerrit' timeout: 10 @@ -137,10 +142,8 @@ branch: '{branch}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - shell: - !include-raw-escape: ./bifrost-verify.sh + - bifrost-set-name + - bifrost-build publishers: - email: @@ -161,7 +164,7 @@ exclude-no-code-change: 'false' - comment-added-contains-event: comment-contains-value: 'recheck' - custom-url: '* $JOB_NAME $BUILD_URL' + custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' silent-start: true projects: - project-compare-type: 'PLAIN' @@ -190,6 +193,7 @@ comment-contains-value: 'recheck' - comment-added-contains-event: comment-contains-value: 'reverify' + custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' projects: - project-compare-type: 'ANT' project-pattern: 'releng' @@ -199,6 +203,19 @@ file-paths: - compare-type: ANT pattern: 'prototypes/bifrost/**' - - compare-type: ANT - pattern: 'jjb/infra/**' readable-message: true + +#--------------------------- +# builder macros +#--------------------------- +- builder: + name: bifrost-set-name + builders: + - description-setter: + description: "Built on $NODE_NAME" + +- builder: + name: bifrost-build + builders: + - shell: + !include-raw: ./bifrost-verify.sh diff --git a/jjb/infra/bifrost-verify.sh b/jjb/infra/bifrost-verify.sh index 9fbb1d0d9..4115ffcc4 100755 --- a/jjb/infra/bifrost-verify.sh +++ b/jjb/infra/bifrost-verify.sh @@ -11,7 +11,63 @@ set -o errexit set -o nounset set -o pipefail -trap fix_ownership EXIT +trap cleanup_and_upload EXIT + +function upload_logs() { + BIFROST_CONSOLE_LOG="${BUILD_URL}/consoleText" + BIFROST_GS_URL=${BIFROST_LOG_URL/http:/gs:} + + # Make sure the old landing page is gone in case + # we break later on. We don't want to publish + # stale information. + # TODO: Maybe cleanup the entire $BIFROST_GS_URL directory + # before we upload the new data. + gsutil -q rm ${BIFROST_GS_URL}/index.html || true + + echo "Uploading collected bifrost build logs to ${BIFROST_LOG_URL}" + + if [[ -d ${WORKSPACE}/logs ]]; then + pushd ${WORKSPACE}/logs &> /dev/null + for x in *.log; do + echo "Compressing and uploading $x" + gsutil -q cp -Z ${x} ${BIFROST_GS_URL}/${x} + done + popd &> /dev/null + fi + + echo "Generating the ${BIFROST_LOG_URL}/index.html landing page" + cat > ${WORKSPACE}/index.html <<EOF +<html> +<h1>Build results for <a href=https://$GERRIT_NAME/#/c/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER>$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER</a></h1> +<h2>Job: <a href=${BUILD_URL}>$JOB_NAME</a></h2> +<ul> +<li><a href=${BIFROST_LOG_URL}/build_log.txt>build_log.txt</a></li> +EOF + + if [[ -d ${WORKSPACE}/logs ]]; then + pushd ${WORKSPACE}/logs &> /dev/null + for x in *.log; do + echo "<li><a href=${BIFROST_LOG_URL}/${x}>${x}</a></li>" >> ${WORKSPACE}/index.html + done + popd &> /dev/null + fi + + cat >> ${WORKSPACE}/index.html << EOF +</ul> +</html> +EOF + + # Finally, download and upload the entire build log so we can retain + # as much build information as possible + echo "Uploading the final console output" + curl -s -L ${BIFROST_CONSOLE_LOG} > ${WORKSPACE}/build_log.txt + gsutil -q cp -Z ${WORKSPACE}/build_log.txt ${BIFROST_GS_URL}/build_log.txt + rm ${WORKSPACE}/build_log.txt + + # Upload landing page + gsutil -q cp ${WORKSPACE}/index.html ${BIFROST_GS_URL}/index.html + rm ${WORKSPACE}/index.html +} function fix_ownership() { if [ -z "${JOB_URL+x}" ]; then @@ -25,6 +81,13 @@ function fix_ownership() { fi } +function cleanup_and_upload() { + original_exit=$? + fix_ownership + upload_logs + exit $original_exit +} + # check distro to see if we support it if [[ ! "$DISTRO" =~ (trusty|centos7|suse) ]]; then echo "Distro $DISTRO is not supported!" diff --git a/jjb/ipv6/ipv6.yml b/jjb/ipv6/ipv6.yml index 069599e82..a6745cd99 100644 --- a/jjb/ipv6/ipv6.yml +++ b/jjb/ipv6/ipv6.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/joid/joid-daily-jobs.yml b/jjb/joid/joid-daily-jobs.yml index 6d0370983..b28dd6025 100644 --- a/jjb/joid/joid-daily-jobs.yml +++ b/jjb/joid/joid-daily-jobs.yml @@ -17,10 +17,10 @@ branch: '{stream}' disabled: false gs-pathname: '' - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' - disabled: false + disabled: true gs-pathname: '/{stream}' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING @@ -36,10 +36,10 @@ <<: *master - baremetal: slave-label: joid-baremetal - <<: *colorado + <<: *danube - virtual: slave-label: joid-virtual - <<: *colorado + <<: *danube #-------------------------------- # None-CI PODs #-------------------------------- @@ -72,6 +72,10 @@ auto-trigger-name: 'daily-trigger-disabled' - 'os-ocl-nofeature-noha': auto-trigger-name: 'daily-trigger-disabled' + - 'k8-nosdn-nofeature-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-nosdn-lb-noha': + auto-trigger-name: 'daily-trigger-disabled' jobs: - 'joid-{scenario}-{pod}-daily-{stream}' @@ -88,6 +92,7 @@ concurrent: false properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -109,6 +114,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -157,6 +163,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -178,6 +185,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -186,10 +194,7 @@ default: 'os-odl_l2-nofeature-ha' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: @@ -227,17 +232,17 @@ name: 'joid-os-nosdn-nofeature-ha-orange-pod1-master-trigger' triggers: - timed: '' -# os-nosdn-nofeature-ha trigger - branch: colorado +# os-nosdn-nofeature-ha trigger - branch: danube - trigger: - name: 'joid-os-nosdn-nofeature-ha-baremetal-colorado-trigger' + name: 'joid-os-nosdn-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '0 2 * * *' - trigger: - name: 'joid-os-nosdn-nofeature-ha-virtual-colorado-trigger' + name: 'joid-os-nosdn-nofeature-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-nosdn-nofeature-ha-orange-pod1-colorado-trigger' + name: 'joid-os-nosdn-nofeature-ha-orange-pod1-danube-trigger' triggers: - timed: '' # os-odl_l2-nofeature-ha trigger - branch: master @@ -253,17 +258,17 @@ name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-master-trigger' triggers: - timed: '' -# os-odl_l2-nofeature-ha trigger - branch: colorado +# os-odl_l2-nofeature-ha trigger - branch: danube - trigger: - name: 'joid-os-odl_l2-nofeature-ha-baremetal-colorado-trigger' + name: 'joid-os-odl_l2-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '0 7 * * *' - trigger: - name: 'joid-os-odl_l2-nofeature-ha-virtual-colorado-trigger' + name: 'joid-os-odl_l2-nofeature-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-colorado-trigger' + name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-danube-trigger' triggers: - timed: '' # os-onos-nofeature-ha trigger - branch: master @@ -279,17 +284,17 @@ name: 'joid-os-onos-nofeature-ha-orange-pod1-master-trigger' triggers: - timed: '' -# os-onos-nofeature-ha trigger - branch: colorado +# os-onos-nofeature-ha trigger - branch: danube - trigger: - name: 'joid-os-onos-nofeature-ha-baremetal-colorado-trigger' + name: 'joid-os-onos-nofeature-ha-baremetal-danube-trigger' triggers: - timed: '0 12 * * *' - trigger: - name: 'joid-os-onos-nofeature-ha-virtual-colorado-trigger' + name: 'joid-os-onos-nofeature-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-onos-nofeature-ha-orange-pod1-colorado-trigger' + name: 'joid-os-onos-nofeature-ha-orange-pod1-danube-trigger' triggers: - timed: '' # os-onos-sfc-ha trigger - branch: master @@ -305,17 +310,17 @@ name: 'joid-os-onos-sfc-ha-orange-pod1-master-trigger' triggers: - timed: '' -# os-onos-sfc-ha trigger - branch: colorado +# os-onos-sfc-ha trigger - branch: danube - trigger: - name: 'joid-os-onos-sfc-ha-baremetal-colorado-trigger' + name: 'joid-os-onos-sfc-ha-baremetal-danube-trigger' triggers: - timed: '0 17 * * *' - trigger: - name: 'joid-os-onos-sfc-ha-virtual-colorado-trigger' + name: 'joid-os-onos-sfc-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-onos-sfc-ha-orange-pod1-colorado-trigger' + name: 'joid-os-onos-sfc-ha-orange-pod1-danube-trigger' triggers: - timed: '' # os-nosdn-lxd-noha trigger - branch: master @@ -331,17 +336,17 @@ name: 'joid-os-nosdn-lxd-noha-orange-pod1-master-trigger' triggers: - timed: '' -# os-nosdn-lxd-noha trigger - branch: colorado +# os-nosdn-lxd-noha trigger - branch: danube - trigger: - name: 'joid-os-nosdn-lxd-noha-baremetal-colorado-trigger' + name: 'joid-os-nosdn-lxd-noha-baremetal-danube-trigger' triggers: - timed: '0 22 * * *' - trigger: - name: 'joid-os-nosdn-lxd-noha-virtual-colorado-trigger' + name: 'joid-os-nosdn-lxd-noha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-nosdn-lxd-noha-orange-pod1-colorado-trigger' + name: 'joid-os-nosdn-lxd-noha-orange-pod1-danube-trigger' triggers: - timed: '' # os-nosdn-lxd-ha trigger - branch: master @@ -357,17 +362,17 @@ name: 'joid-os-nosdn-lxd-ha-orange-pod1-master-trigger' triggers: - timed: '' -# os-nosdn-lxd-ha trigger - branch: colorado +# os-nosdn-lxd-ha trigger - branch: danube - trigger: - name: 'joid-os-nosdn-lxd-ha-baremetal-colorado-trigger' + name: 'joid-os-nosdn-lxd-ha-baremetal-danube-trigger' triggers: - timed: '0 10 * * *' - trigger: - name: 'joid-os-nosdn-lxd-ha-virtual-colorado-trigger' + name: 'joid-os-nosdn-lxd-ha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-nosdn-lxd-ha-orange-pod1-colorado-trigger' + name: 'joid-os-nosdn-lxd-ha-orange-pod1-danube-trigger' triggers: - timed: '' # os-nosdn-nofeature-noha trigger - branch: master @@ -383,16 +388,68 @@ name: 'joid-os-nosdn-nofeature-noha-orange-pod1-master-trigger' triggers: - timed: '' -# os-nosdn-nofeature-noha trigger - branch: colorado +# os-nosdn-nofeature-noha trigger - branch: danube - trigger: - name: 'joid-os-nosdn-nofeature-noha-baremetal-colorado-trigger' + name: 'joid-os-nosdn-nofeature-noha-baremetal-danube-trigger' triggers: - timed: '0 4 * * *' - trigger: - name: 'joid-os-nosdn-nofeature-noha-virtual-colorado-trigger' + name: 'joid-os-nosdn-nofeature-noha-virtual-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-nosdn-nofeature-noha-orange-pod1-danube-trigger' + triggers: + - timed: '' +# k8-nosdn-nofeature-noha trigger - branch: master +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-baremetal-master-trigger' + triggers: + - timed: '5 15 * * *' +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-virtual-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-orange-pod1-master-trigger' + triggers: + - timed: '' +# k8-nosdn-nofeature-noha trigger - branch: danube +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-baremetal-danube-trigger' + triggers: + - timed: '0 15 * * *' +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-virtual-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-orange-pod1-danube-trigger' + triggers: + - timed: '' +# k8-nosdn-lb-noha trigger - branch: master +- trigger: + name: 'joid-k8-nosdn-lb-noha-baremetal-master-trigger' + triggers: + - timed: '5 20 * * *' +- trigger: + name: 'joid-k8-nosdn-lb-noha-virtual-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-k8-nosdn-lb-noha-orange-pod1-master-trigger' + triggers: + - timed: '' +# k8-nosdn-lb-noha trigger - branch: danube +- trigger: + name: 'joid-k8-nosdn-lb-noha-baremetal-danube-trigger' + triggers: + - timed: '0 20 * * *' +- trigger: + name: 'joid-k8-nosdn-lb-noha-virtual-danube-trigger' triggers: - timed: '' - trigger: - name: 'joid-os-nosdn-nofeature-noha-orange-pod1-colorado-trigger' + name: 'joid-k8-nosdn-lb-noha-orange-pod1-danube-trigger' triggers: - timed: '' diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index 05c2de1fc..e197dbd8c 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -45,17 +45,24 @@ export POD_NAME=${POD/-} ## cd $WORKSPACE/ci -if [ -e "$LAB_CONFIG/environments.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; then + +if [ -e "$LAB_CONFIG/deployconfig.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; then echo "------ Recover Juju environment to use MAAS ------" - cp $LAB_CONFIG/environments.yaml . - cp $LAB_CONFIG/deployment.yaml . - if [ -e $LAB_CONFIG/deployconfig.yaml ]; then + if [ ! -e deployconfig.yaml ]; then cp $LAB_CONFIG/deployconfig.yaml . + cp $LAB_CONFIG/deployment.yaml . + cp $LAB_CONFIG/labconfig.yaml . fi else - echo "------ Redeploy MAAS ------" - ./00-maasdeploy.sh $POD_NAME - exit_on_error $? "MAAS Deploy FAILED" + if ["$NODE_NAME" == "default" ]; then + echo "------ Redeploy MAAS ------" + ./03-maasdeploy.sh default + exit_on_error $? "MAAS Deploy FAILED" + else + echo "------ Redeploy MAAS ------" + ./03-maasdeploy.sh custom $LAB_CONFIG/labconfig.yaml + exit_on_error $? "MAAS Deploy FAILED" + fi fi ## @@ -64,8 +71,9 @@ fi # Based on scenario naming we can get joid options # naming convention: -# os-<controller>-<nfvfeature>-<mode>[-<extrastuff>] +# <model>-<controller>-<nfvfeature>-<mode>[-<extrastuff>] # With parameters: +# model=(os|k8) # controller=(nosdn|odl_l3|odl_l2|onos|ocl) # No odl_l3 today # nfvfeature=(kvm|ovs|dpdk|nofeature) @@ -77,6 +85,7 @@ fi IFS='-' read -r -a DEPLOY_OPTIONS <<< "${DEPLOY_SCENARIO}--" #last -- need to avoid nounset error +JOID_MODEL=${DEPLOY_OPTIONS[0]} SDN_CONTROLLER=${DEPLOY_OPTIONS[1]} NFV_FEATURES=${DEPLOY_OPTIONS[2]} HA_MODE=${DEPLOY_OPTIONS[3]} @@ -103,49 +112,47 @@ fi ## Configure Joid deployment ## -echo "------ Deploy with juju ------" -echo "Execute: ./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES" +if [ "$JOID_MODEL" == 'k8' ]; then + echo "------ Deploy with juju ------" + echo "Execute: ./deploy.sh -m $JOID_MODEL -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES" -./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES -exit_on_error $? "Main deploy FAILED" + ./deploy.sh -m kubernetes -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES + exit_on_error $? "Main deploy FAILED" +fi ## ## Set Admin RC ## -JOID_ADMIN_OPENRC=$LAB_CONFIG/admin-openrc -echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------" - -# get controller IP -case "$SDN_CONTROLLER" in - "odl") - SDN_CONTROLLER_IP=$(juju status odl-controller/0 |grep public-address|sed -- 's/.*\: //') - ;; - "onos") - SDN_CONTROLLER_IP=$(juju status onos-controller/0 |grep public-address|sed -- 's/.*\: //') - ;; - *) - SDN_CONTROLLER_IP='none' - ;; -esac -SDN_PASSWORD='admin' - -# export the openrc file by getting the one generated by joid and add SDN -# controller for Functest -cp ./cloud/admin-openrc $JOID_ADMIN_OPENRC -cat << EOF >> $JOID_ADMIN_OPENRC -export SDN_CONTROLLER=$SDN_CONTROLLER_IP -export SDN_PASSWORD=$SDN_PASSWORD -EOF - -## -## Backup local juju env -## +if [ "$JOID_MODEL" == 'os' ]; then + echo "------ Deploy with juju ------" + echo "Execute: ./deploy.sh -m $JOID_MODEL -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES" + + ./deploy.sh -m openstack -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME -d $UBUNTU_DISTRO -f $NFV_FEATURES + exit_on_error $? "Main deploy FAILED" + + JOID_ADMIN_OPENRC=$LAB_CONFIG/admin-openrc + echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------" + + # get controller IP + case "$SDN_CONTROLLER" in + "odl") + SDN_CONTROLLER_IP=$(juju status odl-controller/0 |grep public-address|sed -- 's/.*\: //') + ;; + "onos") + SDN_CONTROLLER_IP=$(juju status onos-controller/0 |grep public-address|sed -- 's/.*\: //') + ;; + *) + SDN_CONTROLLER_IP='none' + ;; + esac + SDN_PASSWORD='admin' + + # export the openrc file by getting the one generated by joid and add SDN + # controller for Functest + # cp ./cloud/admin-openrc $JOID_ADMIN_OPENRC + echo export SDN_CONTROLLER=$SDN_CONTROLLER_IP >> $JOID_ADMIN_OPENRC + echo export SDN_PASSWORD=$SDN_PASSWORD >> $JOID_ADMIN_OPENRC -echo "------ Backup Juju environment ------" -cp environments.yaml $LAB_CONFIG/ -cp deployment.yaml $LAB_CONFIG/ -if [ -e deployconfig.yaml ]; then - cp deployconfig.yaml $LAB_CONFIG fi ## diff --git a/jjb/joid/joid-verify-jobs.yml b/jjb/joid/joid-verify-jobs.yml index 649c31bea..7b8ce7701 100644 --- a/jjb/joid/joid-verify-jobs.yml +++ b/jjb/joid/joid-verify-jobs.yml @@ -12,7 +12,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -45,6 +45,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -54,19 +55,14 @@ use-build-blocker: true blocking-jobs: - 'joid-verify-master' - - 'joid-verify-colorado' + - 'joid-verify-danube' block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -98,7 +94,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'joid-virtual-defaults' @@ -112,7 +107,7 @@ - name: 'joid-verify-basic-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -125,7 +120,7 @@ - name: 'joid-verify-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -139,7 +134,7 @@ - name: 'joid-verify-smoke-test-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE @@ -155,6 +150,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 4 @@ -168,15 +164,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -184,7 +175,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' diff --git a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh index 6f8fff3ff..56fb4f9c1 100755 --- a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh +++ b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh @@ -11,16 +11,17 @@ fi case "$JOB_TYPE" in verify) - OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER" - GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" - echo "Removing outdated artifacts produced for the previous patch for the change $GERRIT_CHANGE_NUMBER" - gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1 && gsutil rm -r $GS_UPLOAD_LOCATION - echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..." - ;; + OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER" + GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" + echo "Removing outdated artifacts produced for the previous patch for the change $GERRIT_CHANGE_NUMBER" + gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1 && gsutil rm -r $GS_UPLOAD_LOCATION + echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..." + ;; daily) echo "Uploading daily artifacts This could take some time..." OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") GS_UPLOAD_LOCATION="gs://$GS_URL/$OPNFV_ARTIFACT_VERSION" + GS_LOG_LOCATION="gs://$GS_URL/logs-$(date -u +"%Y-%m-%d")"/ ;; *) echo "Artifact upload is not enabled for $JOB_TYPE jobs" @@ -38,10 +39,23 @@ esac source $WORKSPACE/opnfv.properties # upload artifacts -gsutil cp -r $WORKSPACE/build_output/* $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1 -gsutil -m setmeta -r \ - -h "Cache-Control:private, max-age=0, no-transform" \ - $GS_UPLOAD_LOCATION > /dev/null 2>&1 +if [[ "$PHASE" == "build" ]]; then + gsutil cp -r $WORKSPACE/build_output/* $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1 + gsutil -m setmeta -r \ + -h "Cache-Control:private, max-age=0, no-transform" \ + $GS_UPLOAD_LOCATION > /dev/null 2>&1 +else + if [[ "$JOB_TYPE" == "daily" ]]; then + log_dir=$WORKSPACE/build_output/log + if [[ -d "$log_dir" ]]; then + #Uploading logs to artifacts + echo "Uploading artifacts for future debugging needs...." + gsutil cp -r $WORKSPACE/build_output/log-*.tar.gz $GS_LOG_LOCATION > $WORKSPACE/gsutil.log 2>&1 + else + echo "No test logs/artifacts available for uploading" + fi + fi +fi # upload metadata file for the artifacts built by daily job if [[ "$JOB_TYPE" == "daily" ]]; then diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index 1c2bf5053..a782ee0fa 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -8,7 +8,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -19,7 +19,7 @@ - 'build': slave-label: 'opnfv-build-ubuntu' - 'test': - slave-label: 'intel-pod1' + slave-label: 'intel-pod10' ##################################### # patch verification phases ##################################### @@ -48,6 +48,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-total: 3 @@ -56,7 +57,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' @@ -90,7 +90,7 @@ - name: 'kvmfornfv-verify-build-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER node-parameters: false @@ -103,7 +103,7 @@ - name: 'kvmfornfv-verify-test-{stream}' current-parameters: false predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH + BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER node-parameters: false @@ -117,26 +117,24 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - 'kvmfornfv-defaults': gs-pathname: '{gs-pathname}' + - string: + name: PHASE + default: '{phase}' + description: "Execution of kvmfornfv daily '{phase}' job ." builders: - description-setter: @@ -151,17 +149,13 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - 'kvmfornfv-defaults': gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -193,17 +187,13 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - 'kvmfornfv-defaults': gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '@midnight' @@ -212,20 +202,40 @@ - description-setter: description: "Built on $NODE_NAME" - multijob: - name: build + name: cyclictest-build condition: SUCCESSFUL projects: - - name: 'kvmfornfv-{testname}-daily-build-{stream}' + - name: 'kvmfornfv-cyclictest-daily-build-{stream}' current-parameters: false node-parameters: false git-revision: true kill-phase-on: FAILURE abort-all-job: true - multijob: - name: build + name: cyclictest-test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-cyclictest-daily-test-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: packetforward-build condition: SUCCESSFUL projects: - - name: 'kvmfornfv-{testname}-daily-test-{stream}' + - name: 'kvmfornfv-packet_forward-daily-build-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: packetforward-test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-packet_forward-daily-test-{stream}' current-parameters: false node-parameters: false git-revision: true @@ -240,22 +250,16 @@ concurrent: false scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' - 'kvmfornfv-defaults': @@ -264,6 +268,10 @@ name: TEST_NAME default: '{testname}' description: "Daily job to execute kvmfornfv '{testname}' testcase." + - string: + name: PHASE + default: '{phase}' + description: "Execution of kvmfornfv daily '{phase}' job ." builders: - description-setter: @@ -300,6 +308,8 @@ !include-raw: ./kvmfornfv-download-artifact.sh - shell: !include-raw: ./kvmfornfv-test.sh + - shell: + !include-raw: ./kvmfornfv-upload-artifact.sh - builder: name: 'kvmfornfv-packet_forward-daily-build-macro' builders: diff --git a/jjb/moon/moon.yml b/jjb/moon/moon.yml index a52cf2cd1..a318bc54d 100644 --- a/jjb/moon/moon.yml +++ b/jjb/moon/moon.yml @@ -17,15 +17,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/multisite/fuel-deploy-for-multisite.sh b/jjb/multisite/fuel-deploy-for-multisite.sh new file mode 100755 index 000000000..d8b40517c --- /dev/null +++ b/jjb/multisite/fuel-deploy-for-multisite.sh @@ -0,0 +1,121 @@ +#!/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 nounset +set -o pipefail + +# do not continue with the deployment if FRESH_INSTALL is not requested +if [[ "$FRESH_INSTALL" == "true" ]]; then + echo "Fresh install requested. Proceeding with the installation." +else + echo "Fresh install is not requested. Skipping the installation." + exit 0 +fi + +export TERM="vt220" + +# get the latest successful job console log and extract the properties filename +FUEL_DEPLOY_BUILD_URL="https://build.opnfv.org/ci/job/fuel-deploy-virtual-daily-master/lastSuccessfulBuild/consoleText" +FUEL_PROPERTIES_FILE=$(curl -s -L ${FUEL_DEPLOY_BUILD_URL} | grep 'ISO:' | awk '{print $2}' | sed 's/iso/properties/g') +if [[ -z "FUEL_PROPERTIES_FILE" ]]; then + echo "Unable to extract the url to Fuel ISO properties from ${FUEL_DEPLOY_URL}" + exit 1 +fi +curl -L -s -o $WORKSPACE/latest.properties http://artifacts.opnfv.org/fuel/$FUEL_PROPERTIES_FILE + +# source the file so we get OPNFV vars +source latest.properties + +# echo the info about artifact that is used during the deployment +echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" + +# download the iso +echo "Downloading the ISO using the link http://$OPNFV_ARTIFACT_URL" +curl -L -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 + + +# set deployment parameters +DEPLOY_SCENARIO="os-nosdn-nofeature-noha" +export TMPDIR=$HOME/tmpdir +BRIDGE=${BRIDGE:-pxebr} +LAB_NAME=${NODE_NAME/-*} +POD_NAME=${NODE_NAME/*-} + +if [[ "$NODE_NAME" =~ "virtual" ]]; then + POD_NAME="virtual_kvm" +fi + +# we currently support ericsson, intel, lf and zte labs +if [[ ! "$LAB_NAME" =~ (ericsson|intel|lf|zte) ]]; then + echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" + exit 1 +else + echo "Using configuration for $LAB_NAME" +fi + +# create TMPDIR if it doesn't exist +export TMPDIR=$HOME/tmpdir +mkdir -p $TMPDIR + +# change permissions down to TMPDIR +chmod a+x $HOME +chmod a+x $TMPDIR + +# clone fuel repo and checkout the sha1 that corresponds to the ISO +echo "Cloning fuel repo" +git clone https://gerrit.opnfv.org/gerrit/p/fuel.git fuel +cd $WORKSPACE/fuel +echo "Checking out $OPNFV_GIT_SHA1" +git checkout $OPNFV_GIT_SHA1 --quiet + +# clone the securedlab repo +cd $WORKSPACE +echo "Cloning securedlab repo ${GIT_BRANCH##origin/}" +git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet \ + --branch ${GIT_BRANCH##origin/} + +# log file name +FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" + +# construct the command +DEPLOY_COMMAND="sudo $WORKSPACE/fuel/ci/deploy.sh -b file://$WORKSPACE/securedlab \ + -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://$WORKSPACE/opnfv.iso \ + -H -B $BRIDGE -S $TMPDIR -L $WORKSPACE/$FUEL_LOG_FILENAME" + +# log info to console +echo "Deployment parameters" +echo "--------------------------------------------------------" +echo "Scenario: $DEPLOY_SCENARIO" +echo "Lab: $LAB_NAME" +echo "POD: $POD_NAME" +echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" +echo +echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..." +echo "--------------------------------------------------------" +echo + +# start the deployment +echo "Issuing command" +echo "$DEPLOY_COMMAND" +echo + +$DEPLOY_COMMAND +exit_code=$? + +echo +echo "--------------------------------------------------------" +echo "Deployment is done!" + +if [[ $exit_code -ne 0 ]]; then + echo "Deployment failed!" + exit $exit_code +else + echo "Deployment is successful!" + exit 0 +fi diff --git a/jjb/multisite/multisite-daily-jobs.yml b/jjb/multisite/multisite-daily-jobs.yml index cfb40a1fa..6b022fd75 100644 --- a/jjb/multisite/multisite-daily-jobs.yml +++ b/jjb/multisite/multisite-daily-jobs.yml @@ -8,19 +8,23 @@ - 'multisite-{phase}-{stream}' phase: - - 'fuel-deploy-regionone-virtual' - - 'fuel-deploy-regiontwo-virtual' - - 'register-endpoints' - - 'update-auth' - - 'kingbird-deploy-virtual' - - 'kingbird-functest' + - 'fuel-deploy-regionone-virtual': + slave-label: ericsson-virtual12 + - 'fuel-deploy-regiontwo-virtual': + slave-label: ericsson-virtual13 + - 'register-endpoints': + slave-label: ericsson-virtual12 + - 'update-auth': + slave-label: ericsson-virtual13 + - 'kingbird-deploy-virtual': + slave-label: ericsson-virtual12 stream: - master: branch: '{stream}' gs-pathname: '' disabled: false - timed: '#@midnight' + timed: '@midnight' - job-template: name: 'multisite-kingbird-virtual-daily-{stream}' @@ -34,13 +38,16 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' + - choice: + name: FRESH_INSTALL + choices: + - 'true' + - 'false' - string: name: KINGBIRD_LOG_FILE default: $WORKSPACE/kingbird.log - - 'multisite-virtual-defaults' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-multisite-noha' + - 'opnfv-build-defaults' triggers: - timed: '{timed}' @@ -56,26 +63,28 @@ current-parameters: false predefined-parameters: | FUEL_VERSION=latest - DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DEPLOY_SCENARIO=os-nosdn-nofeature-noha OS_REGION=RegionOne - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual2 + node-label: ericsson-virtual12 kill-phase-on: FAILURE abort-all-job: true - name: 'multisite-fuel-deploy-regiontwo-virtual-{stream}' current-parameters: false predefined-parameters: | FUEL_VERSION=latest - DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DEPLOY_SCENARIO=os-nosdn-nofeature-noha OS_REGION=RegionTwo - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual6 + node-label: ericsson-virtual13 kill-phase-on: FAILURE abort-all-job: true - multijob: @@ -86,22 +95,24 @@ current-parameters: false predefined-parameters: | OS_REGION=RegionOne - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual2 + node-label: ericsson-virtual12 kill-phase-on: FAILURE abort-all-job: true - name: 'multisite-update-auth-{stream}' current-parameters: false predefined-parameters: | OS_REGION=RegionTwo - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual6 + node-label: ericsson-virtual13 kill-phase-on: FAILURE abort-all-job: true - multijob: @@ -112,26 +123,30 @@ current-parameters: false predefined-parameters: | OS_REGION=RegionOne - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual2 + node-label: ericsson-virtual12 kill-phase-on: FAILURE abort-all-job: true - multijob: name: kingbird-functest condition: SUCCESSFUL projects: - - name: 'multisite-kingbird-functest-{stream}' + - name: 'functest-fuel-virtual-suite-{stream}' current-parameters: false predefined-parameters: | + DEPLOY_SCENARIO='os-nosdn-multisite-noha' + FUNCTEST_SUITE_NAME='multisite' OS_REGION=RegionOne - REGIONONE_IP=10.2.117.79 - REGIONTWO_IP=10.2.117.181 + REGIONONE_IP=100.64.209.10 + REGIONTWO_IP=100.64.209.11 + FRESH_INSTALL=$FRESH_INSTALL node-parameters: false node-label-name: SLAVE_LABEL - node-label: intel-virtual2 + node-label: ericsson-virtual12 kill-phase-on: NEVER abort-all-job: false @@ -140,6 +155,28 @@ concurrent: false + disabled: '{obj:disabled}' + + concurrent: false + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: KINGBIRD_LOG_FILE + default: $WORKSPACE/kingbird.log + - 'fuel-defaults' + - '{slave-label}-defaults' + - choice: + name: FRESH_INSTALL + choices: + - 'true' + - 'false' + + scm: + - git-scm + builders: - description-setter: description: "Built on $NODE_NAME" @@ -155,39 +192,57 @@ - builder: name: 'multisite-fuel-deploy-regionone-virtual-builder' builders: + - shell: + !include-raw-escape: ./fuel-deploy-for-multisite.sh - shell: | #!/bin/bash echo "This is where we deploy fuel, extract passwords and save into file" + + cd $WORKSPACE/tools/keystone/ + ./run.sh -t controller -r fetchpass.sh -o servicepass.ini + - builder: name: 'multisite-fuel-deploy-regiontwo-virtual-builder' builders: + - shell: + !include-raw-escape: ./fuel-deploy-for-multisite.sh - shell: | #!/bin/bash echo "This is where we deploy fuel, extract publicUrl, privateUrl, and adminUrl and save into file" + + cd $WORKSPACE/tools/keystone/ + ./run.sh -t controller -r endpoint.sh -o endpoints.ini - builder: name: 'multisite-register-endpoints-builder' builders: - copyartifact: project: 'multisite-fuel-deploy-regiontwo-virtual-{stream}' which-build: multijob-build - filter: "RegionTwo-Endpoints.txt" + filter: "endpoints.ini" - shell: | #!/bin/bash - echo "This is where we register RegionTwo in RegionOne keystone" + echo "This is where we register RegionTwo in RegionOne keystone using endpoints.ini" + + cd $WORKSPACE/tools/keystone/ + ./run.sh -t controller -r region.sh -d $WORKSPACE/endpoints.ini - builder: name: 'multisite-update-auth-builder' builders: - copyartifact: project: 'multisite-fuel-deploy-regionone-virtual-{stream}' which-build: multijob-build - filter: "RegionOne-Passwords.txt" + filter: "servicepass.ini" - shell: | #!/bin/bash - echo "This is where we read passwords from RegionOne-passwords.txt and replace passwords in RegionTwo" + echo "This is where we read passwords from servicepass.ini and replace passwords in RegionTwo" + + cd $WORKSPACE/tools/keystone/ + ./run.sh -t controller -r writepass.sh -d $WORKSPACE/servicepass.ini + ./run.sh -t compute -r writepass.sh -d $WORKSPACE/servicepass.ini - builder: name: 'multisite-kingbird-deploy-virtual-builder' builders: @@ -195,13 +250,8 @@ #!/bin/bash echo "This is where we install kingbird" -- builder: - name: 'multisite-kingbird-functest-builder' - builders: - - shell: | - #!/bin/bash - - echo "This is where we run kingbird-functest" + cd $WORKSPACE/tools/kingbird + ./deploy.sh ######################## # publisher macros ######################## @@ -209,7 +259,7 @@ name: 'multisite-fuel-deploy-regionone-virtual-publisher' publishers: - archive: - artifacts: '/root/servicepass.ini' + artifacts: 'servicepass.ini' allow-empty: false only-if-success: true fingerprint: true @@ -217,7 +267,7 @@ name: 'multisite-fuel-deploy-regiontwo-virtual-publisher' publishers: - archive: - artifacts: '/root/endpoints.ini' + artifacts: 'endpoints.ini' allow-empty: false only-if-success: true fingerprint: true diff --git a/jjb/multisite/multisite-verify-jobs.yml b/jjb/multisite/multisite-verify-jobs.yml new file mode 100644 index 000000000..5ecfafb55 --- /dev/null +++ b/jjb/multisite/multisite-verify-jobs.yml @@ -0,0 +1,68 @@ +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: multisite + + project: '{name}' + + jobs: + - 'multisite-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + timed: '@midnight' + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true + timed: '' + +- job-template: + name: 'multisite-verify-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + 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' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - shell: | + #!/bin/bash + + echo "Hello World" diff --git a/jjb/multisite/multisite.yml b/jjb/multisite/multisite.yml deleted file mode 100644 index 8e542995e..000000000 --- a/jjb/multisite/multisite.yml +++ /dev/null @@ -1,158 +0,0 @@ -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### -- project: - name: multisite - - project: '{name}' - - jobs: - - 'multisite-verify-{stream}' - - 'multisite-kingbird-daily-{stream}' - - 'multisite-kingbird-deploy-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - timed: '@midnight' - - colorado: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - timed: '' - -- job-template: - name: 'multisite-verify-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - 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' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - - builders: - - shell: | - #!/bin/bash - - echo "Hello World" - -- job-template: - name: 'multisite-kingbird-daily-{stream}' - - project-type: freestyle - - disabled: '{obj:disabled}' - - concurrent: false - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: '{branch}' - - string: - name: KINGBIRD_LOG_FILE - default: $WORKSPACE/kingbird.log - - 'intel-virtual6-defaults' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-multisite-ha' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' - - triggers: - - timed: '{timed}' - - builders: - - trigger-builds: - - project: 'multisite-kingbird-deploy-{stream}' - current-parameters: true - same-node: true - block: true - - trigger-builds: - - project: 'functest-fuel-virtual-suite-{stream}' - current-parameters: true - predefined-parameters: - FUNCTEST_SUITE_NAME=multisite - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - -- job-template: - name: 'multisite-kingbird-deploy-{stream}' - - concurrent: false - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'gerrit' - - builders: - - 'multisite-kingbird-deploy' - - 'multisite-kingbird-log-upload' - -######################## -# builder macros -######################## -- builder: - name: 'multisite-kingbird-deploy' - builders: - - shell: | - #!/bin/bash - - $WORKSPACE/tools/kingbird/deploy.sh -- builder: - name: 'multisite-kingbird-log-upload' - builders: - - shell: | - #!/bin/bash - - echo "Here is where we upload kingbird logs to artifact repo" - echo "We just check the existence of log file" - ls -al $KINGBIRD_LOG_FILE diff --git a/jjb/netready/netready-gluon-build.sh b/jjb/netready/netready-gluon-build.sh new file mode 100755 index 000000000..141e84cbd --- /dev/null +++ b/jjb/netready/netready-gluon-build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +echo "Building Gluon packages." +echo "------------------------" +echo + +OPNFV_ARTIFACT_VERSION=$(echo $(date -u +"%Y%m%d")) + +# build all packages +cd $WORKSPACE/ci +./build-gluon-packages.sh + +# list the contents of BUILD_OUTPUT directory +echo "Build Directory is ${BUILD_DIRECTORY}" +echo "Build Directory Contents:" +echo "---------------------------------------" +ls -alR $BUILD_DIRECTORY + +# get version infos from Gluon from spec +GLUON_VERSION=$(grep Version: $BUILD_DIRECTORY/rpm_specs/gluon.spec | awk '{ print $2 }') +GLUON_RELEASE=$(grep 'define release' $BUILD_DIRECTORY/rpm_specs/gluon.spec | awk '{ print $3 }')_$OPNFV_ARTIFACT_VERSION + +ARTIFACT_NAME=gluon-$GLUON_VERSION-$GLUON_RELEASE.noarch.rpm +ARTIFACT_PATH=$BUILD_DIRECTORY/noarch/$ARTIFACT_NAME + +echo "Writing opnfv.properties file" +# save information regarding artifact into file +( + echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" + echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" + echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" + echo "OPNFV_ARTIFACT_URL=$GS_URL/$ARTIFACT_NAME" + echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $ARTIFACT_PATH | cut -d' ' -f1)" + echo "OPNFV_BUILD_URL=$BUILD_URL" + echo "ARTIFACT_LIST=$ARTIFACT_PATH" +) > $WORKSPACE/opnfv.properties + +echo "---------------------------------------" +echo "Done!" diff --git a/jjb/netready/netready-upload-gluon-packages.sh b/jjb/netready/netready-upload-gluon-packages.sh new file mode 100755 index 000000000..7c1e33727 --- /dev/null +++ b/jjb/netready/netready-upload-gluon-packages.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +echo "Uploading Gluon packages" +echo "--------------------------------------------------------" +echo + +source $WORKSPACE/opnfv.properties + +for artifact in $ARTIFACT_LIST; do + echo "Uploading artifact: ${artifact}" + gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.$(basename $artifact).log + echo "Upload complete for ${artifact}" +done + +gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log +gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.properties.log + +echo "--------------------------------------------------------" +echo "Upload done!" + +echo "Artifacts are not available as:" +for artifact in $ARTIFACT_LIST; do + echo "http://$GS_URL/$(basename $artifact)" +done diff --git a/jjb/netready/netready.yml b/jjb/netready/netready.yml index cc6769e92..382434ae6 100644 --- a/jjb/netready/netready.yml +++ b/jjb/netready/netready.yml @@ -5,16 +5,13 @@ jobs: - 'netready-verify-{stream}' + - 'netready-build-gluon-packages-daily-{stream}' stream: - master: branch: '{stream}' gs-pathname: '' disabled: false - - colorado: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'netready-verify-{stream}' @@ -24,13 +21,9 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -58,3 +51,59 @@ builders: - shell: | echo "Nothing to verify!" + + + +- job-template: + name: 'netready-build-gluon-packages-daily-{stream}' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'netready-parameter': + gs-pathname: '{gs-pathname}' + + scm: + - git-scm + + builders: + - 'netready-gluon-build' + + triggers: + - timed: '@midnight' + + +######################## +# builder macros +######################## + +- builder: + name: 'netready-gluon-build' + builders: + - shell: + !include-raw: ./netready-gluon-build.sh + - shell: + !include-raw: ./netready-upload-gluon-packages.sh + + +######################## +# parameter macros +######################## + +- parameter: + name: netready-parameter + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." diff --git a/jjb/octopus/octopus.yml b/jjb/octopus/octopus.yml index 741aa0905..cb66112fe 100644 --- a/jjb/octopus/octopus.yml +++ b/jjb/octopus/octopus.yml @@ -14,7 +14,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -27,15 +27,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/onosfw/onosfw.yml b/jjb/onosfw/onosfw.yml index 33ede475f..13c96718c 100644 --- a/jjb/onosfw/onosfw.yml +++ b/jjb/onosfw/onosfw.yml @@ -13,10 +13,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true project: 'onosfw' @@ -31,15 +31,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -75,13 +71,11 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '@midnight' @@ -100,6 +94,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - string: name: GS_URL @@ -107,10 +102,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'builder-onosfw-helloworld' diff --git a/jjb/openretriever/openretriever-project.yml b/jjb/openretriever/openretriever-project.yml new file mode 100644 index 000000000..3d53f9b2e --- /dev/null +++ b/jjb/openretriever/openretriever-project.yml @@ -0,0 +1,62 @@ +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: openretriever + + project: '{name}' + + jobs: + - 'openretriever-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +- job-template: + name: 'openretriever-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + 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' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - shell: | + echo "Nothing to verify!" diff --git a/jjb/opera/opera-daily-jobs.yml b/jjb/opera/opera-daily-jobs.yml new file mode 100644 index 000000000..d49caf1a6 --- /dev/null +++ b/jjb/opera/opera-daily-jobs.yml @@ -0,0 +1,147 @@ +- project: + name: 'opera-daily-jobs' + + project: 'opera' + +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + +##################################### +# patch verification phases +##################################### + phase: + - 'basic' + - 'deploy' + +##################################### +# jobs +##################################### + jobs: + - 'opera-daily-{stream}' + - 'opera-daily-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'opera-daily-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + + - timeout: + timeout: 240 + fail: true + + triggers: + - timed: '@midnight' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'huawei-virtual7-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'opera-daily-basic-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'compass-deploy-virtual-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openo-noha + COMPASS_OS_VERSION=xenial + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true +# - multijob: +# name: functest +# condition: SUCCESSFUL +# projects: +# - name: 'functest-compass-baremetal-suite-{stream}' +# current-parameters: false +# predefined-parameters: +# FUNCTEST_SUITE_NAME=opera +# node-parameters: true +# kill-phase-on: NEVER +# abort-all-job: true + +- job-template: + name: 'opera-daily-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-daily-{phase}-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-daily-basic-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + +- builder: + name: 'opera-daily-deploy-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + diff --git a/jjb/opera/opera-project-jobs.yml b/jjb/opera/opera-project-jobs.yml new file mode 100644 index 000000000..38efbc159 --- /dev/null +++ b/jjb/opera/opera-project-jobs.yml @@ -0,0 +1,57 @@ +- project: + + name: opera-project + + project: 'opera' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + + jobs: + - 'opera-build-{stream}' + +######################## +# job templates +######################## +- job-template: + name: 'opera-build-{stream}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm + + triggers: + - timed: 'H 23 * * *' + + builders: + - 'opera-build-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-build-macro' + builders: + - shell: | + #!/bin/bash + + echo "Hello world!" + + diff --git a/jjb/opera/opera-verify-jobs.yml b/jjb/opera/opera-verify-jobs.yml new file mode 100644 index 000000000..b7b5cb3c9 --- /dev/null +++ b/jjb/opera/opera-verify-jobs.yml @@ -0,0 +1,156 @@ +- project: + name: 'opera-verify-jobs' + + project: 'opera' + +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + +##################################### +# patch verification phases +##################################### + phase: + - 'basic' + - 'deploy' + +##################################### +# jobs +##################################### + jobs: + - 'opera-verify-{stream}' + - 'opera-verify-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'opera-verify-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + scm: + - git-scm-gerrit + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + 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' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'huawei-pod7-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'opera-verify-basic-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'opera-verify-deploy-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'opera-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + scm: + - git-scm-gerrit + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-verify-basic-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + +- builder: + name: 'opera-verify-deploy-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 724ef6aab..12950338d 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -17,10 +17,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true ######################## # job templates @@ -34,7 +34,6 @@ parameters: - project-parameter: project: $GERRIT_PROJECT - - gerrit-parameter: branch: '{branch}' - string: name: GIT_CLONE_BASE @@ -42,10 +41,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -78,7 +74,6 @@ parameters: - project-parameter: project: $GERRIT_PROJECT - - gerrit-parameter: branch: '{branch}' - string: name: GIT_CLONE_BASE @@ -90,10 +85,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm triggers: - gerrit: @@ -120,6 +112,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - string: name: GS_URL default: '$GS_BASE{gs-pathname}' @@ -128,16 +121,9 @@ name: GIT_CLONE_BASE default: ssh://gerrit.opnfv.org:29418 description: "Used for overriding the GIT URL coming from parameters macro." - - string: - name: GERRIT_BRANCH - default: '{branch}' - description: 'Specify the branch in this way in order to be able to use build-opnfv-composite-docs builder.' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '0 H/6 * * *' @@ -145,4 +131,3 @@ builders: - build-html-and-pdf-docs-output # - upload-generated-docs-to-opnfv-artifacts - diff --git a/jjb/opnfvdocs/project.cfg b/jjb/opnfvdocs/project.cfg index 186e0ea74..1ea05c1d4 100644 --- a/jjb/opnfvdocs/project.cfg +++ b/jjb/opnfvdocs/project.cfg @@ -24,6 +24,7 @@ movie multisite octopus onosfw +openretriever ovno ovsnfv parser diff --git a/jjb/ovsnfv/ovsnfv.yml b/jjb/ovsnfv/ovsnfv.yml index 28d268379..937a367fb 100644 --- a/jjb/ovsnfv/ovsnfv.yml +++ b/jjb/ovsnfv/ovsnfv.yml @@ -13,10 +13,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true - job-template: name: 'ovsnfv-verify-{stream}' @@ -26,7 +26,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-centos-defaults' - string: @@ -35,10 +34,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -76,7 +72,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-centos-defaults' - string: @@ -85,10 +80,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - timeout: @@ -125,6 +117,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-centos-defaults' - string: name: GS_URL @@ -132,10 +125,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - timeout: diff --git a/jjb/parser/parser.yml b/jjb/parser/parser.yml index cd6c6e093..69fcefc20 100644 --- a/jjb/parser/parser.yml +++ b/jjb/parser/parser.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 92216ee35..6dae9f33c 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/prediction/prediction.yml b/jjb/prediction/prediction.yml index 951188ce2..b380d8c86 100644 --- a/jjb/prediction/prediction.yml +++ b/jjb/prediction/prediction.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/promise/promise.yml b/jjb/promise/promise.yml index f620f6f9e..a5aa302c7 100644 --- a/jjb/promise/promise.yml +++ b/jjb/promise/promise.yml @@ -15,7 +15,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -28,15 +28,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/qtip/qtip-cleanup.sh b/jjb/qtip/helpers/cleanup-deploy.sh index 95babb318..95babb318 100644 --- a/jjb/qtip/qtip-cleanup.sh +++ b/jjb/qtip/helpers/cleanup-deploy.sh diff --git a/jjb/qtip/qtip-daily-ci.sh b/jjb/qtip/helpers/validate-deploy.sh index 4fdc04345..16455371f 100644 --- a/jjb/qtip/qtip-daily-ci.sh +++ b/jjb/qtip/helpers/validate-deploy.sh @@ -27,12 +27,7 @@ if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then else echo "The container ID is: ${container_id}" QTIP_REPO=/home/opnfv/repos/qtip - - echo "Run Qtip test" - docker exec -t ${container_id} $QTIP_REPO/docker/run_qtip.sh - - echo "Pushing available results to DB" - docker exec -t ${container_id} $QTIP_REPO/docker/push_db.sh +# TODO(yujunz): execute benchmark plan for compute-qpi fi echo "Qtip done!" diff --git a/jjb/qtip/helpers/validate-setup.sh b/jjb/qtip/helpers/validate-setup.sh new file mode 100644 index 000000000..8d84e120c --- /dev/null +++ b/jjb/qtip/helpers/validate-setup.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +############################################################################## +# Copyright (c) 2017 ZTE 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 -e + +# setup virtualenv +sudo pip install -u virtualenv virtualenvwrapper +export WORKON_HOME=$HOME/.virtualenvs +source /usr/local/bin/virtualenvwrapper.sh +mkvirtualenv qtip +workon qtip + +# setup qtip +sudo pip install $HOME/repos/qtip + +# testing +qtip --version +qtip --help diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml deleted file mode 100644 index ac9854365..000000000 --- a/jjb/qtip/qtip-ci-jobs.yml +++ /dev/null @@ -1,102 +0,0 @@ -#################################### -# job configuration for qtip -#################################### -- project: - name: qtip - - project: 'qtip' - -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- - master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# master -#-------------------------------- - pod: - - zte-pod2: - installer: fuel - auto-trigger-name: 'qtip-daily-zte-pod2-trigger' - <<: *master - - zte-pod3: - installer: fuel - auto-trigger-name: 'qtip-daily-zte-pod3-trigger' - <<: *master - -#-------------------------------- - jobs: - - 'qtip-{installer}-{pod}-daily-{stream}' - -################################ -# job templates -################################ -- job-template: - name: 'qtip-{installer}-{pod}-daily-{stream}' - - disabled: false - - parameters: - - project-parameter: - project: '{project}' - - '{installer}-defaults' - - '{pod}-defaults' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' - - triggers: - - '{auto-trigger-name}' - - builders: - - description-setter: - description: "POD: $NODE_NAME" - - 'qtip-cleanup' - - 'qtip-daily-ci' - - publishers: - - email: - recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn - -########################### -#biuilder macros -########################### -- builder: - name: qtip-daily-ci - builders: - - shell: - !include-raw: ./qtip-daily-ci.sh - -- builder: - name: qtip-cleanup - builders: - - shell: - !include-raw: ./qtip-cleanup.sh - -################# -#trigger macros -################# -- trigger: - name: 'qtip-daily-zte-pod2-trigger' - triggers: - - timed: '0 7 * * *' - -- trigger: - name: 'qtip-daily-zte-pod3-trigger' - triggers: - - timed: '0 1 * * *' diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml new file mode 100644 index 000000000..98f7ab90a --- /dev/null +++ b/jjb/qtip/qtip-validate-jobs.yml @@ -0,0 +1,141 @@ +####################### +# validate after MERGE +####################### +- project: + name: qtip + project: qtip + +#-------------------------------- +# BRANCH ANCHORS +#-------------------------------- + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: latest + +#-------------------------------- +# JOB VARIABLES +#-------------------------------- + pod: + - zte-pod2: + installer: fuel + <<: *master + - zte-pod3: + installer: fuel + <<: *master + task: + - daily: + auto-builder-name: qtip-validate-deploy + auto-trigger-name: 'qtip-daily-{pod}-trigger' + - validate: + auto-builder-name: qtip-validate-setup + auto-trigger-name: qtip-validate-trigger + - experimental: + auto-builder-name: qtip-validate-setup + auto-trigger-name: experimental + +#-------------------------------- +# JOB LIST +#-------------------------------- + jobs: + - 'qtip-{task}-{installer}-{pod}-{stream}' + +################################ +# job templates +################################ +- job-template: + name: 'qtip-{task}-{installer}-{pod}-{stream}' + disabled: false + parameters: + - qtip-common-parameters: + project: '{project}' + <<: *master + - '{installer}-defaults' + - '{pod}-defaults' + scm: + - git-scm + triggers: + - '{auto-trigger-name}' + builders: + - qtip-common-builders + - '{auto-builder-name}' + publishers: + - qtip-common-publishers + +################ +# MARCOS +################ + +#--------- +# builder +#--------- + +- builder: + name: qtip-common-builders + builders: + - description-setter: + description: "POD: $NODE_NAME" + +- builder: + name: qtip-validate-deploy + builders: + - shell: + !include-raw: ./helpers/validate-deploy.sh + - shell: + !include-raw: ./helpers/cleanup-deploy.sh + +- builder: + name: qtip-validate-setup + builders: + - shell: + !include-raw: ./helpers/validate-setup.sh + +#----------- +# parameter +#----------- + +- parameter: + name: qtip-common-parameters + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + +#----------- +# publisher +#----------- + +- publisher: + name: qtip-common-publishers + publishers: + - email: + recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn + +#--------- +# trigger +#--------- + +- trigger: + name: qtip-daily-zte-pod2-trigger + triggers: + - timed: '0 7 * * *' + +- trigger: + name: qtip-daily-zte-pod3-trigger + triggers: + - timed: '0 1 * * *' + +- trigger: + name: qtip-validate-trigger + triggers: + - gerrit-trigger-change-merged: + project: '{project}' + branch: '{branch}' diff --git a/jjb/qtip/qtip-project-jobs.yml b/jjb/qtip/qtip-verify-jobs.yml index 8798fd115..d1fc34d11 100644 --- a/jjb/qtip/qtip-project-jobs.yml +++ b/jjb/qtip/qtip-verify-jobs.yml @@ -1,11 +1,12 @@ -- project: - name: qtip-project-jobs - - project: 'qtip' +###################### +# verify before MERGE +###################### +- project: + name: qtip-verify-jobs + project: qtip jobs: - 'qtip-verify-{stream}' - stream: - master: branch: '{stream}' @@ -23,15 +24,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/releng/artifact-cleanup.yml b/jjb/releng/artifact-cleanup.yml index 1c609a4b2..2d0205660 100644 --- a/jjb/releng/artifact-cleanup.yml +++ b/jjb/releng/artifact-cleanup.yml @@ -27,12 +27,10 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H H * * *' diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml new file mode 100644 index 000000000..09c9f335e --- /dev/null +++ b/jjb/releng/opnfv-docker-arm.yml @@ -0,0 +1,77 @@ +############################################## +# job configuration for docker build and push +############################################## + +- project: + + name: opnfv-docker-arm + + master: &master + stream: master + branch: '{stream}' + disabled: false + danube: &danube + stream: danube + branch: 'stable/{stream}' + disabled: true + functest-arm-receivers: &functest-arm-receivers + receivers: > + cristina.pauna@enea.com + alexandru.avadanii@enea.com + other-receivers: &other-receivers + receivers: '' + + project: + # projects with jobs for master + - 'functest': + <<: *master + <<: *functest-arm-receivers + # projects with jobs for stable + + jobs: + - '{project}-docker-build-arm-push-{stream}' + +######################## +# job templates +######################## +- job-template: + name: '{project}-docker-build-arm-push-{stream}' + + disabled: '{obj:disabled}' + + parameters: ¶meters + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-arm-defaults' + - string: + name: PUSH_IMAGE + default: "true" + description: "To enable/disable pushing the image to Dockerhub." + - string: + name: DOCKER_REPO_NAME + default: "opnfv/{project}_aarch64" + description: "Dockerhub repo to be pushed to." + - string: + name: RELEASE_VERSION + default: "" + description: "Release version, e.g. 1.0, 2.0, 3.0" + - string: + name: DOCKERFILE + default: "Dockerfile.aarch64" + description: "Dockerfile to use for creating the image." + + scm: + - git-scm + + builders: &builders + - shell: + !include-raw-escape: ./opnfv-docker.sh + + triggers: + - pollscm: + cron: "*/30 * * * *" + + publishers: + - email: + recipients: '{receivers}' diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index e26727abf..c906e1fcd 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -12,6 +12,7 @@ set -o nounset set -o pipefail + echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..." echo "--------------------------------------------------------" echo @@ -51,23 +52,20 @@ if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then done fi - -# cd to directory where Dockerfile is located cd $WORKSPACE/docker -if [ ! -f ./Dockerfile ]; then +if [ ! -f ${DOCKERFILE} ]; then echo "ERROR: Dockerfile not found." exit 1 fi # Get tag version -branch="${GIT_BRANCH##origin/}" -echo "Current branch: $branch" +echo "Current branch: $BRANCH" -if [[ "$branch" == "master" ]]; then +if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" else if [[ "$RELEASE_VERSION" != "" ]]; then - release=$(echo $branch|sed 's/.*\///') + release=${BRANCH##*/} DOCKER_TAG=${release}.${RELEASE_VERSION} # e.g. colorado.1.0, colorado.2.0, colorado.3.0 else @@ -79,7 +77,8 @@ fi 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 ." +cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH + -f $DOCKERFILE ." echo ${cmd} ${cmd} diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 7a4c9af51..90a91f802 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -10,41 +10,74 @@ stream: master branch: '{stream}' disabled: false - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' - disabled: false + disabled: true + functest-receivers: &functest-receivers + receivers: > + jose.lausuch@ericsson.com morgan.richomme@orange.com + cedric.ollivier@orange.com feng.xiaowei@zte.com.cn + yaohelan@huawei.com helanyao@gmail.com + juha.kosonen@nokia.com + other-receivers: &other-receivers + receivers: '' project: # projects with jobs for master - 'bottlenecks': <<: *master + <<: *other-receivers - 'cperf': <<: *master + <<: *other-receivers - 'dovetail': <<: *master + <<: *other-receivers - 'functest': <<: *master + <<: *functest-receivers - 'qtip': <<: *master + <<: *other-receivers - 'storperf': <<: *master + <<: *other-receivers - 'yardstick': <<: *master + <<: *other-receivers # projects with jobs for stable - 'bottlenecks': - <<: *colorado + <<: *danube + <<: *other-receivers - 'functest': - <<: *colorado + <<: *danube + <<: *functest-receivers - 'storperf': - <<: *colorado + <<: *danube + <<: *other-receivers - 'yardstick': - <<: *colorado + <<: *danube + <<: *other-receivers jobs: - '{project}-docker-build-push-{stream}' +- project: + + name: opnfv-monitor-docker # projects which only monitor dedicated file or path + + project: + # projects with jobs for master + - 'daisy': + <<: *master + - 'escalator': + <<: *master + + jobs: + - '{project}-docker-build-push-monitor-{stream}' + ######################## # job templates ######################## @@ -53,9 +86,10 @@ disabled: '{obj:disabled}' - parameters: + parameters: ¶meters - project-parameter: project: '{project}' + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - string: name: PUSH_IMAGE @@ -69,14 +103,15 @@ name: RELEASE_VERSION default: "" description: "Release version, e.g. 1.0, 2.0, 3.0" + - string: + name: DOCKERFILE + default: "Dockerfile" + description: "Dockerfile to use for creating the image." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm - builders: + builders: &builders - shell: !include-raw-escape: ./opnfv-docker.sh @@ -84,3 +119,32 @@ - pollscm: cron: "*/30 * * * *" + publishers: + - email: + recipients: '{receivers}' + +- job-template: + name: '{project}-docker-build-push-monitor-{stream}' + disabled: '{obj:disabled}' + parameters: *parameters + scm: + - git-scm + builders: *builders + + # trigger only matching the file name + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'docker/**' + diff --git a/jjb/releng/opnfv-docs.yml b/jjb/releng/opnfv-docs.yml index a18374592..f4b25017e 100644 --- a/jjb/releng/opnfv-docs.yml +++ b/jjb/releng/opnfv-docs.yml @@ -17,11 +17,11 @@ doc-version: '' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' doc-version: '3.0' gs-pathname: '/{stream}/{doc-version}' - disabled: false + disabled: true ######################## # job templates @@ -35,14 +35,10 @@ parameters: - project-parameter: project: $GERRIT_PROJECT - - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -80,7 +76,6 @@ parameters: - project-parameter: project: $GERRIT_PROJECT - - gerrit-parameter: branch: '{branch}' - string: name: GS_URL @@ -92,10 +87,7 @@ description: "JJB configured GERRIT_REFSPEC parameter" scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm triggers: - gerrit: diff --git a/jjb/releng/opnfv-lint.yml b/jjb/releng/opnfv-lint.yml index c2624debc..4de47e87e 100644 --- a/jjb/releng/opnfv-lint.yml +++ b/jjb/releng/opnfv-lint.yml @@ -9,13 +9,14 @@ jobs: - 'opnfv-lint-verify-{stream}' + - 'opnfv-yamllint-verify-{stream}' stream: - master: branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -32,14 +33,10 @@ parameters: - project-parameter: project: $GERRIT_PROJECT - - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -67,3 +64,54 @@ builders: - lint-python-code - report-lint-result-to-gerrit + +- job-template: + name: 'opnfv-yamllint-verify-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - node: + name: SLAVE_NAME + description: Slaves to execute yamllint + default-slaves: + - lf-build1 + allowed-multiselect: true + ignore-offline-nodes: true + + scm: + - git-scm-gerrit + + 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' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'REG_EXP' + project-pattern: 'compass4nfv' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*.yml' + - compare-type: ANT + pattern: '**/*.yaml' + + builders: + - lint-yaml-code + - report-lint-result-to-gerrit diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index fc77c2d48..ecc87303f 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -13,13 +13,9 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -67,14 +63,10 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -110,14 +102,10 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '@hourly' diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml new file mode 100644 index 000000000..dd76538a3 --- /dev/null +++ b/jjb/releng/testapi-automate.yml @@ -0,0 +1,273 @@ +- project: + name: testapi-automate + stream: + - master: + branch: '{stream}' + gs-pathname: '' + + phase: + - 'docker-update' + - 'docker-deploy': + slave-label: 'testresults' + - 'generate-doc' + + jobs: + - 'testapi-automate-{stream}' + - 'testapi-automate-{phase}-{stream}' + - 'testapi-verify-{stream}' + + project: 'releng' + +- job: + name: 'testapi-mongodb-backup' + + parameters: + - label: + name: SLAVE_LABEL + default: 'testresults' + description: 'Slave label on Jenkins' + - project-parameter: + project: 'releng' + branch: 'master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/releng + description: 'Git URL to use on this Jenkins Slave' + + scm: + - git-scm + + triggers: + - timed: '@weekly' + + builders: + - mongodb-backup + +- job-template: + name: 'testapi-verify-{stream}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + 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' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'utils/test/testapi/**' + + builders: + - run-unit-tests + + publishers: + - junit: + results: nosetests.xml + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "false" + stability-auto-update: "false" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 + +- job-template: + name: 'testapi-automate-{stream}' + + project-type: multijob + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DOCKER_TAG + default: "latest" + description: "Tag name for testapi docker image" + - 'opnfv-build-defaults' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + + 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: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'utils/test/testapi/**' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: docker-update + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-docker-update-{stream}' + current-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: docker-deploy + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-docker-deploy-{stream}' + current-parameters: false + predefined-parameters: | + GIT_BASE=$GIT_BASE + node-label-name: SLAVE_LABEL + node-label: testresults + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: generate-doc + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-generate-doc-{stream}' + current-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + + publishers: + - 'email-publisher' + +- job-template: + name: 'testapi-automate-{phase}-{stream}' + + properties: + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DOCKER_TAG + default: "latest" + description: "Tag name for testapi docker image" + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + scm: + - git-scm + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'testapi-automate-{phase}-macro' + +################################ +# job builders +################################ +- builder: + name: mongodb-backup + builders: + - shell: | + bash ./jjb/releng/testapi-backup-mongodb.sh + +- builder: + name: 'run-unit-tests' + builders: + - shell: | + bash ./utils/test/testapi/run_test.sh + +- builder: + name: 'testapi-automate-docker-update-macro' + builders: + - shell: | + bash ./jjb/releng/testapi-docker-update.sh + +- builder: + name: 'testapi-automate-generate-doc-macro' + builders: + - 'testapi-doc-build' + - 'upload-doc-artifact' + +- builder: + name: 'testapi-doc-build' + builders: + - shell: | + bash ./utils/test/testapi/htmlize/doc-build.sh + +- builder: + name: 'upload-doc-artifact' + builders: + - shell: | + bash ./utils/test/testapi/htmlize/push-doc-artifact.sh + +- builder: + name: 'testapi-automate-docker-deploy-macro' + builders: + - shell: | + bash ./jjb/releng/testapi-docker-deploy.sh + +################################ +# job publishers +################################ + +- publisher: + name: 'email-publisher' + publishers: + - email: + recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn + notify-every-unstable-build: false + send-to-individuals: true diff --git a/jjb/releng/testapi-backup-mongodb.sh b/jjb/releng/testapi-backup-mongodb.sh new file mode 100644 index 000000000..8dba17beb --- /dev/null +++ b/jjb/releng/testapi-backup-mongodb.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +# Run MongoDB backup +python $WORKSPACE/utils/test/testapi/update/templates/backup_mongodb.py -o $WORKSPACE/ + +# Compressing the dump +now=$(date +"%m_%d_%Y_%H_%M_%S") +echo $now + +file_name="testapi_mongodb_"$now".tar.gz" +echo $file_name + +tar cvfz "$file_name" test_results_collection* + +rm -rf test_results_collection* + +artifact_dir="testapibackup" +workspace="$WORKSPACE" + +set +e +/usr/local/bin/gsutil &>/dev/null +if [ $? != 0 ]; then + echo "Not possible to push results to artifact: gsutil not installed" + exit 1 +else + echo "Uploading mongodump to artifact $artifact_dir" + /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://artifacts.opnfv.org/"$artifact_dir"/ + echo "MongoDump can be found at http://artifacts.opnfv.org/$artifact_dir" +fi diff --git a/jjb/releng/testapi-docker-deploy.sh b/jjb/releng/testapi-docker-deploy.sh new file mode 100644 index 000000000..b4e60b09a --- /dev/null +++ b/jjb/releng/testapi-docker-deploy.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function check() { + + # Verify hosted + sleep 5 + cmd=`curl -s --head --request GET http://testresults.opnfv.org/test/swagger/spec | grep '200 OK' > /dev/null` + rc=$? + echo $rc + + if [[ $rc == 0 ]] + then + return 0 + else + return 1 + fi + +} + +echo "Getting contianer Id of the currently running one" +contId=$(sudo docker ps | grep "opnfv/testapi:latest" | awk '{print $1}') + +echo "Pulling the latest image" +sudo docker pull opnfv/testapi:latest + +echo "Deleting old containers of opnfv/testapi:old" +sudo docker ps -a | grep "opnfv/testapi" | grep "old" | awk '{print $1}' | xargs -r sudo docker rm -f + +echo "Deleting old images of opnfv/testapi:latest" +sudo docker images | grep "opnfv/testapi" | grep "old" | awk '{print $3}' | xargs -r sudo docker rmi -f + + +if [[ -z "$contId" ]] +then + echo "No running testapi container" + + echo "Removing stopped testapi containers in the previous iterations" + sudo docker ps -f status=exited | grep "opnfv_testapi" | awk '{print $1}' | xargs -r sudo docker rm -f +else + echo $contId + + echo "Get the image id of the currently running conatiner" + currImgId=$(sudo docker ps | grep "$contId" | awk '{print $2}') + echo $currImgId + + if [[ -z "$currImgId" ]] + then + echo "No image id found for the container id" + exit 1 + fi + + echo "Changing current image tag to old" + sudo docker tag "$currImgId" opnfv/testapi:old + + echo "Removing stopped testapi containers in the previous iteration" + sudo docker ps -f status=exited | grep "opnfv_testapi" | awk '{print $1}' | xargs -r sudo docker rm -f + + echo "Renaming the running container name to opnfv_testapi as to identify it." + sudo docker rename $contId opnfv_testapi + + echo "Stop the currently running container" + sudo docker stop $contId +fi + +echo "Running a container with the new image" +sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:latest + +if check; then + echo "TestResults Hosted." +else + echo "TestResults Hosting Failed" + if [[ $(sudo docker images | grep "opnfv/testapi" | grep "old" | awk '{print $3}') ]]; then + echo "Running old Image" + sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:old + exit 1 + fi +fi + +# Echo Images and Containers +sudo docker images +sudo docker ps -a diff --git a/jjb/releng/testapi-docker-update.sh b/jjb/releng/testapi-docker-update.sh new file mode 100644 index 000000000..84f5c3217 --- /dev/null +++ b/jjb/releng/testapi-docker-update.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -o errexit +set -o nounset + +cd $WORKSPACE/utils/test/testapi/docker/ + +# Remove previous containers +docker ps -a | grep "opnfv/testapi" | awk '{ print $1 }' | xargs -r docker rm -f + +# Remove previous images +docker images | grep "opnfv/testapi" | awk '{ print $3 }' | xargs -r docker rmi -f + +# Start build +docker build --no-cache -t opnfv/testapi:$DOCKER_TAG . + +# Push Image +docker push opnfv/testapi:$DOCKER_TAG diff --git a/jjb/securityscanning/opnfv-security-scan.yml b/jjb/securityaudit/opnfv-security-audit.yml index 546f4e7e5..732df8925 100644 --- a/jjb/securityscanning/opnfv-security-scan.yml +++ b/jjb/securityaudit/opnfv-security-audit.yml @@ -8,7 +8,7 @@ project: anteaterfw jobs: - - 'opnfv-security-scan-verify-{stream}' + - 'opnfv-security-audit-verify-{stream}' stream: - master: @@ -20,21 +20,17 @@ # job templates ######################## - job-template: - name: 'opnfv-security-scan-verify-{stream}' + name: 'opnfv-security-audit-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' + - git-scm-gerrit triggers: - gerrit: @@ -65,13 +61,13 @@ notbuilt: true builders: - - security-scan-python-code - - report-security-scan-result-to-gerrit + - security-audit-python-code + - report-security-audit-result-to-gerrit ######################## # builder macros ######################## - builder: - name: security-scan-python-code + name: security-audit-python-code builders: - shell: | #!/bin/bash @@ -80,10 +76,10 @@ set -o xtrace export PATH=$PATH:/usr/local/bin/ - # this is where the security/license scan script will be executed + # this is where the security/license audit script will be executed echo "Hello World!" - builder: - name: report-security-scan-result-to-gerrit + name: report-security-audit-result-to-gerrit builders: - shell: | #!/bin/bash @@ -93,15 +89,15 @@ export PATH=$PATH:/usr/local/bin/ # If no violations were found, no lint log will exist. - if [[ -e securityscan.log ]] ; then - echo -e "\nposting security scan report to gerrit...\n" + if [[ -e securityaudit.log ]] ; then + echo -e "\nposting security audit report to gerrit...\n" - cat securityscan.log + cat securityaudit.log echo ssh -p 29418 gerrit.opnfv.org \ "gerrit review -p $GERRIT_PROJECT \ - -m \"$(cat securityscan.log)\" \ + -m \"$(cat securityaudit.log)\" \ $GERRIT_PATCHSET_REVISION \ --notify NONE" diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index 4e72af50b..a04a9f4b4 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -13,10 +13,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true - job-template: name: 'storperf-verify-{stream}' @@ -28,7 +28,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: GIT_BASE @@ -36,10 +35,7 @@ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -92,18 +88,14 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: - branch: 'master' + branch: '{branch}' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -150,19 +142,16 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: opnfv-build-ubuntu - - disabled: true + disabled: '{obj:disabled}' parameters: - project-parameter: project: '{project}' + branch: '{branch}' + - 'intel-pod9-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H H * * *' diff --git a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml index 6dd3acf3a..450599eaf 100644 --- a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml +++ b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml @@ -11,7 +11,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -24,13 +24,9 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index cda5128e2..ef0e90a76 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -15,11 +15,11 @@ gs-pathname: '' disabled: false slave-label: 'opnfv-build-ubuntu' - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false - slave-label: 'intel-pod3' + disabled: true + slave-label: 'intel-pod12' - job-template: @@ -30,13 +30,11 @@ parameters: - project-parameter: project: '{project}' - - 'intel-pod3-defaults' + branch: '{branch}' + - 'intel-pod12-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - pollscm: @@ -47,7 +45,7 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 10" # run basic sanity test make sanity cd ../ci @@ -63,6 +61,7 @@ concurrent: true properties: + - logrotate-default - build-blocker: use-build-blocker: true blocking-jobs: @@ -73,15 +72,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -111,7 +106,7 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 5" # run basic sanity test make sanity cd ../ci @@ -127,6 +122,7 @@ concurrent: true properties: + - logrotate-default - build-blocker: use-build-blocker: true blocking-jobs: @@ -137,15 +133,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - '{slave-label}-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -169,6 +161,6 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 5" cd ../ci ./build-vsperf.sh merge diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 9d80e42ae..604eaed25 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -14,8 +14,8 @@ branch: '{stream}' gs-pathname: '' docker-tag: 'latest' - colorado: &colorado - stream: colorado + danube: &danube + stream: danube branch: 'stable/{stream}' gs-pathname: '{stream}' docker-tag: 'stable' @@ -43,12 +43,12 @@ slave-label: fuel-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - virtual: slave-label: fuel-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube # armband CI PODs - armband-baremetal: slave-label: armband-baremetal @@ -64,12 +64,12 @@ slave-label: armband-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - armband-virtual: slave-label: armband-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube # joid CI PODs - baremetal: slave-label: joid-baremetal @@ -85,12 +85,12 @@ slave-label: joid-baremetal installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - virtual: slave-label: joid-virtual installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube # compass CI PODs - baremetal: @@ -107,12 +107,12 @@ slave-label: compass-baremetal installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - virtual: slave-label: compass-virtual installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube #-------------------------------- # Installers not using labels # CI PODs @@ -128,7 +128,7 @@ slave-label: '{pod}' installer: apex auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube #-------------------------------- # None-CI PODs #-------------------------------- @@ -146,7 +146,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - zte-pod2: slave-label: '{pod}' installer: fuel @@ -161,7 +161,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - arm-pod2: slave-label: '{pod}' installer: fuel @@ -171,7 +171,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - arm-pod3: slave-label: '{pod}' installer: fuel @@ -181,7 +181,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *colorado + <<: *danube - orange-pod2: slave-label: '{pod}' installer: joid @@ -197,8 +197,8 @@ installer: compass auto-trigger-name: 'yardstick-daily-huawei-pod4-trigger' <<: *master - - huawei-pod5: - slave-label: '{pod}' + - baremetal-centos: + slave-label: 'intel-pod8' installer: compass auto-trigger-name: 'daily-trigger-disabled' <<: *master @@ -220,6 +220,7 @@ concurrent: true properties: + - logrotate-default - throttle: enabled: true max-per-node: 1 @@ -238,6 +239,7 @@ parameters: - project-parameter: project: '{project}' + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' - 'yardstick-params-{slave-label}' @@ -258,10 +260,7 @@ description: "Show debut output information" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: @@ -269,6 +268,7 @@ - 'yardstick-cleanup' #- 'yardstick-fetch-os-creds' - 'yardstick-{testsuite}' + - 'yardstick-store-results' publishers: - email: @@ -296,6 +296,12 @@ !include-raw: ../../utils/fetch_os_creds.sh - builder: + name: yardstick-store-results + builders: + - shell: + !include-raw: ../../utils/push-test-logs.sh + +- builder: name: yardstick-cleanup builders: - shell: @@ -375,15 +381,6 @@ name: YARDSTICK_DB_BACKEND default: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - -- parameter: - name: 'yardstick-params-huawei-pod5' - parameters: - - string: - name: YARDSTICK_DB_BACKEND - default: '-i 104.197.68.199:8086' - description: 'Arguments to use in order to choose the backend DB' - - parameter: name: 'yardstick-params-zte-pod1' parameters: diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index b3705415f..f769e9cdd 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -31,14 +31,21 @@ fi opts="--privileged=true --rm" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \ - -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" + -e YARDSTICK_BRANCH=${BRANCH} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" # Pull the image with correct tag echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}" docker pull opnfv/yardstick:$DOCKER_TAG >$redirect +# map log directory +branch=${BRANCH##*/} +dir_result="${HOME}/opnfv/yardstick/results/${branch}" +mkdir -p ${dir_result} +sudo rm -rf ${dir_result}/* +map_log_dir="-v ${dir_result}:/tmp/yardstick" + # Run docker -cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \ +cmd="sudo docker run ${opts} ${envs} ${labconfig} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \ exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" echo "Yardstick: Running docker cmd: ${cmd}" ${cmd} diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml index afa6b7844..bbfa152a2 100644 --- a/jjb/yardstick/yardstick-project-jobs.yml +++ b/jjb/yardstick/yardstick-project-jobs.yml @@ -16,7 +16,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - colorado: + - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -33,15 +33,11 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -73,7 +69,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - string: @@ -82,10 +77,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -116,18 +108,8 @@ set -o errexit set -o pipefail + sudo apt-get install -y build-essential python-dev python3-dev + echo "Running unit tests..." cd $WORKSPACE - virtualenv $WORKSPACE/yardstick_venv - source $WORKSPACE/yardstick_venv/bin/activate - - # install python packages - easy_install -U setuptools - easy_install -U pip - pip install -r requirements.txt || pip install -r tests/ci/requirements.txt - pip install -e . - - # unit tests - ./run_tests.sh - - deactivate + tox |