diff options
Diffstat (limited to 'jjb')
155 files changed, 14731 insertions, 13399 deletions
diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index a937acbed..863eb94dd 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -1,37 +1,39 @@ +--- - project: name: 'netvirt' project: 'netvirt' installer: 'netvirt' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - carbon: - branch: 'stable/carbon' - gs-pathname: '' - disabled: false -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - carbon: + branch: 'stable/carbon' + gs-pathname: '' + disabled: false + ##################################### + # patch verification phases + ##################################### phase: - - 'create-apex-vms': - slave-label: 'odl-netvirt-virtual-intel' - - 'install-netvirt': - slave-label: 'odl-netvirt-virtual-intel' - - 'postprocess': - slave-label: 'odl-netvirt-virtual-intel' -##################################### -# jobs -##################################### + - 'create-apex-vms': + slave-label: 'odl-netvirt-virtual-intel' + - 'install-netvirt': + slave-label: 'odl-netvirt-virtual-intel' + - 'postprocess': + slave-label: 'odl-netvirt-virtual-intel' + ##################################### + # jobs + ##################################### jobs: - - 'odl-netvirt-verify-virtual-{stream}' - - 'odl-netvirt-verify-virtual-{phase}-{stream}' + - 'odl-netvirt-verify-virtual-{stream}' + - 'odl-netvirt-verify-virtual-{phase}-{stream}' + ##################################### # job templates ##################################### @@ -45,116 +47,119 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 5 - max-per-node: 1 - option: 'project' + - 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 + - git: + url: https://gerrit.opnfv.org/gerrit/apex + branches: + - 'origin/master' + timeout: 15 + wipe-workspace: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: NETVIRT_ARTIFACT - default: distribution-karaf.tar.gz - - 'odl-netvirt-virtual-intel-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: NETVIRT_ARTIFACT + 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: 'opnfv-test' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - readable-message: true + - gerrit: + server-name: 'git.opendaylight.org' + trigger-on: + # yamllint disable rule:line-length + # - 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' + # yamllint enable rule:line-length + - comment-added-contains-event: + comment-contains-value: 'opnfv-test' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + readable-message: true builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: create-apex-vms - condition: SUCCESSFUL - projects: - - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}' - current-parameters: false - predefined-parameters: | - BRANCH=$BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID - GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER - GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION - NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT - APEX_ENV_NUMBER=$APEX_ENV_NUMBER - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: install-netvirt - condition: SUCCESSFUL - projects: - - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}' - current-parameters: false - predefined-parameters: | - ODL_BRANCH={branch} - BRANCH=$BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID - GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER - GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION - NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: functest - condition: SUCCESSFUL - projects: - - name: 'functest-netvirt-virtual-suite-master' - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-nofeature-ha - FUNCTEST_SUITE_NAME=odl_netvirt - RC_FILE_PATH=$HOME/cloner-info/overcloudrc - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: false - - multijob: - name: postprocess - condition: ALWAYS - projects: - - name: 'odl-netvirt-verify-virtual-postprocess-{stream}' - current-parameters: false - predefined-parameters: | - BRANCH=$BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID - GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER - GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION - NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: false + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: create-apex-vms + condition: SUCCESSFUL + projects: + - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + APEX_ENV_NUMBER=$APEX_ENV_NUMBER + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: install-netvirt + condition: SUCCESSFUL + projects: + - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}' + current-parameters: false + predefined-parameters: | + ODL_BRANCH={branch} + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'functest-netvirt-virtual-suite-master' + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-ha + FUNCTEST_MODE=testcase + FUNCTEST_SUITE_NAME=odl_netvirt + RC_FILE_PATH=$HOME/cloner-info/overcloudrc + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: false + - multijob: + name: postprocess + condition: ALWAYS + projects: + - name: 'odl-netvirt-verify-virtual-postprocess-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: false - job-template: name: 'odl-netvirt-verify-virtual-{phase}-{stream}' @@ -164,71 +169,71 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 5 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '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' + - logrotate-default + - throttle: + enabled: true + max-total: 5 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '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-wrapper - - timeout: - timeout: 360 - fail: true + - 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 + - git: + url: https://gerrit.opnfv.org/gerrit/apex + branches: + - 'origin/master' + timeout: 15 + wipe-workspace: true parameters: - - project-parameter: - project: '{project}' - 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." + - project-parameter: + project: '{project}' + 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: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-builder' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-builder' ##################################### # builder macros ##################################### - builder: name: 'netvirt-verify-create-apex-vms-builder' builders: - - shell: - !include-raw: ../apex/apex-snapshot-deploy.sh + - shell: + !include-raw: ../apex/apex-snapshot-deploy.sh - builder: name: 'netvirt-verify-install-netvirt-builder' builders: - - shell: - !include-raw: ./download-netvirt-artifact.sh - - shell: - !include-raw: ./install-netvirt.sh + - shell: + !include-raw: ./download-netvirt-artifact.sh + - shell: + !include-raw: ./install-netvirt.sh - builder: name: 'netvirt-verify-postprocess-builder' builders: - - shell: - !include-raw: ./postprocess-netvirt.sh + - shell: + !include-raw: ./postprocess-netvirt.sh diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index 58d9f1a40..cf5999832 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -28,8 +28,11 @@ fi BUILD_DIRECTORY=${WORKSPACE}/build # start the build -cd $WORKSPACE/ci -./build.sh $BUILD_ARGS +pushd ${BUILD_DIRECTORY} +make clean +popd +export PYTHONPATH=${WORKSPACE} +python3 apex/build.py $BUILD_ARGS RPM_VERSION=$(grep Version: $WORKSPACE/build/rpm_specs/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') # list the contents of BUILD_OUTPUT directory echo "Build Directory is ${BUILD_DIRECTORY}/../.build" @@ -43,6 +46,12 @@ echo "Cache Directory Contents:" echo "-------------------------" ls -al $CACHE_DIRECTORY +if [[ "$BUILD_ARGS" =~ '--iso' ]]; then + mkdir -p /tmp/apex-iso/ + rm -f /tmp/apex-iso/*.iso + cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/ +fi + if ! echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then echo "Writing opnfv.properties file" # save information regarding artifact into file diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 3a2ca606b..b8ae75a1f 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -3,7 +3,6 @@ set -o errexit set -o nounset set -o pipefail -APEX_PKGS="common undercloud onos" IPV6_FLAG=False # log info to console @@ -36,8 +35,8 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then # Settings for deploying from git workspace DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy" NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network" - DEPLOY_CMD="${WORKSPACE}/ci/deploy.sh" - CLEAN_CMD="${WORKSPACE}/ci/clean.sh" + DEPLOY_CMD="opnfv-deploy --image-dir ${WORKSPACE}/.build" + CLEAN_CMD="opnfv-clean" RESOURCES="${WORKSPACE}/.build/" CONFIG="${WORKSPACE}/build" BASE=$CONFIG @@ -47,6 +46,11 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then # Ensure artifacts were downloaded and extracted correctly # TODO(trozet) add verification here + # Install dev build + sudo rm -rf /tmp/.build + mv -f .build /tmp/ + sudo pip3 install --upgrade --force-reinstall . + mv -f /tmp/.build ${WORKSPACE}/ else DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/" NETWORK_SETTINGS_DIR="/etc/opnfv-apex/" @@ -57,12 +61,17 @@ else BASE=$CONFIG IMAGES=$RESOURCES LIB="/var/opt/opnfv/lib" - + sudo mkdir -p /var/log/apex + sudo chmod 777 /var/log/apex + cd /var/log/apex fi # Install Dependencies # Make sure python34 dependencies are installed -for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do +dependencies="epel-release python34 python34-devel libvirt-devel python34-pip \ +ansible python34-PyYAML python34-jinja2 python34-setuptools python-tox ansible" + +for dep_pkg in $dependencies; do if ! rpm -q ${dep_pkg} > /dev/null; then if ! sudo yum install -y ${dep_pkg}; then echo "Failed to install ${dep_pkg}" @@ -71,31 +80,12 @@ for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do fi done -# Make sure jinja2 is installed -for python_pkg in jinja2; do - if ! python3.4 -c "import $python_pkg"; then - echo "$python_pkg package not found for python3.4, attempting to install..." - if ! sudo easy_install-3.4 $python_pkg; then - echo -e "Failed to install $python_pkg package for python3.4" - exit 1 - fi - fi -done - if [[ "$JOB_NAME" =~ "virtual" ]]; then # Make sure ipxe-roms-qemu package is updated to latest. # This package is needed for multi virtio nic PXE boot in virtual environment. sudo yum update -y ipxe-roms-qemu - if [ -z ${PYTHONPATH:-} ]; then - export PYTHONPATH=${WORKSPACE}/lib/python - else - export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python - fi fi -# set env vars to deploy cmd -DEPLOY_CMD="BASE=${BASE} IMAGES=${IMAGES} LIB=${LIB} ${DEPLOY_CMD}" - if [ "$OPNFV_CLEAN" == 'yes' ]; then if sudo test -e '/root/inventory/pod_settings.yaml'; then clean_opts='-i /root/inventory/pod_settings.yaml' @@ -103,7 +93,7 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then clean_opts='' fi - sudo BASE=${BASE} LIB=${LIB} ${CLEAN_CMD} ${clean_opts} + sudo ${CLEAN_CMD} ${clean_opts} fi if echo ${DEPLOY_SCENARIO} | grep ipv6; then diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index 52c3c67ec..68baf59da 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -3,8 +3,6 @@ set -o errexit set -o nounset set -o pipefail -APEX_PKGS="common undercloud onos" - # log info to console echo "Downloading the Apex artifact. This could take some time..." echo "--------------------------------------------------------" @@ -23,7 +21,7 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then tar -xvf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz popd > /dev/null else - echo "Will download RPMs..." + echo "Will use RPMs..." # Must be RPMs/ISO echo "Downloading latest properties file" @@ -35,14 +33,19 @@ else source $BUILD_DIRECTORY/opnfv.properties RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//') - RPM_LIST=${RPM_INSTALL_PATH}/$(basename $OPNFV_RPM_URL) + RPM_LIST=$(basename $OPNFV_RPM_URL) # find version of RPM VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)') # build RPM List which already includes base Apex RPM - for pkg in ${APEX_PKGS}; do - RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm" - done + RPM_LIST+=" opnfv-apex-undercloud-${VERSION_EXTENSION}.noarch.rpm" + + # add back legacy support for danube + if [ "$BRANCH" == 'stable/danube' ]; then + RPM_LIST+=" opnfv-apex-common-${VERSION_EXTENSION}.noarch.rpm" + else + RPM_LIST+=" python34-opnfv-apex-${VERSION_EXTENSION}.noarch.rpm" + fi # remove old / install new RPMs if rpm -q opnfv-apex > /dev/null; then @@ -51,10 +54,20 @@ else sudo yum remove -y ${INSTALLED_RPMS} fi fi + # Create an rpms dir on slave + mkdir -p ~/apex_rpms + pushd ~/apex_rpms + # Remove older rpms which do not match this version + find . ! -name "*${VERSION_EXTENSION}.noarch.rpm" -type f -exec rm -f {} + + # Download RPM only if changed on server + for rpm in $RPM_LIST; do + wget -N ${RPM_INSTALL_PATH}/${rpm} + done if ! sudo yum install -y $RPM_LIST; then echo "Unable to install new RPMs: $RPM_LIST" exit 1 fi + popd fi # TODO: Uncomment these lines to verify SHA512SUMs once the sums are diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh index f102421f3..4faeb607e 100755 --- a/jjb/apex/apex-iso-verify.sh +++ b/jjb/apex/apex-iso-verify.sh @@ -8,7 +8,14 @@ echo "Starting the Apex iso verify." echo "--------------------------------------------------------" echo -source $BUILD_DIRECTORY/../opnfv.properties +# Must be RPMs/ISO +echo "Downloading latest properties file" + +# get the properties file in order to get info regarding artifacts +curl --fail -s -o opnfv.properties http://$GS_URL/latest.properties + +# source the file so we get OPNFV vars +source opnfv.properties if ! rpm -q virt-install > /dev/null; then sudo yum -y install virt-install @@ -35,9 +42,9 @@ sudo rm -f /var/log/libvirt/qemu/apex-iso-verify-console.log sudo virt-install -n apex-iso-verify -r 4096 --vcpus 4 --os-variant=rhel7 \ --accelerate -v --noautoconsole \ --disk path=/var/lib/libvirt/images/apex-iso-verify.qcow2,size=30,format=qcow2 \ - -l $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso \ + -l /tmp/apex-iso/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso \ --extra-args 'console=ttyS0 console=ttyS0,115200n8 serial inst.ks=file:/iso-verify.ks inst.stage2=hd:LABEL=OPNFV\x20CentOS\x207\x20x86_64:/' \ - --initrd-inject $BUILD_DIRECTORY/../ci/iso-verify.ks \ + --initrd-inject ci/iso-verify.ks \ --serial file,path=/var/log/libvirt/qemu/apex-iso-verify-console.log echo "Waiting for install to finish..." diff --git a/jjb/apex/apex-project-jobs.yml b/jjb/apex/apex-project-jobs.yml new file mode 100644 index 000000000..58072865d --- /dev/null +++ b/jjb/apex/apex-project-jobs.yml @@ -0,0 +1,131 @@ +--- +- project: + name: 'apex-project-jobs' + project: 'apex' + + stream: + - master: &master + branch: 'master' + gs-pathname: '' + concurrent-builds: 3 + disabled: false + - euphrates: &euphrates + branch: 'stable/euphrates' + gs-pathname: '/euphrates' + concurrent-builds: 3 + disabled: true + - danube: &danube + branch: 'stable/danube' + gs-pathname: '/danube' + concurrent-builds: 1 + disabled: true + + jobs: + - 'apex-build-{stream}' + - 'apex-verify-iso-{stream}' + +# Build phase +- job-template: + name: 'apex-build-{stream}' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-build-master' + + disabled: false + + concurrent: true + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + scm: + - git-scm-gerrit + + wrappers: + - timeout: + timeout: 150 + fail: true + + properties: + - logrotate-default + - throttle: + max-per-node: '{concurrent-builds}' + max-total: 10 + option: 'project' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify-iso-{stream}' + + builders: + - 'apex-build' + - inject: + properties-content: ARTIFACT_TYPE=rpm + - 'apex-upload-artifact' + +# ISO verify job +- job-template: + name: 'apex-verify-iso-{stream}' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-virtual-master' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - 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 + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-iso-verify' + - inject: + properties-content: ARTIFACT_TYPE=iso + - 'apex-upload-artifact' + +######################## +# builder macros +######################## +- builder: + name: 'apex-build' + builders: + - shell: + !include-raw: ./apex-build.sh + +- builder: + name: 'apex-iso-verify' + builders: + - shell: + !include-raw: ./apex-iso-verify.sh diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh index 3eb3cf23a..a93421c8e 100644 --- a/jjb/apex/apex-snapshot-deploy.sh +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -22,7 +22,7 @@ echo echo "Cleaning server" pushd ci > /dev/null -sudo BASE=../build/ LIB=../lib ./clean.sh +sudo opnfv-clean popd > /dev/null echo "Downloading latest snapshot properties file" diff --git a/jjb/apex/apex-unit-test.sh b/jjb/apex/apex-unit-test.sh index 12cb862b0..3112c9d36 100755 --- a/jjb/apex/apex-unit-test.sh +++ b/jjb/apex/apex-unit-test.sh @@ -8,10 +8,24 @@ echo "-------------------------------------------------------------------------- echo -pushd ci/ > /dev/null -sudo BASE="${WORKSPACE}/build" LIB="${WORKSPACE}/lib" ./clean.sh -./test.sh -popd +pushd build/ > /dev/null +for pkg in yamllint rpmlint iproute epel-release python34-devel python34-nose python34-PyYAML python-pep8 python34-mock python34-pip; do + if ! rpm -q ${pkg} > /dev/null; then + if ! sudo yum install -y ${pkg}; then + echo "Failed to install ${pkg} package..." + exit 1 + fi + fi +done + +# Make sure coverage is installed +if ! python3 -c "import coverage" &> /dev/null; then sudo pip3 install coverage; fi + +make rpmlint +make python-pep8-check +make yamllint +make python-tests +popd > /dev/null echo "--------------------------------------------------------" echo "Unit Tests Done!" diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index f53451d41..4037d25ad 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -126,15 +126,13 @@ elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//') - for pkg in common undercloud onos; do - RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" - done + RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-undercloud-${VERSION_EXTENSION}" + RPM_LIST+=" ${RPM_INSTALL_PATH}/python34-opnfv-apex-${VERSION_EXTENSION}" SRPM_INSTALL_PATH=$BUILD_DIRECTORY SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//') - for pkg in common undercloud onos; do - SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" - done + SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-undercloud-${VERSION_EXTENSION}" + SRPM_LIST+=" ${SRPM_INSTALL_PATH}/python34-opnfv-apex-${VERSION_EXTENSION}" if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then signrpm diff --git a/jjb/apex/apex-workspace-cleanup.sh b/jjb/apex/apex-workspace-cleanup.sh deleted file mode 100755 index d2f71a562..000000000 --- a/jjb/apex/apex-workspace-cleanup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -# delete everything that is in $WORKSPACE -sudo /bin/rm -rf $WORKSPACE diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 0123d755a..2e1159213 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -1,113 +1,198 @@ +--- - project: name: 'apex' project: 'apex' jobs: - - 'apex-verify-{stream}' - - 'apex-verify-gate-{stream}' - - 'apex-verify-unit-tests-{stream}' - - 'apex-runner-cperf-{stream}' - - 'apex-build-{stream}' - - 'apex-deploy-{platform}-{stream}' - - 'apex-daily-master' - - 'apex-daily-danube' - - 'apex-csit-promote-daily-{stream}' - - 'apex-fdio-promote-daily-{stream}' - - 'apex-verify-iso-{stream}' - - 'apex-{scenario}-baremetal-{scenario_stream}' - - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - - 'apex-upload-snapshot' - - 'apex-create-snapshot' + - 'apex-verify-{stream}' + - 'apex-verify-gate-{stream}' + - 'apex-verify-unit-tests-{stream}' + - 'apex-runner-cperf-{stream}' + - 'apex-virtual-{stream}' + - 'apex-deploy-{platform}-{stream}' + - 'apex-daily-{stream}' + - 'apex-csit-promote-daily-{stream}' + - 'apex-fdio-promote-daily-{stream}' + - 'apex-{scenario}-baremetal-{scenario_stream}' + - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + - 'apex-upload-snapshot' + - 'apex-create-snapshot' + - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) stream: - - master: &master - branch: 'master' - gs-pathname: '' - build-slave: 'apex-build-master' - virtual-slave: 'apex-virtual-master' - baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' - concurrent-builds: 3 - scenario_stream: 'master' - - - danube: &danube - branch: 'stable/danube' - gs-pathname: '/danube' - build-slave: 'apex-build-danube' - virtual-slave: 'apex-virtual-danube' - baremetal-slave: 'apex-baremetal-danube' - verify-scenario: 'os-odl_l3-nofeature-ha' - concurrent-builds: 1 - scenario_stream: 'danube' - disabled: true + - master: &master + branch: 'master' + gs-pathname: '' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'master' + disable_daily: true + - euphrates: &euphrates + branch: 'stable/euphrates' + gs-pathname: '/euphrates' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'euphrates' + disable_daily: false + - danube: &danube + branch: 'stable/danube' + gs-pathname: '/danube' + build-slave: 'apex-build-danube' + virtual-slave: 'apex-virtual-danube' + baremetal-slave: 'apex-baremetal-danube' + verify-scenario: 'os-odl_l3-nofeature-ha' + scenario_stream: 'danube' + disabled: true + disable_daily: true scenario: - - 'os-nosdn-nofeature-noha': - <<: *danube - - 'os-nosdn-nofeature-ha': - <<: *danube - - 'os-nosdn-nofeature-ha-ipv6': - <<: *danube - - 'os-nosdn-ovs-noha': - <<: *danube - - 'os-nosdn-ovs-ha': - <<: *danube - - 'os-nosdn-fdio-noha': - <<: *danube - - 'os-nosdn-fdio-ha': - <<: *danube - - 'os-nosdn-kvm-ha': - <<: *danube - - 'os-nosdn-kvm-noha': - <<: *danube - - 'os-odl_l2-fdio-noha': - <<: *danube - - 'os-odl_l2-fdio-ha': - <<: *danube - - 'os-odl_netvirt-fdio-noha': - <<: *danube - - 'os-odl_l2-sfc-noha': - <<: *danube - - 'os-odl_l3-nofeature-noha': - <<: *danube - - 'os-odl_l3-nofeature-ha': - <<: *danube - - 'os-odl_l3-ovs-noha': - <<: *danube - - 'os-odl_l3-ovs-ha': - <<: *danube - - 'os-odl-bgpvpn-ha': - <<: *danube - - 'os-odl-gluon-noha': - <<: *danube - - 'os-odl_l3-fdio-noha': - <<: *danube - - 'os-odl_l3-fdio-ha': - <<: *danube - - 'os-odl_l3-fdio_dvr-noha': - <<: *danube - - 'os-odl_l3-fdio_dvr-ha': - <<: *danube - - 'os-odl_l3-csit-noha': - <<: *danube - - 'os-onos-nofeature-ha': - <<: *danube - - 'os-ovn-nofeature-noha': - <<: *danube - - 'os-nosdn-nofeature-noha': - <<: *master - - 'os-nosdn-nofeature-ha': - <<: *master - - 'os-odl-nofeature-ha': - <<: *master - - 'os-odl-nofeature-noha': - <<: *master - - 'os-odl-bgpvpn-ha': - <<: *master + - 'os-nosdn-nofeature-noha': + <<: *danube + - 'os-nosdn-nofeature-ha': + <<: *danube + - 'os-nosdn-nofeature-ha-ipv6': + <<: *danube + - 'os-nosdn-ovs-noha': + <<: *danube + - 'os-nosdn-ovs-ha': + <<: *danube + - 'os-nosdn-fdio-noha': + <<: *danube + - 'os-nosdn-fdio-ha': + <<: *danube + - 'os-nosdn-kvm-ha': + <<: *danube + - 'os-nosdn-kvm-noha': + <<: *danube + - 'os-odl_l2-fdio-noha': + <<: *danube + - 'os-odl_l2-fdio-ha': + <<: *danube + - 'os-odl_netvirt-fdio-noha': + <<: *danube + - 'os-odl_l2-sfc-noha': + <<: *danube + - 'os-odl_l3-nofeature-noha': + <<: *danube + - 'os-odl_l3-nofeature-ha': + <<: *danube + - 'os-odl_l3-ovs-noha': + <<: *danube + - 'os-odl_l3-ovs-ha': + <<: *danube + - 'os-odl-bgpvpn-ha': + <<: *danube + - 'os-odl-gluon-noha': + <<: *danube + - 'os-odl_l3-fdio-noha': + <<: *danube + - 'os-odl_l3-fdio-ha': + <<: *danube + - 'os-odl_l3-fdio_dvr-noha': + <<: *danube + - 'os-odl_l3-fdio_dvr-ha': + <<: *danube + - 'os-odl_l3-csit-noha': + <<: *danube + - 'os-onos-nofeature-ha': + <<: *danube + - 'os-ovn-nofeature-noha': + <<: *danube + - 'os-nosdn-nofeature-noha': + <<: *master + - 'os-nosdn-nofeature-ha': + <<: *master + - 'os-odl-nofeature-ha': + <<: *master + - 'os-odl-nofeature-noha': + <<: *master + - 'os-odl-bgpvpn-ha': + <<: *master + - 'os-ovn-nofeature-noha': + <<: *master + - 'os-nosdn-fdio-noha': + <<: *master + - 'os-nosdn-fdio-ha': + <<: *master + - 'os-odl-fdio-noha': + <<: *master + - 'os-odl-fdio-ha': + <<: *master + - 'os-nosdn-bar-ha': + <<: *master + - 'os-nosdn-bar-noha': + <<: *master + - 'os-nosdn-nofeature-ha-ipv6': + <<: *master + - 'os-nosdn-ovs_dpdk-noha': + <<: *master + - 'os-nosdn-ovs_dpdk-ha': + <<: *master + - 'os-nosdn-kvm_ovs_dpdk-noha': + <<: *master + - 'os-nosdn-kvm_ovs_dpdk-ha': + <<: *master + - 'os-odl-sfc-noha': + <<: *master + - 'os-odl-sfc-ha': + <<: *master + - 'os-odl-fdio_dvr-noha': + <<: *master + - 'os-odl-fdio_dvr-ha': + <<: *master + - 'os-nosdn-nofeature-noha': + <<: *euphrates + - 'os-nosdn-nofeature-ha': + <<: *euphrates + - 'os-odl-nofeature-ha': + <<: *euphrates + - 'os-odl-nofeature-noha': + <<: *euphrates + - 'os-odl-bgpvpn-ha': + <<: *euphrates + - 'os-ovn-nofeature-noha': + <<: *euphrates + - 'os-nosdn-fdio-noha': + <<: *euphrates + - 'os-nosdn-fdio-ha': + <<: *euphrates + - 'os-odl-fdio-noha': + <<: *euphrates + - 'os-odl-fdio-ha': + <<: *euphrates + - 'os-nosdn-bar-ha': + <<: *euphrates + - 'os-nosdn-bar-noha': + <<: *euphrates + - 'os-nosdn-nofeature-ha-ipv6': + <<: *euphrates + - 'os-nosdn-ovs_dpdk-noha': + <<: *euphrates + - 'os-nosdn-ovs_dpdk-ha': + <<: *euphrates + - 'os-nosdn-kvm_ovs_dpdk-noha': + <<: *euphrates + - 'os-nosdn-kvm_ovs_dpdk-ha': + <<: *euphrates + - 'os-odl-sfc-noha': + <<: *euphrates + - 'os-odl-sfc-ha': + <<: *euphrates + - 'os-odl-fdio_dvr-noha': + <<: *euphrates + - 'os-odl-fdio_dvr-ha': + <<: *euphrates + - 'os-nosdn-calipso-noha': + <<: *euphrates platform: - - 'baremetal' - - 'virtual' + - 'baremetal' + - 'virtual' # Unit Test - job-template: @@ -118,47 +203,76 @@ concurrent: true parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}' - - project-parameter: - project: '{project}' - branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' scm: - - git-scm-gerrit + - 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: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'tests/**' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'false' + file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + forbidden-file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - shell: - !include-raw-escape: ./apex-unit-test.sh + - shell: + !include-raw-escape: ./apex-unit-test.sh # Verify - job-template: @@ -171,123 +285,130 @@ project-type: 'multijob' parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" scm: - - git-scm-gerrit + - 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: 'true' - - 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: '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/**' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + - compare-type: ANT + pattern: 'docs/**' properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' + - logrotate-default + - throttle: + max-per-node: 3 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'apex-verify-unit-tests-{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 - git-revision: true - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - 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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO={verify-scenario} - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'apex-verify-unit-tests-{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 + git-revision: true + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + 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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO={verify-scenario} + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true # Verify Scenario Gate - job-template: @@ -300,89 +421,104 @@ project-type: 'multijob' parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - 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." - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - 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." + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" scm: - - git-scm-gerrit + - 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/**' + - 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/**' + - compare-type: ANT + pattern: 'apex/**' properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-virtual.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO=gate - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=gate + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + # yamllint disable rule:line-length + - shell: | + echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario + # yamllint enable rule:line-length + - inject: + properties-file: detected_scenario + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -394,209 +530,204 @@ disabled: false 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." + - 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 + - git-scm properties: - - logrotate-default - - build-blocker: - use-build-blocker: false - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: false + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Deployed on $NODE_NAME" - - multijob: - name: 'Baremetal Deploy' - condition: ALWAYS - projects: - - name: 'apex-deploy-baremetal-{stream}' - node-parameters: false - current-parameters: true - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - OPNFV_CLEAN=yes - DEPLOY_SCENARIO={verify-scenario} - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: CPERF - condition: SUCCESSFUL - projects: - - name: 'cperf-apex-intel-pod2-daily-master' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={verify-scenario} - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - -# Build phase -- job-template: - name: 'apex-build-{stream}' + - description-setter: + description: "Deployed on $NODE_NAME" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: false + current-parameters: true + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + OPNFV_CLEAN=yes + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: CPERF + condition: SUCCESSFUL + projects: + - name: 'cperf-apex-intel-pod2-daily-master' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: NEVER + abort-all-job: false + git-revision: false - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{build-slave}' +# Deploy job +- job-template: + name: 'apex-deploy-{platform}-{stream}' - disabled: false + node: 'apex-{platform}-{stream}' concurrent: true - parameters: - - '{project}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - + disabled: false + quiet-period: 30 scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - timeout: - timeout: 150 - fail: true - - properties: - - logrotate-default - - throttle: - max-per-node: {concurrent-builds} - max-total: 10 - option: 'project' - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify-iso-{stream}' - - builders: - - 'apex-build' - - inject: - properties-content: ARTIFACT_TYPE=rpm - - 'apex-upload-artifact' - -# ISO verify job -- job-template: - name: 'apex-verify-iso-{stream}' - - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{virtual-slave}' - - disabled: false - - concurrent: true + - timeout: + timeout: 140 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - 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 - + - '{project}-{platform}-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + # yamllint disable rule:line-length + - string: + name: OPNFV_CLEAN + default: 'no' + description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" + + # yamllint enable rule:line-length properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - 'functest.*' + - 'yardstick.*' + - 'dovetail.*' + - 'storperf.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - 'apex-iso-verify' - - inject: - properties-content: ARTIFACT_TYPE=iso - - 'apex-upload-artifact' + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'apex-download-artifact' + - 'apex-deploy' + - 'clean-workspace' -# Deploy job -- job-template: - name: 'apex-deploy-{platform}-{stream}' - node: 'apex-{platform}-{stream}' +# Virtual Deploy and Test +- job-template: + name: 'apex-virtual-{stream}' - concurrent: true + project-type: 'multijob' disabled: false scm: - - git-scm-gerrit - - wrappers: - - timeout: - timeout: 120 - fail: true + - git-scm-gerrit parameters: - - '{project}-{platform}-{stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{verify-scenario}' - description: "Scenario to deploy with." - - string: - name: OPNFV_CLEAN - default: 'no' - description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" + - '{project}-defaults' + - '{project}-virtual-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - - 'functest.*' - - 'yardstick.*' - - 'dovetail.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-virtual-.*' + - 'apex-verify-gate-.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - 'apex-download-artifact' - - 'apex-deploy' - - 'apex-workspace-cleanup' - + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + git-revision: false # Baremetal Deploy and Test - job-template: @@ -607,66 +738,71 @@ disabled: false scm: - - git-scm + - git-scm parameters: - - '{project}-defaults' - - '{project}-baremetal-{scenario_stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - description: "Scenario to deploy with." + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + description: "Scenario to deploy with." + properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-runner.*' - - 'apex-.*-promote.*' - - 'apex-run.*' - - 'apex-.+-baremetal-.+' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - builders: - - description-setter: - description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - multijob: - name: 'Baremetal Deploy' - condition: ALWAYS - projects: - - name: 'apex-deploy-baremetal-{scenario_stream}' - node-parameters: true - current-parameters: true - predefined-parameters: | - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: 'OPNFV Test Suite' - condition: SUCCESSFUL - projects: - - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{scenario_stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: 'OPNFV Test Suite' + projects: + - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + publishers: + - groovy-postbuild: + script: + !include-raw-escape: ./update-build-result.groovy # Baremetal test job - job-template: @@ -677,389 +813,99 @@ disabled: false parameters: - - '{project}-defaults' - - '{project}-baremetal-{scenario_stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - description: "Scenario to deploy with." - properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-runner.*' - - 'apex-.*-promote.*' - - 'apex-run.*' - - 'apex-testsuite-.+-baremetal-.+' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - builders: - - description-setter: - description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - multijob: - name: Functest - condition: ALWAYS - projects: - - name: 'functest-apex-baremetal-daily-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - - multijob: - name: Yardstick - condition: ALWAYS - projects: - - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - - multijob: - name: Dovetail - condition: ALWAYS - projects: - - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - enable-condition: "DEPLOY_SCENARIO =~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" - abort-all-job: false - git-revision: false - - conditional-step: - condition-kind: current-status - condition-worst: SUCCESS - condtion-best: SUCCESS - on-evaluation-failure: mark-unstable - steps: - - shell: 'echo "Tests Passed"' - - -# danube Daily -- job-template: - name: 'apex-daily-danube' - - # Job template for daily build - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - project-type: 'multijob' - - node: 'apex-baremetal-danube' - - disabled: false - - scm: - - git-scm - - parameters: - - '{project}-defaults' - - '{project}-baremetal-danube-defaults' - - project-parameter: - project: '{project}' - branch: 'stable/danube' - - apex-parameter: - gs-pathname: '/danube' + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + description: "Scenario to deploy with." properties: - - logrotate-default - - triggers: - - 'apex-danube' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-testsuite-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-danube' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: 'Verify and upload ISO' - condition: SUCCESSFUL - projects: - - name: 'apex-verify-iso-danube' - current-parameters: false - predefined-parameters: | - BUILD_DIRECTORY=$WORKSPACE/../apex-build-danube/.build - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: Baremetal Deploy and Test Phase - condition: SUCCESSFUL - projects: - - - name: 'apex-os-nosdn-nofeature-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-nofeature-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-ovs-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-ovs-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-fdio-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-fdio-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-kvm-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-kvm-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l2-fdio-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l2-fdio-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_netvirt-fdio-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l2-sfc-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-nofeature-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-nofeature-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-ovs-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-ovs-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl-bgpvpn-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl-gluon-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-fdio-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-fdio-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-fdio_dvr-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-fdio_dvr-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl_l3-csit-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-onos-nofeature-ha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-ovn-nofeature-noha-baremetal-danube' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - -# master Daily + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" + abort-all-job: false + git-revision: false + - multijob: + name: StorPerf + condition: ALWAYS + projects: + - name: 'storperf-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/" + kill-phase-on: NEVER + abort-all-job: false + git-revision: false +# Build status is always success due conditional plugin prefetching +# build status before multijob phases execute +# - conditional-step: +# condition-kind: current-status +# condition-worst: SUCCESS +# condtion-best: SUCCESS +# on-evaluation-failure: mark-unstable +# steps: +# - shell: 'echo "Tests Passed"' + - job-template: - name: 'apex-daily-master' + name: 'apex-daily-{stream}' # Job template for daily build # @@ -1068,111 +914,66 @@ # branch: branch (eg. stable) project-type: 'multijob' - node: 'apex-baremetal-master' + node: '{baremetal-slave}' - disabled: false + disabled: '{obj:disable_daily}' scm: - - git-scm + - git-scm parameters: - - '{project}-defaults' - - '{project}-baremetal-master-defaults' - - project-parameter: - project: '{project}' - branch: 'master' - - apex-parameter: - gs-pathname: '' + - '{project}-defaults' + - '{project}-baremetal-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' properties: - - logrotate-default + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' triggers: - - 'apex-master' + - 'apex-{stream}' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-master' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: 'Verify and upload ISO' - condition: SUCCESSFUL - projects: - - name: 'apex-verify-iso-master' - current-parameters: false - predefined-parameters: | - BUILD_DIRECTORY=$WORKSPACE/../apex-build-master/.build - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: Baremetal Deploy and Test Phase - condition: SUCCESSFUL - projects: - - - name: 'apex-os-nosdn-nofeature-noha-baremetal-master' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-nosdn-nofeature-ha-baremetal-master' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl-nofeature-ha-baremetal-master' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl-nofeature-noha-baremetal-master' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - - name: 'apex-os-odl-bgpvpn-ha-baremetal-master' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: 'Verify and upload ISO' + condition: SUCCESSFUL + projects: + - name: 'apex-verify-iso-{stream}' + current-parameters: false + predefined-parameters: | + BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - apex-builder-{stream} # snapshot create - job-template: @@ -1186,8 +987,8 @@ disabled: false builders: - - shell: - !include-raw-escape: ./apex-snapshot-create.sh + - shell: + !include-raw-escape: ./apex-snapshot-create.sh # snapshot upload - job-template: @@ -1201,9 +1002,9 @@ disabled: false builders: - - inject: - properties-content: ARTIFACT_TYPE=snapshot - - 'apex-upload-artifact' + - inject: + properties-content: ARTIFACT_TYPE=snapshot + - 'apex-upload-artifact' # CSIT promote - job-template: @@ -1219,103 +1020,103 @@ disabled: false scm: - - git-scm + - git-scm parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' + - 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-runner.*' - - 'apex-daily.*' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-daily.*' triggers: - - timed: '0 12 * * 0' + - timed: '0 12 * * 0' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-csit-noha - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-nofeature-noha - FUNCTEST_SUITE_NAME=tempest_smoke_serial - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: create snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: upload snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-csit-noha + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + FUNCTEST_SUITE_NAME=tempest_smoke_serial + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-upload-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false # FDIO promote - job-template: @@ -1331,83 +1132,233 @@ disabled: false scm: - - git-scm + - git-scm parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' + - 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-runner.*' - - 'apex-daily.*' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-daily.*' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: create snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=fdio - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: upload snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=fdio - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-upload-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +# Flex job +- job-template: + name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + + project-type: 'multijob' + + disabled: false + + node: 'flex-pod2' + + scm: + - git-scm + + triggers: + - 'apex-{stream}' + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +# Dovetail Danube test job +- job-template: + name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' + + project-type: 'multijob' + + node: 'huawei-pod4' + + disabled: false + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: 'stable/danube' + - apex-parameter: + gs-pathname: '/danube' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + + triggers: + - timed: '' #'0 1 * * *' + + builders: + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-danube' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - name: 'dovetail-apex-baremetal-proposed_tests-danube' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false ######################## # parameter macros @@ -1415,84 +1366,646 @@ - parameter: name: apex-parameter parameters: - - string: - name: ARTIFACT_NAME - default: 'latest' - description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" - - string: - name: ARTIFACT_VERSION - default: 'daily' - description: "Artifact version type" - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/.build - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: CACHE_DIRECTORY - default: $HOME/opnfv/apex-cache{gs-pathname} - description: "Directory where the cache to be used during the build is located." - - 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." - - string: - name: GS_PATHNAME - default: '{gs-pathname}' - description: "Version directory where opnfv artifacts are stored in gs repository" - - string: - name: GS_URL - default: $GS_BASE{gs-pathname} - description: "URL to Google Storage." - - string: - name: PROMOTE - default: 'False' - description: "Flag to know if we should promote/upload snapshot artifacts." + - string: + name: ARTIFACT_NAME + default: 'latest' + description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" + - string: + name: ARTIFACT_VERSION + default: 'daily' + description: "Artifact version type" + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/.build + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: CACHE_DIRECTORY + default: $HOME/opnfv/apex-cache{gs-pathname} + description: "Directory where the cache to be used during the build is located." + # yamllint disable rule:line-length + - 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." + # yamllint enable rule:line-length + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where opnfv artifacts are stored in gs repository" + - string: + name: GS_URL + default: $GS_BASE{gs-pathname} + description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros ######################## + +# danube Builder - builder: - name: 'apex-unit-test' + name: apex-builder-danube builders: - - shell: - !include-raw: ./apex-unit-test.sh - + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l2-fdio-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l2-fdio-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_netvirt-fdio-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l2-sfc-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-nofeature-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-nofeature-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-ovs-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-ovs-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-bgpvpn-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-gluon-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-fdio-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-fdio-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-fdio_dvr-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-fdio_dvr-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl_l3-csit-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-onos-nofeature-ha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-ovn-nofeature-noha-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + +# master Builder - builder: - name: 'apex-build' + name: apex-builder-master builders: - - shell: - !include-raw: ./apex-build.sh - + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-bgpvpn-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-ovn-nofeature-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-bar-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-bar-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs_dpdk-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs_dpdk-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm_ovs_dpdk-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm_ovs_dpdk-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio_dvr-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio_dvr-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + +# euphrates Builder - builder: - name: 'apex-workspace-cleanup' + name: apex-builder-euphrates builders: - - shell: - !include-raw: ./apex-workspace-cleanup.sh - + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-bgpvpn-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-ovn-nofeature-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-fdio-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-bar-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-bar-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs_dpdk-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-ovs_dpdk-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm_ovs_dpdk-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-kvm_ovs_dpdk-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio_dvr-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-fdio_dvr-ha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-calipso-noha-baremetal-euphrates' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - builder: - name: 'apex-iso-verify' + name: 'apex-unit-test' builders: - - shell: - !include-raw: ./apex-iso-verify.sh - + - shell: + !include-raw: ./apex-unit-test.sh - builder: name: 'apex-upload-artifact' builders: - - shell: - !include-raw: ./apex-upload-artifact.sh + - shell: + !include-raw: ./apex-upload-artifact.sh - builder: name: 'apex-download-artifact' builders: - - shell: - !include-raw: ./apex-download-artifact.sh + - shell: + !include-raw: ./apex-download-artifact.sh - builder: name: 'apex-deploy' builders: - - shell: - !include-raw: ./apex-deploy.sh + - shell: + !include-raw: ./apex-deploy.sh ####################### # trigger macros @@ -1500,8 +2013,14 @@ - trigger: name: 'apex-master' triggers: - - timed: '0 12 * * *' + - timed: '0 3 1 1 7' + +- trigger: + name: 'apex-euphrates' + triggers: + - timed: '0 12 * * *' + - trigger: name: 'apex-danube' triggers: - - timed: '0 3 1 1 7' + - timed: '0 3 1 1 7' diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 7466a8301..d49b6eaf9 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -1,57 +1,66 @@ +--- - project: name: 'apex' project: 'apex' jobs: - - 'apex-verify-{stream}' - - 'apex-verify-gate-{stream}' - - 'apex-verify-unit-tests-{stream}' - - 'apex-runner-cperf-{stream}' - - 'apex-build-{stream}' - - 'apex-deploy-{platform}-{stream}' - - 'apex-daily-master' - - 'apex-daily-danube' - - 'apex-csit-promote-daily-{stream}' - - 'apex-fdio-promote-daily-{stream}' - - 'apex-verify-iso-{stream}' - - 'apex-{scenario}-baremetal-{scenario_stream}' - - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - - 'apex-upload-snapshot' - - 'apex-create-snapshot' + - 'apex-verify-{stream}' + - 'apex-verify-gate-{stream}' + - 'apex-verify-unit-tests-{stream}' + - 'apex-runner-cperf-{stream}' + - 'apex-virtual-{stream}' + - 'apex-deploy-{platform}-{stream}' + - 'apex-daily-{stream}' + - 'apex-csit-promote-daily-{stream}' + - 'apex-fdio-promote-daily-{stream}' + - 'apex-{scenario}-baremetal-{scenario_stream}' + - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + - 'apex-upload-snapshot' + - 'apex-create-snapshot' + - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) stream: - - master: &master - branch: 'master' - gs-pathname: '' - build-slave: 'apex-build-master' - virtual-slave: 'apex-virtual-master' - baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' - concurrent-builds: 3 - scenario_stream: 'master' - - - danube: &danube - branch: 'stable/danube' - gs-pathname: '/danube' - build-slave: 'apex-build-danube' - virtual-slave: 'apex-virtual-danube' - baremetal-slave: 'apex-baremetal-danube' - verify-scenario: 'os-odl_l3-nofeature-ha' - concurrent-builds: 1 - scenario_stream: 'danube' - disabled: true + - master: &master + branch: 'master' + gs-pathname: '' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'master' + disable_daily: true + - euphrates: &euphrates + branch: 'stable/euphrates' + gs-pathname: '/euphrates' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'euphrates' + disable_daily: false + - danube: &danube + branch: 'stable/danube' + gs-pathname: '/danube' + build-slave: 'apex-build-danube' + virtual-slave: 'apex-virtual-danube' + baremetal-slave: 'apex-baremetal-danube' + verify-scenario: 'os-odl_l3-nofeature-ha' + scenario_stream: 'danube' + disabled: true + disable_daily: true scenario: - {%- for stream in scenarios %} - {%- for scenario in scenarios[stream] %} - - '{{scenario}}': - <<: *{{stream}} - {%- endfor %} - {%- endfor %} + {%- for stream in scenarios %} + {%- for scenario in scenarios[stream] %} + - '{{scenario}}': + <<: *{{stream}} + {%- endfor %} + {%- endfor %} platform: - - 'baremetal' - - 'virtual' + - 'baremetal' + - 'virtual' # Unit Test - job-template: @@ -62,47 +71,76 @@ concurrent: true parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}' - - project-parameter: - project: '{project}' - branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' scm: - - git-scm-gerrit + - 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: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'tests/**' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'false' + file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + forbidden-file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - shell: - !include-raw-escape: ./apex-unit-test.sh + - shell: + !include-raw-escape: ./apex-unit-test.sh # Verify - job-template: @@ -115,123 +153,130 @@ project-type: 'multijob' parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" scm: - - git-scm-gerrit + - 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: 'true' - - 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: '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/**' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + - compare-type: ANT + pattern: 'docs/**' properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' + - logrotate-default + - throttle: + max-per-node: 3 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'apex-verify-unit-tests-{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 - git-revision: true - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - 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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO={verify-scenario} - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'apex-verify-unit-tests-{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 + git-revision: true + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + 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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO={verify-scenario} + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true # Verify Scenario Gate - job-template: @@ -244,89 +289,104 @@ project-type: 'multijob' parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - 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." - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - 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." + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" scm: - - git-scm-gerrit + - 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/**' + - 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/**' + - compare-type: ANT + pattern: 'apex/**' properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-virtual.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO=gate - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=gate + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + # yamllint disable rule:line-length + - shell: | + echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario + # yamllint enable rule:line-length + - inject: + properties-file: detected_scenario + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -338,209 +398,204 @@ disabled: false 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." + - 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 + - git-scm properties: - - logrotate-default - - build-blocker: - use-build-blocker: false - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: false + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Deployed on $NODE_NAME" - - multijob: - name: 'Baremetal Deploy' - condition: ALWAYS - projects: - - name: 'apex-deploy-baremetal-{stream}' - node-parameters: false - current-parameters: true - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - OPNFV_CLEAN=yes - DEPLOY_SCENARIO={verify-scenario} - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: CPERF - condition: SUCCESSFUL - projects: - - name: 'cperf-apex-intel-pod2-daily-master' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={verify-scenario} - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - -# Build phase -- job-template: - name: 'apex-build-{stream}' + - description-setter: + description: "Deployed on $NODE_NAME" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: false + current-parameters: true + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + OPNFV_CLEAN=yes + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: CPERF + condition: SUCCESSFUL + projects: + - name: 'cperf-apex-intel-pod2-daily-master' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: NEVER + abort-all-job: false + git-revision: false - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{build-slave}' +# Deploy job +- job-template: + name: 'apex-deploy-{platform}-{stream}' - disabled: false + node: 'apex-{platform}-{stream}' concurrent: true - parameters: - - '{project}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - + disabled: false + quiet-period: 30 scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - timeout: - timeout: 150 - fail: true - - properties: - - logrotate-default - - throttle: - max-per-node: {concurrent-builds} - max-total: 10 - option: 'project' - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify-iso-{stream}' - - builders: - - 'apex-build' - - inject: - properties-content: ARTIFACT_TYPE=rpm - - 'apex-upload-artifact' - -# ISO verify job -- job-template: - name: 'apex-verify-iso-{stream}' - - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{virtual-slave}' - - disabled: false - - concurrent: true + - timeout: + timeout: 140 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - 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 - + - '{project}-{platform}-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + # yamllint disable rule:line-length + - string: + name: OPNFV_CLEAN + default: 'no' + description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" + + # yamllint enable rule:line-length properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - 'functest.*' + - 'yardstick.*' + - 'dovetail.*' + - 'storperf.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - 'apex-iso-verify' - - inject: - properties-content: ARTIFACT_TYPE=iso - - 'apex-upload-artifact' + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'apex-download-artifact' + - 'apex-deploy' + - 'clean-workspace' -# Deploy job -- job-template: - name: 'apex-deploy-{platform}-{stream}' - node: 'apex-{platform}-{stream}' +# Virtual Deploy and Test +- job-template: + name: 'apex-virtual-{stream}' - concurrent: true + project-type: 'multijob' disabled: false scm: - - git-scm-gerrit - - wrappers: - - timeout: - timeout: 120 - fail: true + - git-scm-gerrit parameters: - - '{project}-{platform}-{stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{verify-scenario}' - description: "Scenario to deploy with." - - string: - name: OPNFV_CLEAN - default: 'no' - description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" + - '{project}-defaults' + - '{project}-virtual-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - - 'functest.*' - - 'yardstick.*' - - 'dovetail.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-virtual-.*' + - 'apex-verify-gate-.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - description-setter: - description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - 'apex-download-artifact' - - 'apex-deploy' - - 'apex-workspace-cleanup' - + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + git-revision: false # Baremetal Deploy and Test - job-template: @@ -551,66 +606,71 @@ disabled: false scm: - - git-scm + - git-scm parameters: - - '{project}-defaults' - - '{project}-baremetal-{scenario_stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - description: "Scenario to deploy with." + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + description: "Scenario to deploy with." + properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-runner.*' - - 'apex-.*-promote.*' - - 'apex-run.*' - - 'apex-.+-baremetal-.+' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - builders: - - description-setter: - description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - multijob: - name: 'Baremetal Deploy' - condition: ALWAYS - projects: - - name: 'apex-deploy-baremetal-{scenario_stream}' - node-parameters: true - current-parameters: true - predefined-parameters: | - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: 'OPNFV Test Suite' - condition: SUCCESSFUL - projects: - - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: true - git-revision: false + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{scenario_stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: 'OPNFV Test Suite' + projects: + - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + publishers: + - groovy-postbuild: + script: + !include-raw-escape: ./update-build-result.groovy # Baremetal test job - job-template: @@ -621,84 +681,99 @@ disabled: false parameters: - - '{project}-defaults' - - '{project}-baremetal-{scenario_stream}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - description: "Scenario to deploy with." + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + description: "Scenario to deploy with." + properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-runner.*' - - 'apex-.*-promote.*' - - 'apex-run.*' - - 'apex-testsuite-.+-baremetal-.+' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-testsuite-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + builders: - - description-setter: - description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - multijob: - name: Functest - condition: ALWAYS - projects: - - name: 'functest-apex-baremetal-daily-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - - multijob: - name: Yardstick - condition: ALWAYS - projects: - - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - abort-all-job: false - git-revision: false - - multijob: - name: Dovetail - condition: ALWAYS - projects: - - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' - node-parameters: true - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - kill-phase-on: NEVER - enable-condition: "DEPLOY_SCENARIO =~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" - abort-all-job: false - git-revision: false - - conditional-step: - condition-kind: current-status - condition-worst: SUCCESS - condtion-best: SUCCESS - on-evaluation-failure: mark-unstable - steps: - - shell: 'echo "Tests Passed"' + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" + abort-all-job: false + git-revision: false + - multijob: + name: StorPerf + condition: ALWAYS + projects: + - name: 'storperf-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/" + kill-phase-on: NEVER + abort-all-job: false + git-revision: false +# Build status is always success due conditional plugin prefetching +# build status before multijob phases execute +# - conditional-step: +# condition-kind: current-status +# condition-worst: SUCCESS +# condtion-best: SUCCESS +# on-evaluation-failure: mark-unstable +# steps: +# - shell: 'echo "Tests Passed"' -{% for stream in scenarios %} -# {{ stream }} Daily - job-template: - name: 'apex-daily-{{ stream }}' + name: 'apex-daily-{stream}' # Job template for daily build # @@ -707,75 +782,66 @@ # branch: branch (eg. stable) project-type: 'multijob' - node: '{{ build_slave[stream] }}' + node: '{baremetal-slave}' - disabled: false + disabled: '{obj:disable_daily}' scm: - - git-scm + - git-scm parameters: - - '{project}-defaults' - - '{project}-baremetal-{{ stream }}-defaults' - - project-parameter: - project: '{project}' - branch: '{{ branch[stream] }}' - - apex-parameter: - gs-pathname: '{{ gspathname[stream] }}' + - '{project}-defaults' + - '{project}-baremetal-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' properties: - - logrotate-default + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' triggers: - - 'apex-{{ stream }}' + - 'apex-{stream}' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-{{ stream }}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: 'Verify and upload ISO' - condition: SUCCESSFUL - projects: - - name: 'apex-verify-iso-{{ stream }}' - current-parameters: false - predefined-parameters: | - BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC= - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: Baremetal Deploy and Test Phase - condition: SUCCESSFUL - projects: -{% for scenario in scenarios[stream] %} - - name: 'apex-{{ scenario }}-baremetal-{{ stream }}' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false -{% endfor %} -{% endfor %} + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: 'Verify and upload ISO' + condition: SUCCESSFUL + projects: + - name: 'apex-verify-iso-{stream}' + current-parameters: false + predefined-parameters: | + BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - apex-builder-{stream} # snapshot create - job-template: @@ -789,8 +855,8 @@ disabled: false builders: - - shell: - !include-raw-escape: ./apex-snapshot-create.sh + - shell: + !include-raw-escape: ./apex-snapshot-create.sh # snapshot upload - job-template: @@ -804,9 +870,9 @@ disabled: false builders: - - inject: - properties-content: ARTIFACT_TYPE=snapshot - - 'apex-upload-artifact' + - inject: + properties-content: ARTIFACT_TYPE=snapshot + - 'apex-upload-artifact' # CSIT promote - job-template: @@ -822,103 +888,103 @@ disabled: false scm: - - git-scm + - git-scm parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' + - 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-runner.*' - - 'apex-daily.*' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-daily.*' triggers: - - timed: '0 12 * * 0' + - timed: '0 12 * * 0' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-csit-noha - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-nofeature-noha - FUNCTEST_SUITE_NAME=tempest_smoke_serial - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: create snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: upload snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-csit-noha + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + FUNCTEST_SUITE_NAME=tempest_smoke_serial + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-upload-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false # FDIO promote - job-template: @@ -934,83 +1000,233 @@ disabled: false scm: - - git-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-runner.*' + - 'apex-daily.*' + + builders: + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-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 + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-upload-snapshot' + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +# Flex job +- job-template: + name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + + project-type: 'multijob' + + disabled: false + + node: 'flex-pod2' + + scm: + - git-scm + + triggers: + - 'apex-{stream}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' properties: - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-deploy.*' - - 'apex-runner.*' - - 'apex-daily.*' + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-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 - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: create snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=fdio - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false - - multijob: - name: upload snapshot - condition: SUCCESSFUL - projects: - - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=fdio - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +# Dovetail Danube test job +- job-template: + name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' + + project-type: 'multijob' + + node: 'huawei-pod4' + + disabled: false + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: 'stable/danube' + - apex-parameter: + gs-pathname: '/danube' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + + triggers: + - timed: '' #'0 1 * * *' + + builders: + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-danube' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - name: 'dovetail-apex-baremetal-proposed_tests-danube' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false ######################## # parameter macros @@ -1018,84 +1234,88 @@ - parameter: name: apex-parameter parameters: - - string: - name: ARTIFACT_NAME - default: 'latest' - description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" - - string: - name: ARTIFACT_VERSION - default: 'daily' - description: "Artifact version type" - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/.build - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: CACHE_DIRECTORY - default: $HOME/opnfv/apex-cache{gs-pathname} - description: "Directory where the cache to be used during the build is located." - - 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." - - string: - name: GS_PATHNAME - default: '{gs-pathname}' - description: "Version directory where opnfv artifacts are stored in gs repository" - - string: - name: GS_URL - default: $GS_BASE{gs-pathname} - description: "URL to Google Storage." - - string: - name: PROMOTE - default: 'False' - description: "Flag to know if we should promote/upload snapshot artifacts." + - string: + name: ARTIFACT_NAME + default: 'latest' + description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" + - string: + name: ARTIFACT_VERSION + default: 'daily' + description: "Artifact version type" + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/.build + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: CACHE_DIRECTORY + default: $HOME/opnfv/apex-cache{gs-pathname} + description: "Directory where the cache to be used during the build is located." + # yamllint disable rule:line-length + - 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." + # yamllint enable rule:line-length + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where opnfv artifacts are stored in gs repository" + - string: + name: GS_URL + default: $GS_BASE{gs-pathname} + description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros ######################## +{% for stream in scenarios %} +# {{ stream }} Builder - builder: - name: 'apex-unit-test' - builders: - - shell: - !include-raw: ./apex-unit-test.sh - -- builder: - name: 'apex-build' + name: apex-builder-{{ stream }} builders: - - shell: - !include-raw: ./apex-build.sh + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: +{%- for scenario in scenarios[stream] %} + - name: 'apex-{{ scenario }}-baremetal-{{ stream }}' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false +{%- endfor %} +{% endfor -%} - builder: - name: 'apex-workspace-cleanup' + name: 'apex-unit-test' builders: - - shell: - !include-raw: ./apex-workspace-cleanup.sh - -- builder: - name: 'apex-iso-verify' - builders: - - shell: - !include-raw: ./apex-iso-verify.sh - + - shell: + !include-raw: ./apex-unit-test.sh - builder: name: 'apex-upload-artifact' builders: - - shell: - !include-raw: ./apex-upload-artifact.sh + - shell: + !include-raw: ./apex-upload-artifact.sh - builder: name: 'apex-download-artifact' builders: - - shell: - !include-raw: ./apex-download-artifact.sh + - shell: + !include-raw: ./apex-download-artifact.sh - builder: name: 'apex-deploy' builders: - - shell: - !include-raw: ./apex-deploy.sh + - shell: + !include-raw: ./apex-deploy.sh ####################### # trigger macros @@ -1103,9 +1323,15 @@ - trigger: name: 'apex-master' triggers: - - timed: '0 12 * * *' + - timed: '0 3 1 1 7' + +- trigger: + name: 'apex-euphrates' + triggers: + - timed: '0 12 * * *' + - trigger: name: 'apex-danube' triggers: - - timed: '0 3 1 1 7' + - timed: '0 3 1 1 7' diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index 748cd21b8..3b6b48502 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -4,6 +4,45 @@ master: - 'os-odl-nofeature-ha' - 'os-odl-nofeature-noha' - 'os-odl-bgpvpn-ha' + - 'os-ovn-nofeature-noha' + - 'os-nosdn-fdio-noha' + - 'os-nosdn-fdio-ha' + - 'os-odl-fdio-noha' + - 'os-odl-fdio-ha' + - 'os-nosdn-bar-ha' + - 'os-nosdn-bar-noha' + - 'os-nosdn-nofeature-ha-ipv6' + - 'os-nosdn-ovs_dpdk-noha' + - 'os-nosdn-ovs_dpdk-ha' + - 'os-nosdn-kvm_ovs_dpdk-noha' + - 'os-nosdn-kvm_ovs_dpdk-ha' + - 'os-odl-sfc-noha' + - 'os-odl-sfc-ha' + - 'os-odl-fdio_dvr-noha' + - 'os-odl-fdio_dvr-ha' +euphrates: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' + - 'os-odl-nofeature-ha' + - 'os-odl-nofeature-noha' + - 'os-odl-bgpvpn-ha' + - 'os-ovn-nofeature-noha' + - 'os-nosdn-fdio-noha' + - 'os-nosdn-fdio-ha' + - 'os-odl-fdio-noha' + - 'os-odl-fdio-ha' + - 'os-nosdn-bar-ha' + - 'os-nosdn-bar-noha' + - 'os-nosdn-nofeature-ha-ipv6' + - 'os-nosdn-ovs_dpdk-noha' + - 'os-nosdn-ovs_dpdk-ha' + - 'os-nosdn-kvm_ovs_dpdk-noha' + - 'os-nosdn-kvm_ovs_dpdk-ha' + - 'os-odl-sfc-noha' + - 'os-odl-sfc-ha' + - 'os-odl-fdio_dvr-noha' + - 'os-odl-fdio_dvr-ha' + - 'os-nosdn-calipso-noha' danube: - 'os-nosdn-nofeature-noha' - 'os-nosdn-nofeature-ha' diff --git a/jjb/apex/update-build-result.groovy b/jjb/apex/update-build-result.groovy new file mode 100644 index 000000000..9edca6b6b --- /dev/null +++ b/jjb/apex/update-build-result.groovy @@ -0,0 +1,5 @@ +import hudson.model.* +if (manager.logContains('^.*apex-deploy-baremetal.*SUCCESS$') + && manager.build.@result == hudson.model.Result.FAILURE) { + manager.build.@result = hudson.model.Result.UNSTABLE +} diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index e7de31908..f8ed35283 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -1,113 +1,73 @@ +--- # jenkins job templates for Armband - project: name: 'armband-ci' project: 'armband' -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - disabled: false - danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# CI POD's -#-------------------------------- -# danube -#-------------------------------- + stream: master + branch: '{stream}' + gs-pathname: '' + disabled: false + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + # ------------------------------- + # DEPLOY TYPE ANCHORS + # ------------------------------- + baremetal: &baremetal + installer: 'fuel' + deploy-type: 'baremetal' + slave-label: 'armband-{deploy-type}' + virtual: &virtual + installer: 'fuel' + deploy-type: 'virtual' + slave-label: 'armband-{deploy-type}' + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- + # CI POD's + # ------------------------------- + # euphrates + # ------------------------------- pod: - - armband-baremetal: - slave-label: armband-baremetal - installer: fuel - <<: *danube - - armband-virtual: - slave-label: armband-virtual - installer: fuel - <<: *danube -#-------------------------------- -# master -#-------------------------------- - - armband-baremetal: - slave-label: armband-baremetal - installer: fuel - <<: *master - - armband-virtual: - slave-label: armband-virtual - installer: fuel - <<: *master -#-------------------------------- -# NONE-CI POD's -#-------------------------------- -# danube -#-------------------------------- - - arm-pod2: - slave-label: arm-pod2 - installer: fuel - <<: *danube - - arm-pod3: - slave-label: arm-pod3 - installer: fuel - <<: *danube - - arm-pod4: - slave-label: arm-pod4 - installer: fuel - <<: *danube - - arm-virtual1: - slave-label: arm-virtual1 - installer: fuel - <<: *danube -#-------------------------------- -# master -#-------------------------------- - - arm-pod2: - slave-label: arm-pod2 - installer: fuel - <<: *master - - arm-pod3: - slave-label: arm-pod3 - installer: fuel - <<: *master - - arm-pod4: - slave-label: arm-pod4 - installer: fuel - <<: *master - - arm-virtual1: - slave-label: arm-virtual1 - installer: fuel - <<: *master -#-------------------------------- -# scenarios -#-------------------------------- + - armband-baremetal: + <<: *baremetal + <<: *euphrates + - armband-virtual: + <<: *virtual + <<: *euphrates + # ------------------------------- + # master + # ------------------------------- + - armband-baremetal: + <<: *baremetal + <<: *master + - armband-virtual: + <<: *virtual + <<: *master + # ------------------------------- + # scenarios + # ------------------------------- scenario: - # HA scenarios - - 'os-nosdn-nofeature-ha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l2-nofeature-ha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l3-nofeature-ha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l2-bgpvpn-ha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l2-sfc-ha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' + # HA scenarios + - 'os-nosdn-nofeature-ha': + auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' + - 'os-odl-nofeature-ha': + auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - # NOHA scenarios - - 'os-odl_l2-nofeature-noha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l2-sfc-noha': - auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' + # NOHA scenarios + - 'os-nosdn-nofeature-noha': + auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' jobs: - - '{installer}-{scenario}-{pod}-daily-{stream}' - - '{installer}-deploy-{pod}-daily-{stream}' + - '{installer}-{scenario}-{pod}-daily-{stream}' + - '{installer}-deploy-{pod}-daily-{stream}' ######################## # job templates @@ -120,90 +80,101 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '{installer}-os-.*?-{pod}-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-os-.*?-{pod}-daily-.*' + - 'armband-verify-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - armband-ci-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' builders: - - trigger-builds: - - project: '{installer}-deploy-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-{installer}-{pod}-daily-{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: 'yardstick-{installer}-{pod}-daily-{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' - # 1.dovetail only master, based on D release - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only proposed_tests testsuite here(refstack, ha, ipv6, bgpvpn) - # 4.not used for release criteria or compliance, - # only to debug the dovetail tool bugs with arm pods - # 5.only run against scenario os-(nosdn|odl_l2)-(nofeature-bgpvpn)-ha - - conditional-step: - condition-kind: regex-match - regex: os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha - label: '{scenario}' - steps: - - trigger-builds: - - project: 'dovetail-{installer}-{pod}-proposed_tests-{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: '{installer}-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-{installer}-{pod}-arm-daily-{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: 'yardstick-{installer}-{pod}-daily-{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' + # 1.dovetail only master, based on D release + # 2.here the stream means the SUT stream, + # dovetail stream is defined in its own job + # 3.only proposed_tests testsuite here(refstack, ha, ipv6, bgpvpn) + # 4.not used for release criteria or compliance, + # only to debug the dovetail tool bugs with arm pods + # 5.only run against scenario os-(nosdn|odl)-(nofeature-bgpvpn)-ha + - conditional-step: + condition-kind: regex-match + regex: os-(nosdn|odl)-(nofeature|bgpvpn)-ha + label: '{scenario}' + steps: + - trigger-builds: + - project: 'dovetail-{installer}-{pod}-proposed_tests-master' + 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' + # Armband uses Fuel's log collection project job, no need to duplicate + - trigger-builds: + - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}' + current-parameters: false + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{installer}-deploy-{pod}-daily-{stream}' @@ -211,449 +182,108 @@ 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: - - '{installer}-deploy-{pod}-daily-{stream}' - - '{installer}-deploy-generic-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-deploy-{pod}-daily-{stream}' + - '{installer}-deploy-generic-daily-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - armband-ci-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl-nofeature-ha' scm: - - git-scm + - git-scm wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' builders: - - shell: - !include-raw-escape: ./armband-download-artifact.sh - - shell: - !include-raw-escape: ./armband-deploy.sh + - shell: + !include-raw-escape: ../fuel/fuel-deploy.sh publishers: - - email: - recipients: armband@enea.com - -######################## -# parameter macros -######################## -- parameter: - name: armband-ci-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." - - string: - name: SSH_KEY - default: "/tmp/mcp.rsa" - description: "Path to private SSH key to access environment nodes. For MCP deployments only." + - email: + recipients: armband@enea.com + - email-jenkins-admins-on-failure ######################## # trigger macros ######################## # CI PODs -#----------------------------------------------------------------- +# ---------------------------------------------------------------- # Enea Armband CI Baremetal Triggers running against master branch -#----------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger' - triggers: - - timed: '' +# ---------------------------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-master-trigger' - triggers: - - timed: '' - -#---------------------------------------------------------------------- -# Enea Armband CI Baremetal Triggers running against danube branch -#---------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-danube-trigger' - triggers: - - timed: '0 0,16 * * 2,4' + - timed: '0 16 * * 2,4,6' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 1,5,7' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 16 * * 1,5,7' + - timed: '0 16 * * 1,3,5,7' +# --------------------------------------------------------------------- +# Enea Armband CI Baremetal Triggers running against euphrates branch +# --------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '0 8 * * 2,4,6' + - timed: '0 1 * * 2,4,6' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-euphrates-trigger' triggers: - - timed: '0 8 * * 1,3,5,7' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '0 0 * * 3,6' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-danube-trigger' - triggers: - - timed: '0 16 * * 3,6' -#--------------------------------------------------------------- + - timed: '0 1 * * 1,3,5,7' +# -------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch -#--------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-master-trigger' - triggers: - - timed: '' +# -------------------------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-virtual-master-trigger' - triggers: - - timed: '' -#-------------------------------------------------------------------- -# Enea Armband CI Virtual Triggers running against danube branch -#-------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-armband-virtual-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-armband-virtual-danube-trigger' - triggers: - - timed: '' - -#-------------------------------------------------------------------- -# Enea Armband Non CI Virtual Triggers running against danube branch -#-------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-virtual1-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-virtual1-danube-trigger' - triggers: - - timed: '' - -#-------------------------------------------------------------------- -# Enea Armband Non CI Virtual Triggers running against master branch -#-------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-virtual1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-virtual1-master-trigger' - triggers: - - timed: '' - -#---------------------------------------------------------- -# Enea Armband POD 2 Triggers running against master branch -#---------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod2-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod2-master-trigger' - triggers: - - timed: '' -#--------------------------------------------------------------- -# Enea Armband POD 2 Triggers running against danube branch -#--------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod2-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod2-danube-trigger' - triggers: - - timed: '' -#---------------------------------------------------------- -# Enea Armband POD 3 Triggers running against master branch -#---------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-master-trigger' - triggers: - - timed: '' -#--------------------------------------------------------------- -# Enea Armband POD 3 Triggers running against danube branch -#--------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-danube-trigger' - triggers: - - timed: '' -#-------------------------------------------------------------------------- -# Enea Armband POD 3 Triggers running against master branch (aarch64 slave) -#-------------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod4-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod4-master-trigger' - triggers: - - timed: '' -#-------------------------------------------------------------------------- -# Enea Armband POD 3 Triggers running against danube branch (aarch64 slave) -#-------------------------------------------------------------------------- -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod4-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod4-danube-trigger' - triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod4-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod4-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-virtual-master-trigger' triggers: - - timed: '' + - timed: '' +# ------------------------------------------------------------------- +# Enea Armband CI Virtual Triggers running against euphrates branch +# ------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod4-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod4-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod4-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '' diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh deleted file mode 100755 index 9964ed5cc..000000000 --- a/jjb/armband/armband-deploy.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# (c) 2017 Enea Software AB -# 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 - -export TERM="vt220" - -if [[ "$BRANCH" != 'master' ]]; then - # 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" -fi - -if [[ "$JOB_NAME" =~ "merge" ]]; then - # set simplest scenario for virtual deploys to run for merges - DEPLOY_SCENARIO="os-nosdn-nofeature-ha" -elif [[ "$BRANCH" != 'master' ]]; then - # for none-merge deployments - # checkout the commit that was used for building the downloaded artifact - # to make sure the ISO and deployment mechanism uses same versions - echo "Checking out $OPNFV_GIT_SHA1" - git checkout $OPNFV_GIT_SHA1 --quiet -fi - -# set deployment parameters -export TMPDIR=${WORKSPACE}/tmpdir - -# arm-pod4 is an aarch64 jenkins slave for the same POD as the -# x86 jenkins slave arm-pod3; therefore we use the same pod name -# to deploy the pod from both jenkins slaves -if [[ "${NODE_NAME}" == "arm-pod4" ]]; then - NODE_NAME="arm-pod3" -fi - -LAB_NAME=${NODE_NAME/-*} -POD_NAME=${NODE_NAME/*-} - -# we currently support enea -if [[ ! $LAB_NAME =~ (arm|enea) ]]; then - echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" - exit 1 -fi - -echo "Using configuration for $LAB_NAME" - -# create TMPDIR if it doesn't exist -mkdir -p $TMPDIR - -cd $WORKSPACE -if [[ $LAB_CONFIG_URL =~ ^(git|ssh):// ]]; then - 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 - local_env="${WORKSPACE}/lab-config/labs/$LAB_NAME/$POD_NAME/fuel/config/local_env" - if [ -e $local_env ]; then - echo "-- Sourcing local environment file" - source $local_env - fi -fi - -if [[ "$NODE_NAME" =~ "virtual" ]]; then - POD_NAME="virtual_kvm" -fi - -# releng wants us to use nothing else but opnfv.iso for now. We comply. -ISO_FILE=$WORKSPACE/opnfv.iso - -# log file name -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}/${BRANCH##*/}/deploy-cache -if [[ -d "${DEPLOY_CACHE}" ]]; then - echo "Deploy cache dir present." - echo "--------------------------------------------------------" - echo "Fuel@OPNFV deploy cache: ${DEPLOY_CACHE}" - DEPLOY_CACHE="-C ${DEPLOY_CACHE}" -else - DEPLOY_CACHE="" -fi - -# construct the command -DEPLOY_COMMAND="$WORKSPACE/ci/deploy.sh -b ${LAB_CONFIG_URL} \ - -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://${ISO_FILE} \ - -H -B ${DEFAULT_BRIDGE:-pxebr} -S $TMPDIR -L $WORKSPACE/$FUEL_LOG_FILENAME \ - ${DEPLOY_CACHE}" - -# log info to console -echo "Deployment parameters" -echo "--------------------------------------------------------" -echo "Scenario: $DEPLOY_SCENARIO" -echo "Lab: $LAB_NAME" -echo "POD: $POD_NAME" -[[ "$BRANCH" != 'master' ]] && 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!" - -# upload logs for baremetal deployments -# work with virtual deployments is still going on so we skip that for the timebeing -if [[ "$JOB_NAME" =~ "baremetal-daily" ]]; then - echo "Uploading deployment logs" - gsutil cp $WORKSPACE/$FUEL_LOG_FILENAME gs://$GS_URL/logs/$FUEL_LOG_FILENAME > /dev/null 2>&1 - echo "Logs are available as http://$GS_URL/logs/$FUEL_LOG_FILENAME" -fi - -if [[ $exit_code -ne 0 ]]; then - echo "Deployment failed!" - exit $exit_code -else - echo "Deployment is successful!" -fi diff --git a/jjb/armband/armband-download-artifact.sh b/jjb/armband/armband-download-artifact.sh deleted file mode 100755 index 4f83305d4..000000000 --- a/jjb/armband/armband-download-artifact.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# (c) 2017 Enea AB -# 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 pipefail - -# disable Fuel ISO download for master branch -[[ "$BRANCH" == 'master' ]] && exit 0 - -echo "Host info: $(hostname) $(hostname -I)" - -# Configurable environment variables: -# ISOSTORE (/iso_mount/opnfv_ci) - -if [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties" - # get the properties file for the Armband Fuel ISO built for a merged change - curl -f -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties -else - # get the latest.properties file in order to get info regarding latest artifact - echo "Downloading http://$GS_URL/latest.properties" - curl -f -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties -fi - -# source the file so we get artifact metadata, it will exit if it doesn't exist -source latest.properties - -# echo the info about artifact that is used during the deployment -OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/} -echo "Using $OPNFV_ARTIFACT for deployment" - -# Releng doesn't want us to use anything but opnfv.iso for now. We comply. -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}/${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} - echo "--------------------------------------------------------" - echo - ls -al ${ISO_FILE} - echo - echo "--------------------------------------------------------" - echo "Done!" - exit 0 - fi -fi - -# Use gsutils if available -if $(which gsutil &>/dev/null); then - DOWNLOAD_URL="gs://$OPNFV_ARTIFACT_URL" - CMD="gsutil cp ${DOWNLOAD_URL} ${ISO_FILE}" -else - # download image - # -f returns error if the file was not found or on server error - DOWNLOAD_URL="http://$OPNFV_ARTIFACT_URL" - CMD="curl -f -s -o ${ISO_FILE} ${DOWNLOAD_URL}" -fi - -# log info to console -echo "Downloading the $INSTALLER_TYPE artifact using URL $DOWNLOAD_URL" -echo "This could take some time..." -echo "--------------------------------------------------------" -echo "$CMD" -$CMD -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/armband/armband-project-jobs.yml b/jjb/armband/armband-project-jobs.yml deleted file mode 100644 index f6840a008..000000000 --- a/jjb/armband/armband-project-jobs.yml +++ /dev/null @@ -1,94 +0,0 @@ -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### -- project: - name: armband - - project: '{name}' - - installer: 'fuel' - - jobs: - - 'armband-{installer}-build-daily-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'armband-{installer}-build-daily-{stream}' - - disabled: '{obj:disabled}' - - concurrent: false - - properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-enea-defaults' - - '{installer}-defaults' - - armband-project-parameter: - gs-pathname: '{gs-pathname}' - - scm: - - git-scm - - triggers: - - pollscm: - cron: '0 H/4 * * *' - - wrappers: - - timeout: - timeout: 360 - fail: true - - builders: - - shell: - !include-raw-escape: ./build.sh - - shell: - !include-raw-escape: ./upload-artifacts.sh - - publishers: - - email: - recipients: armband@enea.com - -######################## -# parameter macros -######################## -- parameter: - name: armband-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." - - choice: - name: FORCE_BUILD - choices: - - 'false' - - 'true' - description: 'Force build even if there are no changes in the armband repo. Default false' diff --git a/jjb/armband/armband-verify-jobs.yml b/jjb/armband/armband-verify-jobs.yml index 567456d9b..04ade724a 100644 --- a/jjb/armband/armband-verify-jobs.yml +++ b/jjb/armband/armband-verify-jobs.yml @@ -1,39 +1,38 @@ +--- - project: name: 'armband-verify-jobs' project: 'armband' installer: 'fuel' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + ##################################### + # patch verification phases + ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-enea' - - 'build': - slave-label: 'opnfv-build-enea' - - 'deploy-virtual': - slave-label: 'opnfv-build-enea' - - 'smoke-test': - slave-label: 'opnfv-build-enea' -##################################### -# jobs -##################################### + - 'basic': + slave-label: 'armband-virtual' + - 'deploy-virtual': + slave-label: 'armband-virtual' + - 'smoke-test': + slave-label: 'armband-virtual' + ##################################### + # jobs + ##################################### jobs: - - 'armband-verify-{stream}' - - 'armband-verify-{phase}-{stream}' + - 'armband-verify-{stream}' + - 'armband-verify-{phase}-{stream}' ##################################### # job templates ##################################### @@ -47,118 +46,110 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-virtual-daily-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + 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: 'ci/**' - - compare-type: ANT - pattern: 'patches/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - readable-message: true + - 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: 'ci/**' + - compare-type: ANT + pattern: 'patches/**' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-enea-defaults' - - 'armband-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'armband-virtual-defaults': + installer: '{installer}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'armband-verify-basic-{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: build - condition: SUCCESSFUL - projects: - - name: 'armband-verify-build-{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-virtual - condition: SUCCESSFUL - projects: - - name: 'armband-verify-deploy-virtual-{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: smoke-test - condition: SUCCESSFUL - projects: - - name: 'armband-verify-smoke-test-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'armband-verify-basic-{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-virtual + condition: SUCCESSFUL + projects: + - name: 'armband-verify-deploy-virtual-{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: smoke-test + condition: SUCCESSFUL + projects: + - name: 'armband-verify-smoke-test-{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 - job-template: name: 'armband-verify-{phase}-{stream}' @@ -168,88 +159,63 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 6 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'armband-verify-deploy-.*' - - 'armband-verify-test-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 2 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'armband-verify-deploy-.*' + - 'armband-verify-test-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - '{installer}-defaults' - - 'armband-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + - 'armband-virtual-defaults': + installer: '{installer}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' ##################################### # builder macros ##################################### - builder: name: 'armband-verify-basic-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" - -- builder: - name: 'armband-verify-build-macro' - builders: - - shell: - !include-raw: ./build.sh - - shell: - !include-raw: ./armband-workspace-cleanup.sh + echo "Not activated!" - builder: name: 'armband-verify-deploy-virtual-macro' builders: - - shell: | - #!/bin/bash - - echo "Not activated!" + - shell: + !include-raw: ../fuel/fuel-deploy.sh - builder: name: 'armband-verify-smoke-test-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" -##################################### -# parameter macros -##################################### -- parameter: - name: 'armband-verify-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." + echo "Not activated!" diff --git a/jjb/armband/armband-workspace-cleanup.sh b/jjb/armband/armband-workspace-cleanup.sh deleted file mode 100755 index d8948c7a0..000000000 --- a/jjb/armband/armband-workspace-cleanup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# delete the $WORKSPACE to open some space -/bin/rm -rf $WORKSPACE diff --git a/jjb/armband/build.sh b/jjb/armband/build.sh deleted file mode 100755 index 29c01bb38..000000000 --- a/jjb/armband/build.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# Copyright (c) 2017 Enea AB. -# 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 -############################################################################## - -# disable Armband iso build for master branch -if [[ "$BRANCH" == 'master' ]]; then - touch $WORKSPACE/.noupload - echo "--------------------------------------------------------" - echo "Done!" - exit 0 -fi - -set -o errexit -set -o nounset -set -o pipefail - -export TERM="vt220" - -echo "Host info: $(hostname) $(hostname -I)" - -cd $WORKSPACE - -# Armband requires initializing git submodules (e.g. for Fuel's clean_cache.sh) -make submodules-init - -# remove the expired items from cache -test -f $WORKSPACE/ci/clean_cache.sh && $WORKSPACE/ci/clean_cache.sh $CACHE_DIRECTORY - -LATEST_ISO_PROPERTIES=$WORKSPACE/latest.iso.properties -if [[ "$JOB_NAME" =~ "daily" ]]; then - # check to see if we already have an artifact on artifacts.opnfv.org - # for this commit during daily builds - echo "Checking to see if we already built and stored Armband Fuel ISO for this commit" - - curl -s -o $LATEST_ISO_PROPERTIES http://$GS_URL/latest.properties 2>/dev/null -fi - -# get metadata of latest ISO -if grep -q OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES 2>/dev/null; then - LATEST_ISO_SHA1=$(grep OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES | cut -d'=' -f2) - LATEST_ISO_URL=$(grep OPNFV_ARTIFACT_URL $LATEST_ISO_PROPERTIES | cut -d'=' -f2) -else - LATEST_ISO_SHA1=none -fi - -# get current SHA1 -CURRENT_SHA1=$(git rev-parse HEAD) - -# set FORCE_BUILD to false for non-daily builds -FORCE_BUILD=${FORCE_BUILD:-false} - -if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" && "$FORCE_BUILD" == "false" ]]; then - echo "***************************************************" - echo " An ISO has already been built for this commit" - echo " $LATEST_ISO_URL" - echo "***************************************************" -else - echo "This commit has not been built yet or forced build! Proceeding with the build." - /bin/rm -f $LATEST_ISO_PROPERTIES - echo -fi - -# log info to console -echo "Starting the build of Armband $INSTALLER_TYPE. This could take some time..." -echo "-----------------------------------------------------------" -echo - -# create the cache directory if it doesn't exist -mkdir -p $CACHE_DIRECTORY - -# set OPNFV_ARTIFACT_VERSION -if [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Building Fuel ISO for a merged change" - export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER" - echo "Not supported" - exit 1 -else - export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") -fi - -NOCACHE_PATTERN="verify: no-cache" -if [[ "$JOB_NAME" =~ "verify" && "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "$NOCACHE_PATTERN" ]]; then - echo "The cache will not be used for this build!" - NOCACHE_ARG="-f P" -fi -NOCACHE_ARG=${NOCACHE_ARG:-} - -# start the build -cd $WORKSPACE/ci -./build.sh -v $OPNFV_ARTIFACT_VERSION $NOCACHE_ARG -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY - -# list the build artifacts -ls -al $BUILD_DIRECTORY - -# 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/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 - -echo -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/armband/upload-artifacts.sh b/jjb/armband/upload-artifacts.sh deleted file mode 100755 index 97987e2c5..000000000 --- a/jjb/armband/upload-artifacts.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o pipefail - -# configurable environment variables: -# ISOSTORE (/iso_mount/opnfv_ci) - -# check if we built something -if [ -f $WORKSPACE/.noupload ]; then - echo "Nothing new to upload. Exiting." - /bin/rm -f $WORKSPACE/.noupload - exit 0 -fi - -# source the opnfv.properties to get ARTIFACT_VERSION -source $WORKSPACE/opnfv.properties - - -# 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=${ISOSTORE:-/iso_mount/opnfv_ci} - if [[ -d "$ISOSTORE" ]]; then - ISOSTORE=${ISOSTORE}/${BRANCH##*/} - mkdir -p $ISOSTORE - - # remove all but most recent 3 ISOs first to keep iso_mount clean & tidy - cd $ISOSTORE - ls -tp | grep -v '/' | tail -n +4 | xargs -d '\n' /bin/rm -f -- - - # store ISO - echo "Storing latest ISO in local storage" - touch .storing - /bin/cp -f $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ - $ISOSTORE/opnfv-$OPNFV_ARTIFACT_VERSION.iso - rm .storing - fi -fi - -# log info to console -echo "Uploading armband artifacts. This could take some time..." -echo - -echo "Started at $(date)" -cd $WORKSPACE -# upload artifact and additional files to google storage -gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 -gsutil cp $WORKSPACE/opnfv.properties \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 -if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then - gsutil cp $WORKSPACE/opnfv.properties \ - gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 -elif [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Uploaded Armband Fuel ISO for a merged change" -fi -echo "Ended at $(date)" - -gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://$GS_URL/latest.properties \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1 - -gsutil -m setmeta \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /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 gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 -if [[ $? -ne 0 ]]; then - echo "Problem while uploading artifact!" - echo "Check log $WORKSPACE/gsutil.iso.log on the machine where this build is done." - exit 1 -fi - -echo "Done!" -echo -echo "--------------------------------------------------------" -echo -echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" -echo -echo "--------------------------------------------------------" -echo diff --git a/jjb/auto/auto.yml b/jjb/auto/auto.yml new file mode 100644 index 000000000..fefa37626 --- /dev/null +++ b/jjb/auto/auto.yml @@ -0,0 +1,56 @@ +--- +- project: + name: auto + + project: '{name}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + jobs: + - 'auto-verify-{stream}' + +- job-template: + name: 'auto-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - shell: | + echo "Nothing to verify!" diff --git a/jjb/availability/availability.yml b/jjb/availability/availability.yml index 302bbc996..a8f629734 100644 --- a/jjb/availability/availability.yml +++ b/jjb/availability/availability.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'availability-verify-{stream}' + - 'availability-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: 'false' - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: 'false' + - master: + branch: '{stream}' + gs-pathname: '' + disabled: 'false' + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: 'false' - job-template: name: 'availability-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/barometer/barometer-upload-artifact.sh b/jjb/barometer/barometer-upload-artifact.sh index 817cc5770..0f639b5d9 100644 --- a/jjb/barometer/barometer-upload-artifact.sh +++ b/jjb/barometer/barometer-upload-artifact.sh @@ -2,6 +2,7 @@ set -o nounset set -o pipefail +RPM_LIST=$WORKSPACE/ci/utilities/rpms_list RPM_WORKDIR=$WORKSPACE/rpmbuild RPM_DIR=$RPM_WORKDIR/RPMS/x86_64/ cd $WORKSPACE/ @@ -9,9 +10,32 @@ cd $WORKSPACE/ # source the opnfv.properties to get ARTIFACT_VERSION source $WORKSPACE/opnfv.properties -# upload property files -gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1 -gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 +# Check if all the appropriate RPMs were generated +echo "Checking if all the Barometer RPMs were created" +echo "-----------------------------------------------" +echo + +if [ -d $RPM_DIR ] +then + ls $RPM_DIR > list_of_gen_pack +else + echo "Can't access folder $RPM_DIR with rpm packages" + echo "Barometer nightly build FAILED" + exit 1 +fi + +for PACKAGENAME in `cat $RPM_LIST` +do + if ! grep -q $PACKAGENAME list_of_gen_pack + then + echo "$PACKAGENAME is missing" + echo "Barometer nightly build FAILED" + exit 2 + fi +done + +#remove the file you no longer need. +rm list_of_gen_pack echo "Uploading the barometer RPMs to artifacts.opnfv.org" echo "---------------------------------------------------" @@ -25,6 +49,10 @@ if [[ $? -ne 0 ]]; then echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!" echo "Check log $WORKSPACE/gsutil.log on the appropriate build server" exit 1 +else + # upload property files only if build is successful + gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1 + gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 fi gsutil -m setmeta \ diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index 2d3e972f8..d29673820 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,19 +9,19 @@ project: '{name}' jobs: - - 'barometer-verify-{stream}' - - 'barometer-merge-{stream}' - - 'barometer-daily-{stream}' + - 'barometer-verify-{stream}' + - 'barometer-merge-{stream}' + - 'barometer-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'barometer-verify-{stream}' @@ -28,44 +29,44 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - pwd - cd src - make clobber - make + - shell: | + pwd + cd src + make clobber + make - job-template: name: 'barometer-merge-{stream}' @@ -77,46 +78,46 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 3 - max-per-node: 2 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 3 + max-per-node: 2 + option: 'project' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - shell: | - pwd - cd src - make clobber - make + - shell: | + pwd + cd src + make clobber + make - job-template: name: 'barometer-daily-{stream}' @@ -128,27 +129,27 @@ concurrent: false properties: - - logrotate-default + - logrotate-default parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - barometer-project-parameter: - gs-pathname: '{gs-pathname}' - - 'opnfv-build-centos-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - barometer-project-parameter: + gs-pathname: '{gs-pathname}' + - 'opnfv-build-centos-defaults' scm: - - git-scm + - git-scm triggers: - - timed: '@midnight' + - timed: '@midnight' builders: - - shell: - !include-raw-escape: ./barometer-build.sh - - shell: - !include-raw-escape: ./barometer-upload-artifact.sh + - shell: + !include-raw-escape: ./barometer-build.sh + - shell: + !include-raw-escape: ./barometer-upload-artifact.sh ######################## # parameter macros @@ -156,7 +157,7 @@ - parameter: name: barometer-project-parameter parameters: - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "URL to Google Storage." + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "URL to Google Storage." diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml index c56ca19e9..1d31f2775 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml @@ -1,3 +1,4 @@ +--- #################################### # job configuration for bottlenecks #################################### @@ -6,77 +7,75 @@ project: 'bottlenecks' -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - #This is used for common project file storage - gs-pathname: '' - #This is used for different test suite dependent packages storage - gs-packagepath: '/{suite}' - #docker tag used for version control - docker-tag: 'latest' - danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - gs-packagepath: '/{stream}/{suite}' - docker-tag: 'stable' -#-------------------------------- -# 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 -#-------------------------------- + stream: master + branch: '{stream}' + # This is used for common project file storage + gs-pathname: '' + # This is used for different test suite dependent packages storage + gs-packagepath: '/{suite}' + # docker tag used for version control + docker-tag: 'latest' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + gs-packagepath: '/{stream}/{suite}' + docker-tag: 'stable' + # ------------------------------- + # 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: -#compass CI PODs - - baremetal: - slave-label: compass-baremetal - installer: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - virtual: - slave-label: compass-virtual - installer: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - baremetal: - slave-label: compass-baremetal - installer: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - virtual: - slave-label: compass-virtual - installer: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - -#-------------------------------- -# None-CI PODs -#-------------------------------- - # - orange-pod2: - # slave-label: '{pod}' - # installer: joid - # auto-trigger-name: 'daily-trigger-disabled' - # <<: *danube - # - orange-pod2: - # slave-label: '{pod}' - # installer: joid - # auto-trigger-name: 'daily-trigger-disabled' - # <<: *master -#-------------------------------------------- + # compass CI PODs + - baremetal: + slave-label: compass-baremetal-master + installer: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - virtual: + slave-label: compass-virtual-master + installer: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - baremetal: + slave-label: compass-baremetal-branch + installer: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - virtual: + slave-label: compass-virtual-branch + installer: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + + # ------------------------------- + # None-CI PODs + # ------------------------------- + # - orange-pod2: + # slave-label: '{pod}' + # installer: joid + # auto-trigger-name: 'daily-trigger-disabled' + # <<: *euphrates + # - orange-pod2: + # slave-label: '{pod}' + # installer: joid + # auto-trigger-name: 'daily-trigger-disabled' + # <<: *master + # ------------------------------------------- suite: - - 'rubbos' - - 'vstf' - - 'posca_stress_traffic' - - 'posca_stress_ping' + - 'posca_stress_traffic' + - 'posca_stress_ping' jobs: - - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}' + - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}' ################################ # job templates @@ -85,52 +84,55 @@ name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: 180 - abort: true + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 180 + abort: true + - fix-workspace-permissions triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - '{installer}-defaults' - - 'bottlenecks-params-{slave-label}' - - string: - name: REPO_DIR - default: "/home/opnfv/bottlenecks" - description: "Directory where the repository is cloned" - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - string: - name: GERRIT_REFSPEC_DEBUG - default: 'true' - description: "Gerrit refspec for debug." - - string: - name: SUITE_NAME - default: '{suite}' - description: "test suite name." - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: "docker image tag used for version control" + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + - '{installer}-defaults' + - 'bottlenecks-params-{slave-label}' + - string: + name: REPO_DIR + default: "/home/opnfv/bottlenecks" + description: "Directory where the repository is cloned" + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - string: + name: GERRIT_REFSPEC_DEBUG + default: 'true' + description: "Gerrit refspec for debug." + - string: + name: SUITE_NAME + default: '{suite}' + description: "test suite name." + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: "docker image tag used for version control" scm: - - git-scm + - git-scm builders: - - 'bottlenecks-env-cleanup' - - 'bottlenecks-run-suite' + - 'bottlenecks-env-cleanup' + - 'bottlenecks-run-suite' + - 'bottlenecks-workspace-cleanup' publishers: - - email: - recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com sunshine.wang@huawei.com + - email: + recipients: gabriel.yuyang@huawei.com, liyin11@huawei.com + - email-jenkins-admins-on-failure ######################## # builder macros @@ -138,39 +140,59 @@ - builder: name: bottlenecks-env-cleanup builders: - - shell: - !include-raw: ./bottlenecks-cleanup.sh + - shell: + !include-raw: ./bottlenecks-cleanup.sh - builder: name: bottlenecks-run-suite builders: - - shell: - !include-raw: ./bottlenecks-run-suite.sh + - shell: + !include-raw: ./bottlenecks-run-suite.sh + +- builder: + name: bottlenecks-workspace-cleanup + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + # delete everything that is in $WORKSPACE + sudo rm -rf $WORKSPACE #################### # parameter macros #################### - parameter: - name: 'bottlenecks-params-compass-baremetal' + name: 'bottlenecks-params-compass-baremetal-master' + parameters: + - string: + name: BOTTLENECKS_DB_TARGET + default: 'http://testresults.opnfv.org/test/api/v1/results' + description: 'Arguments to use in order to choose the backend DB' + +- parameter: + name: 'bottlenecks-params-compass-virtual-master' parameters: - - string: - name: BOTTLENECKS_DB_TARGET - default: '104.197.68.199:8086' - description: 'Arguments to use in order to choose the backend DB' + - string: + name: BOTTLENECKS_DB_TARGET + default: 'http://testresults.opnfv.org/test/api/v1/results' + description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'bottlenecks-params-compass-virtual' + name: 'bottlenecks-params-compass-baremetal-branch' parameters: - - string: - name: BOTTLENECKS_DB_TARGET - default: '' - description: 'Arguments to use in order to choose the backend DB' + - string: + name: BOTTLENECKS_DB_TARGET + default: 'http://testresults.opnfv.org/test/api/v1/results' + description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'bottlenecks-params-orange-pod2' + name: 'bottlenecks-params-compass-virtual-branch' parameters: - - string: - name: BOTTLENECKS_DB_TARGET - default: '104.197.68.199:8086' - description: 'Arguments to use in order to choose the backend DB' + - string: + name: BOTTLENECKS_DB_TARGET + default: 'http://testresults.opnfv.org/test/api/v1/results' + description: 'Arguments to use in order to choose the backend DB' diff --git a/jjb/bottlenecks/bottlenecks-cleanup.sh b/jjb/bottlenecks/bottlenecks-cleanup.sh index 04e620c7f..d0e2088c7 100644 --- a/jjb/bottlenecks/bottlenecks-cleanup.sh +++ b/jjb/bottlenecks/bottlenecks-cleanup.sh @@ -10,6 +10,7 @@ #clean up correlated dockers and their images bash $WORKSPACE/docker/docker_cleanup.sh -d bottlenecks --debug +bash $WORKSPACE/docker/docker_cleanup.sh -d Bottlenecks --debug bash $WORKSPACE/docker/docker_cleanup.sh -d yardstick --debug bash $WORKSPACE/docker/docker_cleanup.sh -d kibana --debug bash $WORKSPACE/docker/docker_cleanup.sh -d elasticsearch --debug diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml index 5dced2aad..93b2d913c 100644 --- a/jjb/bottlenecks/bottlenecks-project-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml @@ -1,3 +1,4 @@ +--- ################################################### # Non-ci jobs for Bottlenecks project # They will only be enabled on request by projects! @@ -8,29 +9,27 @@ project: 'bottlenecks' jobs: - - 'bottlenecks-verify-{stream}' - - 'bottlenecks-merge-{stream}' - - 'bottlenecks-{suite}-upload-artifacts-{stream}' + - 'bottlenecks-verify-{stream}' + - 'bottlenecks-merge-{stream}' + - 'bottlenecks-{suite}-upload-artifacts-{stream}' stream: - - master: - branch: '{stream}' - #This is used for common project file storage - gs-pathname: '' - #This is used for different test suite dependent packages storage - gs-packagepath: '/{suite}' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - gs-packagepath: '/{stream}/{suite}' - disabled: false + - master: + branch: '{stream}' + # This is used for common project file storage + gs-pathname: '' + # This is used for different test suite dependent packages storage + gs-packagepath: '/{suite}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + gs-packagepath: '/{stream}/{suite}' + disabled: false suite: - - 'rubbos' - - 'vstf' - - 'posca_stress_traffic' - - 'posca_stress_ping' + - 'posca_stress_traffic' + - 'posca_stress_ping' ################################ # job templates @@ -42,36 +41,37 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' + - 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}' + builders: - #- bottlenecks-hello - - bottlenecks-unit-tests + # - bottlenecks-hello + - bottlenecks-unit-tests - job-template: name: 'bottlenecks-merge-{stream}' @@ -79,31 +79,31 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm 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}' + - 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}' builders: - - bottlenecks-hello - #- bottlenecks-unit-tests + - bottlenecks-hello + # - bottlenecks-unit-tests - job-template: name: 'bottlenecks-{suite}-upload-artifacts-{stream}' @@ -114,27 +114,27 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' + - 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' - - bottlenecks-parameter: - gs-packagepath: '{gs-packagepath}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - bottlenecks-parameter: + gs-packagepath: '{gs-packagepath}' scm: - - git-scm + - git-scm builders: - - 'bottlenecks-builder-upload-artifact' - - 'bottlenecks-workspace-cleanup' + - 'bottlenecks-builder-upload-artifact' + - 'bottlenecks-artifact-workspace-cleanup' #################### # parameter macros @@ -142,82 +142,82 @@ - parameter: name: bottlenecks-parameter parameters: - - string: - name: CACHE_DIR - default: $WORKSPACE/cache{gs-packagepath} - description: "the cache to store packages downloaded from public IP" - - string: - name: SUITE_URL - default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath} - description: "LF artifacts url for storage of bottlenecks packages" - - string: - name: PACKAGE_URL - default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/ - description: "the url where we store the packages used for bottlenecks rubbos" + - string: + name: CACHE_DIR + default: $WORKSPACE/cache{gs-packagepath} + description: "the cache to store packages downloaded from public IP" + - string: + name: SUITE_URL + default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath} + description: "LF artifacts url for storage of bottlenecks packages" + - string: + name: PACKAGE_URL + default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/ + description: "the url where we store the packages used for bottlenecks rubbos" #################################### -#builders for bottlenecks project +# builders for bottlenecks project #################################### - builder: name: bottlenecks-builder-upload-artifact builders: - - shell: | - #!/bin/bash - set -o errexit + - shell: | + #!/bin/bash + set -o errexit - echo "Bottlenecks: upload to artifacts from the public IP" + echo "Bottlenecks: upload to artifacts from the public IP" - [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR + [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR - for file in $(curl -s $PACKAGE_URL | - grep href | - sed 's/.*href="//' | - sed 's/".*//' | - grep '^[a-zA-Z].*'); do - curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file -v - echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL" - gsutil cp $CACHE_DIR/$file $SUITE_URL - done + for file in $(curl -s $PACKAGE_URL | + grep href | + sed 's/.*href="//' | + sed 's/".*//' | + grep '^[a-zA-Z].*'); do + curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file -v + echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL" + gsutil cp $CACHE_DIR/$file $SUITE_URL + done - builder: - name: bottlenecks-workspace-cleanup + name: bottlenecks-artifact-workspace-cleanup builders: - - shell: | - #!/bin/bash - set -o errexit + - shell: | + #!/bin/bash + set -o errexit - echo "Bottlenecks: cleanup cache used for storage downloaded packages" + echo "Bottlenecks: cleanup cache used for storage downloaded packages" - /bin/rm -rf $CACHE_DIR + /bin/rm -rf $CACHE_DIR - builder: name: bottlenecks-unit-tests builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail - echo "Running unit tests..." - cd $WORKSPACE - virtualenv $WORKSPACE/bottlenecks_venv - source $WORKSPACE/bottlenecks_venv/bin/activate + echo "Running unit tests..." + cd $WORKSPACE + virtualenv $WORKSPACE/bottlenecks_venv + source $WORKSPACE/bottlenecks_venv/bin/activate - # install python packages - easy_install -U setuptools - easy_install -U pip - pip install -r $WORKSPACE/requirements/verify.txt + # install python packages + easy_install -U setuptools + easy_install -U pip + pip install -r $WORKSPACE/requirements/verify.txt - # unit tests - /bin/bash $WORKSPACE/verify.sh + # unit tests + /bin/bash $WORKSPACE/verify.sh - deactivate + deactivate - builder: name: bottlenecks-hello builders: - - shell: | - #!/bin/bash - set -o errexit + - shell: | + #!/bin/bash + set -o errexit - echo -e "Wellcome to Bottlenecks! \nMerge event is planning to support more functions! " + echo -e "Wellcome to Bottlenecks! \nMerge event is planning to support more functions! " diff --git a/jjb/bottlenecks/bottlenecks-run-suite.sh b/jjb/bottlenecks/bottlenecks-run-suite.sh index e6f8d1ba5..811f9d58c 100644 --- a/jjb/bottlenecks/bottlenecks-run-suite.sh +++ b/jjb/bottlenecks/bottlenecks-run-suite.sh @@ -1,66 +1,151 @@ #!/bin/bash +############################################################################## +# Copyright (c) 2017 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 -e [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" BOTTLENECKS_IMAGE=opnfv/bottlenecks REPORT="True" -if [[ $SUITE_NAME == rubbos || $SUITE_NAME == vstf ]]; then - echo "Bottlenecks: to pull image $BOTTLENECKS_IMAGE:${DOCKER_TAG}" - docker pull $BOTTLENECKS_IMAGE:$DOCKER_TAG >${redirect} +RELENG_REPO=${WORKSPACE}/releng +[ -d ${RELENG_REPO} ] && rm -rf ${RELENG_REPO} +git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO} >${redirect} - echo "Bottlenecks: docker start running" - opts="--privileged=true -id" - envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ - -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \ - -e BOTTLENECKS_BRANCH=${BOTTLENECKS_BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \ - -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL}" - cmd="sudo docker run ${opts} ${envs} $BOTTLENECKS_IMAGE:${DOCKER_TAG} /bin/bash" - echo "Bottlenecks: docker cmd running ${cmd}" - ${cmd} >${redirect} - - echo "Bottlenecks: obtain docker id" - container_id=$(docker ps | grep "$BOTTLENECKS_IMAGE:${DOCKER_TAG}" | awk '{print $1}' | head -1) - if [ -z ${container_id} ]; then - echo "Cannot find $BOTTLENECKS_IMAGE container ID ${container_id}. Please check if it exists." - docker ps -a +YARDSTICK_REPO=${WORKSPACE}/yardstick +[ -d ${YARDSTICK_REPO} ] && rm -rf ${YARDSTICK_REPO} +git clone https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO} >${redirect} + +OPENRC=/tmp/admin_rc.sh +OS_CACERT=/tmp/os_cacert + +BOTTLENECKS_CONFIG=/tmp + +if [[ $SUITE_NAME == *posca* ]]; then + POSCA_SCRIPT=/home/opnfv/bottlenecks/testsuites/posca + + # Preparing OpenStack RC and Cacert files + echo "BOTTLENECKS INFO: fetching os credentials from $INSTALLER_TYPE" + if [[ $INSTALLER_TYPE == 'compass' ]]; then + if [[ ${BRANCH} == 'master' ]]; then + ${RELENG_REPO}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} -o ${OS_CACERT} >${redirect} + if [[ -f ${OS_CACERT} ]]; then + echo "BOTTLENECKS INFO: successfully fetching os_cacert for openstack: ${OS_CACERT}" + else + echo "BOTTLENECKS ERROR: couldn't find os_cacert file: ${OS_CACERT}, please check if the it's been properly provided." + exit 1 + fi + else + ${RELENG_REPO}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + fi + fi + + if [[ -f ${OPENRC} ]]; then + echo "BOTTLENECKS INFO: openstack credentials path is ${OPENRC}" + if [[ $INSTALLER_TYPE == 'compass' && ${BRANCH} == 'master' ]]; then + echo "BOTTLENECKS INFO: writing ${OS_CACERT} to ${OPENRC}" + echo "export OS_CACERT=${OS_CACERT}" >> ${OPENRC} + fi + cat ${OPENRC} + else + echo "BOTTLENECKS ERROR: couldn't find openstack rc file: ${OPENRC}, please check if the it's been properly provided." exit 1 fi - echo "Bottlenecks: to prepare openstack environment" - prepare_env="${REPO_DIR}/ci/prepare_env.sh" - echo "Bottlenecks: docker cmd running: ${prepare_env}" - sudo docker exec ${container_id} ${prepare_env} - - echo "Bottlenecks: to run testsuite ${SUITE_NAME}" - run_testsuite="${REPO_DIR}/run_tests.sh -s ${SUITE_NAME}" - echo "Bottlenecks: docker cmd running: ${run_testsuite}" - sudo docker exec ${container_id} ${run_testsuite} -else - echo "Bottlenecks: installing POSCA docker-compose" - if [ -d usr/local/bin/docker-compose ]; then - rm -rf usr/local/bin/docker-compose + # Finding and crearting POD description files from different deployments + ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + + if [ "$INSTALLER_TYPE" == "fuel" ]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${BOTTLENECKS_CONFIG}/id_rsa + fi + + if [ "$INSTALLER_TYPE" == "apex" ]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sudo scp $ssh_options stack@${INSTALLER_IP}:~/.ssh/id_rsa ${BOTTLENECKS_CONFIG}/id_rsa fi - curl -L https://github.com/docker/compose/releases/download/1.11.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose - chmod +x /usr/local/bin/docker-compose - echo "Bottlenecks: composing up dockers" - cd $WORKSPACE - docker-compose -f $WORKSPACE/docker/bottleneck-compose/docker-compose.yml up -d + set +e - echo "Bottlenecks: running traffic stress/factor testing in posca testsuite " - POSCA_SCRIPT=/home/opnfv/bottlenecks/testsuites/posca + sudo pip install virtualenv + + cd ${RELENG_REPO}/modules + sudo virtualenv venv + source venv/bin/activate + sudo pip install -e ./ >/dev/null + sudo pip install netaddr + + if [[ ${INSTALLER_TYPE} == compass ]]; then + options="-u root -p root" + elif [[ ${INSTALLER_TYPE} == fuel ]]; then + options="-u root -p r00tme" + elif [[ ${INSTALLER_TYPE} == apex ]]; then + options="-u stack -k /root/.ssh/id_rsa" + else + echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." + fi + + if [[ ${INSTALLER_TYPE} != compass ]]; then + cmd="sudo python ${RELENG_REPO}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ + -i ${INSTALLER_IP} ${options} -f ${BOTTLENECKS_CONFIG}/pod.yaml \ + -s ${BOTTLENECKS_CONFIG}/id_rsa" + echo ${cmd} + ${cmd} + else + cmd="sudo cp ${YARDSTICK_REPO}/etc/yardstick/nodes/compass_sclab_virtual/pod.yaml \ + ${BOTTLENECKS_CONFIG}" + echo ${cmd} + ${cmd} + fi + + deactivate + + sudo rm -rf ${RELENG_REPO}/modules/venv + sudo rm -rf ${RELENG_REPO}/modules/opnfv.egg-info + + set -e + + cd ${WORKSPACE} + + if [ -f ${BOTTLENECKS_CONFIG}/pod.yaml ]; then + echo "FILE: ${BOTTLENECKS_CONFIG}/pod.yaml:" + cat ${BOTTLENECKS_CONFIG}/pod.yaml + else + echo "ERROR: cannot find file ${BOTTLENECKS_CONFIG}/pod.yaml. Please check if it is existing." + sudo ls -al ${BOTTLENECKS_CONFIG} + fi + + # Pulling Bottlenecks docker and passing environment variables + echo "INFO: pulling Bottlenecks docker ${DOCKER_TAG}" + docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect + + opts="--privileged=true -id" + envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ + -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \ + -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \ + -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \ + -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} -e BUILD_TAG=${BUILD_TAG}" + docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp" + + cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash" + echo "BOTTLENECKS INFO: running docker run commond: ${cmd}" + ${cmd} >$redirect + sleep 5 + + # Running test cases through Bottlenecks docker if [[ $SUITE_NAME == posca_stress_traffic ]]; then TEST_CASE=posca_factor_system_bandwidth - echo "Bottlenecks: pulling tutum/influxdb for yardstick" - docker pull tutum/influxdb:0.13 - sleep 5 - docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE $REPORT + testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT" + echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}" + ${testcase_cmd} >$redirect elif [[ $SUITE_NAME == posca_stress_ping ]]; then TEST_CASE=posca_factor_ping - sleep 5 - docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE $REPORT + testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT" + echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}" + ${testcase_cmd} >$redirect fi - - echo "Bottlenecks: cleaning up docker-compose images and dockers" - docker-compose -f $WORKSPACE/docker/bottleneck-compose/docker-compose.yml down --rmi all -fi
\ No newline at end of file +fi diff --git a/jjb/calipso/calipso.yml b/jjb/calipso/calipso.yml new file mode 100644 index 000000000..2d9ecef03 --- /dev/null +++ b/jjb/calipso/calipso.yml @@ -0,0 +1,64 @@ +--- +- project: + name: calipso + + project: '{name}' + + jobs: + - 'calipso-verify-{stream}' + + stream: + - master: + branch: '{stream}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + disabled: false + +- job-template: + name: 'calipso-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-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}' + + builders: + - verify-unit-tests + +- builder: + name: verify-unit-tests + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + cd $WORKSPACE + PYTHONPATH=$PWD/app app/test/verify.sh diff --git a/jjb/ci_gate_security/anteater-report-to-gerrit.sh b/jjb/ci_gate_security/anteater-report-to-gerrit.sh index fc3018fb4..de1fdd745 100644 --- a/jjb/ci_gate_security/anteater-report-to-gerrit.sh +++ b/jjb/ci_gate_security/anteater-report-to-gerrit.sh @@ -12,14 +12,14 @@ if [[ -e securityaudit.log ]] ; then if grep ERROR securityaudit.log; then EXITSTATUS=1 fi - - cat securityaudit.log | awk -F"ERROR - " '{print $2}' > shortlog - + + grep 'ERROR' securityaudit.log | awk -F"ERROR - " '{ print $2 }' | tr -d "\'\"" > shortlog + ssh -p 29418 gerrit.opnfv.org \ "gerrit review -p $GERRIT_PROJECT \ -m \"$(cat shortlog)\" \ $GERRIT_PATCHSET_REVISION \ --notify NONE" - + exit $EXITSTATUS fi diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh index 9bd3cc34f..8a170b044 100644 --- a/jjb/ci_gate_security/anteater-security-audit.sh +++ b/jjb/ci_gate_security/anteater-security-audit.sh @@ -1,5 +1,9 @@ #!/bin/bash cd $WORKSPACE +REPORTDIR='.reports' +mkdir -p $REPORTDIR +# Ensure any user can read the reports directory +chmod 777 $REPORTDIR echo "Generating patchset file to list changed files" git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset echo "Changed files are" @@ -7,7 +11,7 @@ echo "--------------------------------------------------------" cat $WORKSPACE/patchset echo "--------------------------------------------------------" -vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT" +vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT -v $WORKSPACE/$REPORTDIR:/home/opnfv/anteater/$REPORTDIR" envs="-e PROJECT=$PROJECT" echo "Pulling releng-anteater docker image" diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index d991573b0..e09339a4b 100644 --- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml @@ -1,3 +1,4 @@ +--- # SPDX-license-identifier: Apache-2.0 ######################## # Job configuration for opnfv-anteater (security audit) @@ -9,14 +10,14 @@ project: anteaterfw jobs: - - 'opnfv-security-audit-verify-{stream}' - - 'opnfv-security-audit-weekly-{stream}' + - 'opnfv-security-audit-verify-{stream}' + - 'opnfv-security-audit-weekly-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false ######################## # job templates @@ -27,19 +28,19 @@ disabled: '{obj:disabled}' parameters: - - label: - name: SLAVE_LABEL - default: 'ericsson-build3' - description: 'Slave label on Jenkins' - - project-parameter: - project: releng - branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'ericsson-build3' + description: 'Slave label on Jenkins' + - project-parameter: + project: releng + branch: '{branch}' triggers: - - timed: '@weekly' + - timed: '@weekly' builders: - - anteater-security-audit-weekly + - anteater-security-audit-weekly - job-template: name: 'opnfv-security-audit-verify-{stream}' @@ -47,72 +48,81 @@ disabled: '{obj:disabled}' parameters: - - label: - name: SLAVE_LABEL - default: 'ericsson-build3' - description: 'Slave label on Jenkins' - - project-parameter: - project: $GERRIT_PROJECT - 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." + - label: + name: SLAVE_LABEL + default: 'opnfv-build' + description: 'Slave label on Jenkins' + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + # yamllint disable rule:line-length + description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." + # yamllint enable rule:line-length scm: - - git-scm-gerrit + - git-scm-gerrit + # yamllint disable rule:line-length 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: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|cooper|cperf|daisy|doctor|dovetail|dpacc|enfv|escalator|fds|functest|octopus|pharos|releng|sandbox|yardstick' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: '**' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true + - 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: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|cooper|cperf|daisy|doctor|dovetail|dpacc|enfv|escalator|fds|fuel|functest|octopus|pharos|releng|sandbox|yardstick' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + # yamllint enable rule:line-length builders: - - anteater-security-audit - - report-security-audit-result-to-gerrit + - anteater-security-audit + - report-security-audit-result-to-gerrit + publishers: + - archive-artifacts: + artifacts: ".reports/*" + ######################## # builder macros ######################## - builder: name: anteater-security-audit builders: - - shell: - !include-raw: ./anteater-security-audit.sh + - shell: + !include-raw: ./anteater-security-audit.sh - builder: name: report-security-audit-result-to-gerrit builders: - - shell: - !include-raw: ./anteater-report-to-gerrit.sh + - shell: + !include-raw: ./anteater-report-to-gerrit.sh +# yamllint disable rule:indentation - builder: name: anteater-security-audit-weekly builders: - - shell: - !include-raw: - - ./anteater-clone-all-repos.sh - - ./anteater-security-audit-weekly.sh - + - shell: + !include-raw: + - ./anteater-clone-all-repos.sh + - ./anteater-security-audit-weekly.sh +# yamllint enable rule:indentation diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 477f8f53c..74236e311 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -10,12 +10,21 @@ stream: master branch: '{stream}' gs-pathname: '' + ppa-pathname: '/{stream}' disabled: false openstack-version: ocata + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' + ppa-pathname: '/{stream}' + openstack-version: ocata danube: &danube stream: danube branch: 'stable/{stream}' gs-pathname: '/{stream}' + ppa-pathname: '/{stream}' disabled: false openstack-version: newton #-------------------------------- @@ -35,11 +44,11 @@ - baremetal: slave-label: compass-baremetal-branch os-version: 'xenial' - <<: *danube + <<: *euphrates - virtual: slave-label: compass-virtual-branch os-version: 'xenial' - <<: *danube + <<: *euphrates #-------------------------------- # master #-------------------------------- @@ -47,6 +56,13 @@ slave-label: 'intel-pod8' os-version: 'centos7' <<: *master +#-------------------------------- +# danube for dovetail +#-------------------------------- + - huawei-pod7: + slave-label: 'huawei-pod7' + os-version: 'xenial' + <<: *danube scenario: - 'os-nosdn-nofeature-ha': @@ -76,6 +92,33 @@ - 'os-nosdn-openo-ha': disabled: false auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-odl-sfc-ha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-ovs_dpdk-ha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'k8-nosdn-nofeature-ha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-nofeature-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-odl_l3-nofeature-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-odl_l2-moon-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-kvm-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-odl-sfc-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-ovs_dpdk-noha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' jobs: @@ -118,6 +161,7 @@ - compass-ci-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' + ppa-pathname: '{ppa-pathname}' - string: name: DEPLOY_SCENARIO default: '{scenario}' @@ -165,7 +209,8 @@ # here the stream means the SUT stream, dovetail stream is defined in its own job # only run on os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha scenario # run against SUT master branch, dovetail docker image with latest tag - # run against SUT danube branch, dovetail docker image with latest tag(odd days)and cvp.X.X.X tag(even days) + # run against SUT danube branch, dovetail docker image with latest tag(Monday and Sunday) + # run against SUT danube branch, dovetail docker image with cvp.X.X.X tag(Tuesday, Thursday, Friday and Saturday) - conditional-step: condition-kind: and condition-operands: @@ -173,14 +218,12 @@ regex: danube label: '{stream}' - condition-kind: regex-match - regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha label: '{scenario}' - condition-kind: day-of-week day-selector: select-days days: MON: true - WED: true - FRI: true SUN: true use-build-time: true steps: @@ -203,13 +246,15 @@ regex: danube label: '{stream}' - condition-kind: regex-match - regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha label: '{scenario}' - condition-kind: day-of-week day-selector: select-days days: TUES: true + WED: true THURS: true + FRI: true SAT: true use-build-time: true steps: @@ -228,7 +273,7 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha label: '{scenario}' - condition-kind: regex-match regex: master @@ -245,6 +290,24 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: os-nosdn-nofeature-ha + label: '{scenario}' + steps: + - trigger-builds: + - project: 'bottlenecks-compass-posca_stress_ping-{pod}-daily-{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}-daily-{stream}' @@ -281,6 +344,7 @@ - compass-ci-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' + ppa-pathname: '{ppa-pathname}' - '{slave-label}-defaults' - '{installer}-defaults' @@ -299,12 +363,9 @@ !include-raw-escape: ./compass-build.sh - shell: !include-raw-escape: ./compass-deploy.sh - builders: - - description-setter: - description: "POD: $NODE_NAME" - conditional-step: condition-kind: regex-match - regex: danube + regex: (danube|euphrates) label: '{stream}' steps: - shell: @@ -312,7 +373,6 @@ - shell: !include-raw-escape: ./compass-deploy.sh - ######################## # parameter macros ######################## @@ -327,10 +387,24 @@ name: GS_URL default: '$GS_BASE{gs-pathname}' description: "URL to Google Storage." + - string: + name: CACHE_DIRECTORY + default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}" + description: "Directory where the cache to be used during the build is located." + - string: + name: PPA_REPO + default: "http://artifacts.opnfv.org/compass4nfv/package{ppa-pathname}" + - string: + name: PPA_CACHE + default: "$WORKSPACE/work/repo/" ######################## # trigger macros ######################## + +#--------------------------- +# ha-baremetal-centos-master +#--------------------------- - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-centos-master-trigger' triggers: @@ -342,7 +416,7 @@ - trigger: name: 'compass-os-odl_l2-nofeature-ha-baremetal-centos-master-trigger' triggers: - - timed: '0 23 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l3-nofeature-ha-baremetal-centos-master-trigger' triggers: @@ -367,11 +441,133 @@ name: 'compass-os-nosdn-kvm-ha-baremetal-centos-master-trigger' triggers: - timed: '' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-ha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-ha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-k8-nosdn-nofeature-ha-baremetal-centos-master-trigger' + triggers: + - timed: '' +#----------------------------- +# noha-baremetal-centos-master +#----------------------------- +- trigger: + name: 'compass-os-nosdn-nofeature-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l3-nofeature-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-kvm-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-centos-master-trigger' + triggers: + - timed: '' + +#--------------------------- +# ha-huawei-pod7-danube +#--------------------------- +- trigger: + name: 'compass-os-nosdn-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' #'0 19 * * *' +- trigger: + name: 'compass-os-nosdn-openo-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' #'0 21 * * *' +- trigger: + name: 'compass-os-odl_l3-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' #'0 15 * * *' +- trigger: + name: 'compass-os-onos-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-ocl-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-onos-sfc-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-kvm-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-k8-nosdn-nofeature-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' + +#----------------------------- +# noha-huawei-pod7-danube +#----------------------------- +- trigger: + name: 'compass-os-nosdn-nofeature-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l3-nofeature-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-kvm-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-noha-huawei-pod7-danube-trigger' + triggers: + - timed: '' +#-------------------- +# ha-baremetal-master +#-------------------- - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 2 * * *' + - timed: '0 20 * * *' - trigger: name: 'compass-os-nosdn-openo-ha-baremetal-master-trigger' triggers: @@ -379,7 +575,7 @@ - trigger: name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 22 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger' triggers: @@ -399,49 +595,135 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-master-trigger' triggers: - - timed: '' + - timed: '0 12 * * *' - trigger: name: 'compass-os-nosdn-kvm-ha-baremetal-master-trigger' triggers: - timed: '0 14 * * *' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-ha-baremetal-master-trigger' + triggers: + - timed: '0 16 * * *' +- trigger: + name: 'compass-k8-nosdn-nofeature-ha-baremetal-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-ha-baremetal-master-trigger' + triggers: + - timed: '0 10 * * *' +#---------------------- +# noha-baremetal-master +#---------------------- - trigger: - name: 'compass-os-nosdn-nofeature-ha-baremetal-danube-trigger' + name: 'compass-os-nosdn-kvm-noha-baremetal-master-trigger' triggers: - - timed: '0 9 * * *' + - timed: '' - trigger: - name: 'compass-os-nosdn-openo-ha-baremetal-danube-trigger' + name: 'compass-os-nosdn-nofeature-noha-baremetal-master-trigger' triggers: - - timed: '0 13 * * *' + - timed: '' - trigger: - name: 'compass-os-odl_l2-nofeature-ha-baremetal-danube-trigger' + name: 'compass-os-odl_l3-nofeature-noha-baremetal-master-trigger' triggers: - - timed: '0 17 * * *' + - timed: '' - trigger: - name: 'compass-os-odl_l3-nofeature-ha-baremetal-danube-trigger' + name: 'compass-os-odl_l2-moon-noha-baremetal-master-trigger' triggers: - - timed: '0 21 * * *' + - timed: '' - trigger: - name: 'compass-os-onos-nofeature-ha-baremetal-danube-trigger' + name: 'compass-os-odl-sfc-noha-baremetal-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-master-trigger' + triggers: + - timed: '' + +#-------------------- +# ha-baremetal-euphrates +#-------------------- +- trigger: + name: 'compass-os-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: - timed: '0 1 * * *' - trigger: - name: 'compass-os-ocl-nofeature-ha-baremetal-danube-trigger' + name: 'compass-os-nosdn-openo-ha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-nofeature-ha-baremetal-euphrates-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-onos-sfc-ha-baremetal-danube-trigger' + name: 'compass-os-odl_l3-nofeature-ha-baremetal-euphrates-trigger' + triggers: + - timed: '0 21 * * *' +- trigger: + name: 'compass-os-onos-nofeature-ha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-ocl-nofeature-ha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-onos-sfc-ha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-ha-baremetal-euphrates-trigger' triggers: - timed: '0 5 * * *' - trigger: - name: 'compass-os-odl_l2-moon-ha-baremetal-danube-trigger' + name: 'compass-os-nosdn-kvm-ha-baremetal-euphrates-trigger' + triggers: + - timed: '0 13 * * *' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-ha-baremetal-euphrates-trigger' + triggers: + - timed: '0 9 * * *' +- trigger: + name: 'compass-k8-nosdn-nofeature-ha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-ha-baremetal-euphrates-trigger' + triggers: + - timed: '0 17 * * *' + +#---------------------- +# noha-baremetal-euphrates +#---------------------- +- trigger: + name: 'compass-os-nosdn-kvm-noha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-nosdn-nofeature-noha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l3-nofeature-noha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-noha-baremetal-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl-sfc-noha-baremetal-euphrates-trigger' triggers: - timed: '' - trigger: - name: 'compass-os-nosdn-kvm-ha-baremetal-danube-trigger' + name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-euphrates-trigger' triggers: - timed: '' +#------------------ +# ha-virtual-master +#------------------ - trigger: name: 'compass-os-nosdn-nofeature-ha-virtual-master-trigger' triggers: @@ -453,7 +735,7 @@ - trigger: name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger' triggers: - - timed: '0 20 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger' triggers: @@ -473,45 +755,128 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-master-trigger' triggers: - - timed: '' + - timed: '30 12 * * *' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger' triggers: - - timed: '0 23 * * *' + - timed: '0 13 * * *' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-ha-virtual-master-trigger' + triggers: + - timed: '0 17 * * *' +- trigger: + name: 'compass-k8-nosdn-nofeature-ha-virtual-master-trigger' + triggers: + - timed: '0 12 * * *' +- trigger: + name: 'compass-os-odl-sfc-ha-virtual-master-trigger' + triggers: + - timed: '0 16 * * *' +#-------------------- +# noha-virtual-master +#-------------------- - trigger: - name: 'compass-os-nosdn-nofeature-ha-virtual-danube-trigger' + name: 'compass-os-nosdn-kvm-noha-virtual-master-trigger' triggers: - - timed: '0 21 * * *' + - timed: '30 13 * * *' +- trigger: + name: 'compass-os-nosdn-nofeature-noha-virtual-master-trigger' + triggers: + - timed: '0 14 * * *' - trigger: - name: 'compass-os-nosdn-openo-ha-virtual-danube-trigger' + name: 'compass-os-odl_l3-nofeature-noha-virtual-master-trigger' + triggers: + - timed: '0 15 * * *' +- trigger: + name: 'compass-os-odl_l2-moon-noha-virtual-master-trigger' + triggers: + - timed: '0 18 * * *' +- trigger: + name: 'compass-os-odl-sfc-noha-virtual-master-trigger' + triggers: + - timed: '0 20 * * *' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-master-trigger' + triggers: + - timed: '0 11 * * *' + +#------------------ +# ha-virtual-euphrates +#------------------ +- trigger: + name: 'compass-os-nosdn-nofeature-ha-virtual-euphrates-trigger' + triggers: + - timed: '0 23 * * *' +- trigger: + name: 'compass-os-nosdn-openo-ha-virtual-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-nofeature-ha-virtual-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l3-nofeature-ha-virtual-euphrates-trigger' triggers: - timed: '0 22 * * *' - trigger: - name: 'compass-os-odl_l2-nofeature-ha-virtual-danube-trigger' + name: 'compass-os-onos-nofeature-ha-virtual-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-ocl-nofeature-ha-virtual-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-onos-sfc-ha-virtual-euphrates-trigger' + triggers: + - timed: '' +- trigger: + name: 'compass-os-odl_l2-moon-ha-virtual-euphrates-trigger' triggers: - timed: '0 20 * * *' - trigger: - name: 'compass-os-odl_l3-nofeature-ha-virtual-danube-trigger' + name: 'compass-os-nosdn-kvm-ha-virtual-euphrates-trigger' triggers: - - timed: '0 19 * * *' + - timed: '0 16 * * *' - trigger: - name: 'compass-os-onos-nofeature-ha-virtual-danube-trigger' + name: 'compass-os-nosdn-ovs_dpdk-ha-virtual-euphrates-trigger' + triggers: + - timed: '0 14 * * *' +- trigger: + name: 'compass-os-odl-sfc-ha-virtual-euphrates-trigger' triggers: - timed: '0 18 * * *' - trigger: - name: 'compass-os-ocl-nofeature-ha-virtual-danube-trigger' + name: 'compass-k8-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 13 * * *' + +#-------------------- +# noha-virtual-euphrates +#-------------------- - trigger: - name: 'compass-os-onos-sfc-ha-virtual-danube-trigger' + name: 'compass-os-nosdn-kvm-noha-virtual-euphrates-trigger' triggers: - timed: '0 15 * * *' - trigger: - name: 'compass-os-odl_l2-moon-ha-virtual-danube-trigger' + name: 'compass-os-nosdn-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '0 14 * * *' + - timed: '0 17 * * *' - trigger: - name: 'compass-os-nosdn-kvm-ha-virtual-danube-trigger' + name: 'compass-os-odl_l3-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 23 * * *' +- trigger: + name: 'compass-os-odl_l2-moon-noha-virtual-euphrates-trigger' + triggers: + - timed: '0 21 * * *' +- trigger: + name: 'compass-os-odl-sfc-noha-virtual-euphrates-trigger' + triggers: + - timed: '0 19 * * *' +- trigger: + name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-euphrates-trigger' + triggers: + - timed: '0 12 * * *' diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index 88327abcf..ad069a57c 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -39,6 +39,8 @@ elif [[ "${DEPLOY_SCENARIO}" =~ "-onos" ]]; then export NETWORK_CONF_FILE=network_onos.yml elif [[ "${DEPLOY_SCENARIO}" =~ "-openo" ]]; then export NETWORK_CONF_FILE=network_openo.yml +elif [[ "${DEPLOY_SCENARIO}" =~ "-ovs_dpdk" ]]; then + export NETWORK_CONF_FILE=network_dpdk.yml else export NETWORK_CONF_FILE=network.yml fi @@ -50,6 +52,11 @@ 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 + if [[ "${DEPLOY_SCENARIO}" =~ "-moon-noha" ]]; then + export VIRT_NUMBER=3 + elif [[ "${DEPLOY_SCENARIO}" =~ "-noha" ]]; then + export VIRT_NUMBER=2 + fi else export INSTALL_NIC=eth1 export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${NETWORK_CONF_FILE} diff --git a/jjb/compass4nfv/compass-dovetail-jobs.yml b/jjb/compass4nfv/compass-dovetail-jobs.yml index 67d1e4eee..101db8241 100644 --- a/jjb/compass4nfv/compass-dovetail-jobs.yml +++ b/jjb/compass4nfv/compass-dovetail-jobs.yml @@ -19,7 +19,7 @@ #------------------------------------ pod: - baremetal: - slave-label: compass-baremetal + slave-label: compass-baremetal-branch os-version: 'xenial' <<: *danube #----------------------------------- diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml index 59482459e..fe9170578 100644 --- a/jjb/compass4nfv/compass-project-jobs.yml +++ b/jjb/compass4nfv/compass-project-jobs.yml @@ -19,16 +19,21 @@ gs-pathname: '/{stream}' ppa-pathname: '/{stream}' disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + ppa-pathname: '/{stream}' + disabled: false jobs: - - 'compass-build-iso-{stream}' + - '{installer}-build-daily-{stream}' - 'compass-build-ppa-{stream}' ######################## # job templates ######################## - job-template: - name: 'compass-build-iso-{stream}' + name: '{installer}-build-daily-{stream}' disabled: '{obj:disabled}' @@ -64,8 +69,7 @@ !include-raw-escape: ./compass-build.sh - shell: !include-raw-escape: ./compass-upload-artifact.sh - - shell: - !include-raw-escape: ./compass-workspace-cleanup.sh + - 'clean-workspace' - job-template: name: 'compass-build-ppa-{stream}' diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index f016b91c7..f4fe8f66c 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -158,15 +158,19 @@ projects: - name: 'functest-compass-virtual-suite-{stream}' current-parameters: false - predefined-parameters: - FUNCTEST_SUITE_NAME=healthcheck + predefined-parameters: | + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + DEPLOY_SCENARIO=os-nosdn-nofeature-ha node-parameters: true kill-phase-on: NEVER abort-all-job: true - name: 'functest-compass-virtual-suite-{stream}' current-parameters: false - predefined-parameters: + predefined-parameters: | + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=vping_ssh + DEPLOY_SCENARIO=os-nosdn-nofeature-ha node-parameters: true kill-phase-on: NEVER abort-all-job: true diff --git a/jjb/compass4nfv/compass-workspace-cleanup.sh b/jjb/compass4nfv/compass-workspace-cleanup.sh deleted file mode 100644 index 98201af9b..000000000 --- a/jjb/compass4nfv/compass-workspace-cleanup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -# delete everything that is in $WORKSPACE -/bin/rm -rf $WORKSPACE
\ No newline at end of file diff --git a/jjb/conductor/conductor.yml b/jjb/conductor/conductor.yml index d2ce649fc..3e5e5dedb 100644 --- a/jjb/conductor/conductor.yml +++ b/jjb/conductor/conductor.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'conductor-verify-{stream}' + - 'conductor-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'conductor-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/container4nfv/container4nfv-project.yml b/jjb/container4nfv/container4nfv-project.yml new file mode 100644 index 000000000..70a3cc5cf --- /dev/null +++ b/jjb/container4nfv/container4nfv-project.yml @@ -0,0 +1,64 @@ +--- +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: container4nfv + + project: '{name}' + + jobs: + - 'container4nfv-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +- job-template: + name: 'container4nfv-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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - shell: | + echo "Nothing to verify!" diff --git a/jjb/copper/copper.yml b/jjb/copper/copper.yml index d06afe4c0..d9ac0b85a 100644 --- a/jjb/copper/copper.yml +++ b/jjb/copper/copper.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'copper-verify-{stream}' + - 'copper-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'copper-verify-{stream}' @@ -26,43 +27,43 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail - # shellcheck -f tty tests/*.sh + # shellcheck -f tty tests/*.sh diff --git a/jjb/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index dc209d644..fdd3509d1 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -1,3 +1,4 @@ +--- ################################### # job configuration for cperf ################################### @@ -5,40 +6,39 @@ name: cperf-ci-jobs project: cperf -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - docker-tag: 'stable' - -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- + stream: danube + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + docker-tag: 'stable' + + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- pod: -#-------------------------------- -# master -#-------------------------------- - - intel-pod2: - installer: apex - <<: *master - - intel-pod2: - installer: apex - <<: *danube -#-------------------------------- + # ------------------------------- + # master + # ------------------------------- + - intel-pod2: + installer: apex + <<: *master + - intel-pod2: + installer: apex + <<: *danube testsuite: - - 'daily' + - 'daily' jobs: - - 'cperf-{installer}-{pod}-{testsuite}-{stream}' + - 'cperf-{installer}-{pod}-{testsuite}-{stream}' ################################ # job template @@ -49,35 +49,35 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $CPERF_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: 400 - abort: true + - build-name: + name: '$BUILD_NUMBER Suite: $CPERF_SUITE_NAME Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 400 + abort: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{pod}-defaults' - - '{installer}-defaults' - - cperf-parameter: - testsuite: '{testsuite}' - gs-pathname: '{gs-pathname}' - docker-tag: '{docker-tag}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{pod}-defaults' + - '{installer}-defaults' + - cperf-parameter: + testsuite: '{testsuite}' + gs-pathname: '{gs-pathname}' + docker-tag: '{docker-tag}' scm: - - git-scm + - git-scm builders: - - 'cperf-{testsuite}-builder' + - 'cperf-{testsuite}-builder' ######################## # parameter macros @@ -85,22 +85,22 @@ - parameter: name: cperf-parameter parameters: - - string: - name: CPERF_SUITE_NAME - default: '{testsuite}' - description: "Suite name to run" - - string: - name: GS_PATHNAME - default: '{gs-pathname}' - description: "Version directory where the opnfv documents will be stored in gs repository" - - string: - name: CI_DEBUG - default: 'false' - description: "Show debug output information" - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' + - string: + name: CPERF_SUITE_NAME + default: '{testsuite}' + description: "Suite name to run" + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where the opnfv documents will be stored in gs repository" + - string: + name: CI_DEBUG + default: 'false' + description: "Show debug output information" + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' ######################## # trigger macros @@ -112,79 +112,79 @@ - builder: name: cperf-daily-builder builders: - - 'cperf-cleanup' - - 'cperf-robot-cbench' + - 'cperf-cleanup' + - 'cperf-robot-cbench' - builder: name: cperf-robot-cbench builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \ - grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") - INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'}) - - sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/overcloudrc /tmp/overcloudrc - sudo chmod 755 /tmp/overcloudrc - source /tmp/overcloudrc - - # robot suites need the ssh key to log in to controller nodes, so throwing it - # in tmp, and mounting /tmp as $HOME as far as robot is concerned - sudo rm -rf /tmp/.ssh - sudo mkdir /tmp/.ssh - sudo chmod 0700 /tmp/.ssh - sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/.ssh/id_rsa /tmp/.ssh/ - sudo chown -R jenkins-ci:jenkins-ci /tmp/.ssh - # done with sudo. jenkins-ci is the user from this point - chmod 0600 /tmp/.ssh/id_rsa - - # cbench requires the openflow drop test feature to be installed. - sshpass -p karaf ssh -o StrictHostKeyChecking=no \ - -o UserKnownHostsFile=/dev/null \ - -o LogLevel=error \ - -p 8101 karaf@$SDN_CONTROLLER_IP \ - feature:install odl-openflowplugin-flow-services-ui odl-openflowplugin-drop-test - - docker pull opnfv/cperf:$DOCKER_TAG - - robot_cmd="pybot -e exclude -L TRACE -d /tmp \ - -v ODL_SYSTEM_1_IP:${SDN_CONTROLLER_IP} \ - -v ODL_SYSTEM_IP:${SDN_CONTROLLER_IP} \ - -v BUNDLEFOLDER:/opt/opendaylight \ - -v RESTCONFPORT:8081 \ - -v USER_HOME:/tmp \ - -v USER:heat-admin \ - -v ODL_SYSTEM_USER:heat-admin \ - -v TOOLS_SYSTEM_IP:localhost \ - -v of_port:6653" - robot_suite="/home/opnfv/repos/odl_test/csit/suites/openflowplugin/Performance/010_Cbench.robot" - - docker run -i -v /tmp:/tmp opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite} + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'}) + + sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/overcloudrc /tmp/overcloudrc + sudo chmod 755 /tmp/overcloudrc + source /tmp/overcloudrc + + # robot suites need the ssh key to log in to controller nodes, so throwing it + # in tmp, and mounting /tmp as $HOME as far as robot is concerned + sudo rm -rf /tmp/.ssh + sudo mkdir /tmp/.ssh + sudo chmod 0700 /tmp/.ssh + sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/.ssh/id_rsa /tmp/.ssh/ + sudo chown -R jenkins-ci:jenkins-ci /tmp/.ssh + # done with sudo. jenkins-ci is the user from this point + chmod 0600 /tmp/.ssh/id_rsa + + # cbench requires the openflow drop test feature to be installed. + sshpass -p karaf ssh -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + -o LogLevel=error \ + -p 8101 karaf@$SDN_CONTROLLER_IP \ + feature:install odl-openflowplugin-flow-services-ui odl-openflowplugin-drop-test + + docker pull opnfv/cperf:$DOCKER_TAG + + robot_cmd="pybot -e exclude -L TRACE -d /tmp \ + -v ODL_SYSTEM_1_IP:${SDN_CONTROLLER_IP} \ + -v ODL_SYSTEM_IP:${SDN_CONTROLLER_IP} \ + -v BUNDLEFOLDER:/opt/opendaylight \ + -v RESTCONFPORT:8081 \ + -v USER_HOME:/tmp \ + -v USER:heat-admin \ + -v ODL_SYSTEM_USER:heat-admin \ + -v TOOLS_SYSTEM_IP:localhost \ + -v of_port:6653" + robot_suite="/home/opnfv/repos/odl_test/csit/suites/openflowplugin/Performance/010_Cbench.robot" + + docker run -i -v /tmp:/tmp opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite} - builder: name: cperf-cleanup builders: - - shell: | - #!/bin/bash - [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" - - echo "Cleaning up docker containers/images..." - # Remove previous running containers if exist - if [[ ! -z $(docker ps -a | grep opnfv/cperf) ]]; then - echo "Removing existing opnfv/cperf containers..." - docker ps -a | grep opnfv/cperf | awk '{print $1}' | xargs docker rm -f >${redirect} - fi - - # Remove existing images if exist - if [[ ! -z $(docker images | grep opnfv/cperf) ]]; then - echo "Docker images to remove:" - docker images | head -1 && docker images | grep opnfv/cperf >${redirect} - image_tags=($(docker images | grep opnfv/cperf | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image opnfv/cperf:$tag..." - docker rmi opnfv/cperf:$tag >/dev/null - done - fi + - shell: | + #!/bin/bash + [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" + + echo "Cleaning up docker containers/images..." + # Remove previous running containers if exist + if [[ ! -z $(docker ps -a | grep opnfv/cperf) ]]; then + echo "Removing existing opnfv/cperf containers..." + docker ps -a | grep opnfv/cperf | awk '{print $1}' | xargs docker rm -f >${redirect} + fi + + # Remove existing images if exist + if [[ ! -z $(docker images | grep opnfv/cperf) ]]; then + echo "Docker images to remove:" + docker images | head -1 && docker images | grep opnfv/cperf >${redirect} + image_tags=($(docker images | grep opnfv/cperf | awk '{print $2}')) + for tag in "${image_tags[@]}"; do + echo "Removing docker image opnfv/cperf:$tag..." + docker rmi opnfv/cperf:$tag >/dev/null + done + fi diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index 592e54dc5..b3c37b88f 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -1,3 +1,4 @@ +--- # jenkins job templates for Daisy # TODO # [ ] enable baremetal jobs after baremetal deployment finish @@ -11,50 +12,66 @@ project: '{name}' installer: '{name}' -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - disabled: false - gs-pathname: '' -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# CI PODs -#-------------------------------- + stream: master + branch: '{stream}' + disabled: false + gs-pathname: '' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- + # CI PODs + # ------------------------------- pod: - - baremetal: - slave-label: daisy-baremetal - <<: *master - - virtual: - slave-label: daisy-virtual - <<: *master -#-------------------------------- -# None-CI PODs -#-------------------------------- - -#-------------------------------- -# scenarios -#-------------------------------- + # - baremetal: + # slave-label: daisy-baremetal + # <<: *master + - virtual: + slave-label: daisy-virtual + <<: *master + - baremetal: + slave-label: daisy-baremetal + <<: *euphrates + - virtual: + slave-label: daisy-virtual + <<: *euphrates + # ------------------------------- + # None-CI PODs + # ------------------------------- + - baremetal: + slave-label: zte-pod3 + <<: *master + + # ------------------------------- + # None-CI PODs + # ------------------------------- + + # ------------------------------- + # scenarios + # ------------------------------- scenario: - # HA scenarios - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' - # NOHA scenarios - - 'os-nosdn-nofeature-noha': - auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' - # ODL_L3 scenarios - - 'os-odl_l3-nofeature-noha': - auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' - # ODL_L2 scenarios - - 'os-odl_l2-nofeature-noha': - auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # HA scenarios + - 'os-nosdn-nofeature-ha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # NOHA scenarios + - 'os-nosdn-nofeature-noha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # ODL_L3 scenarios + - 'os-odl-nofeature-ha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' jobs: - - '{project}-{scenario}-{pod}-daily-{stream}' - - '{project}-deploy-{pod}-daily-{stream}' + - '{project}-{scenario}-{pod}-daily-{stream}' + - '{project}-deploy-{pod}-daily-{stream}' ######################## # job templates @@ -67,59 +84,59 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'daisy-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'daisy-daily-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - 'daisy-project-parameter': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + - 'daisy-project-parameter': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "POD: $NODE_NAME" - - trigger-builds: - - project: 'daisy-deploy-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-daisy-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - description-setter: + description: "POD: $NODE_NAME" + - trigger-builds: + - project: 'daisy-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-daisy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{project}-deploy-{pod}-daily-{stream}' @@ -129,97 +146,125 @@ 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: - - 'daisy.*-deploy-({pod})?-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'daisy.*-deploy-({pod})?-daily-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - 'daisy-project-parameter': - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_TIMEOUT - default: '150' - description: 'Deployment timeout in minutes' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + - 'daisy-project-parameter': + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_TIMEOUT + default: '150' + description: 'Deployment timeout in minutes' scm: - - git-scm + - git-scm wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' builders: - - description-setter: - description: "POD: $NODE_NAME" - - shell: - !include-raw-escape: ./daisy4nfv-download-artifact.sh - - shell: - !include-raw-escape: ./daisy-deploy.sh - + - description-setter: + description: "POD: $NODE_NAME" + - shell: + !include-raw-escape: ./daisy4nfv-download-artifact.sh + - shell: + !include-raw-escape: ./daisy-deploy.sh ######################## # trigger macros ######################## -#----------------------------------------------- +# ---------------------------------------------- # Triggers for job running on daisy-baremetal against master branch -#----------------------------------------------- -# HA Scenarios +# ---------------------------------------------- +# Basic HA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '' -# NOHA Scenarios + - timed: '0 16 * * *' +# Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' triggers: - - timed: 'H 12 * * *' -# ODL_L3 Scenarios + - timed: '' +# ODL Scenarios - trigger: - name: 'daisy-os-odl_l3-nofeature-noha-baremetal-daily-master-trigger' + name: 'daisy-os-odl-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: 'H 16 * * *' -# ODL_L2 Scenarios -- trigger: - name: 'daisy-os-odl_l2-nofeature-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -#----------------------------------------------- + - timed: '0 12 * * *' + +# ---------------------------------------------- # Triggers for job running on daisy-virtual against master branch -#----------------------------------------------- +# ---------------------------------------------- +# Basic HA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-ha-virtual-daily-master-trigger' triggers: - - timed: '' -# NOHA Scenarios + - timed: '0 16 * * *' +# Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: 'H 12 * * *' -# ODL_L3 Scenarios + - timed: '' +# ODL Scenarios +- trigger: + name: 'daisy-os-odl-nofeature-ha-virtual-daily-master-trigger' + triggers: + - timed: '0 12 * * *' + +# ---------------------------------------------- +# Triggers for job running on daisy-baremetal against euphrates branch +# ---------------------------------------------- +# Basic HA Scenarios +- trigger: + name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-euphrates-trigger' + triggers: + - timed: '0 0 * * *' +# Basic NOHA Scenarios - trigger: - name: 'daisy-os-odl_l3-nofeature-noha-virtual-daily-master-trigger' + name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: 'H 16 * * *' -# ODL_L3 Scenarios + - timed: '' +# ODL Scenarios - trigger: - name: 'daisy-os-odl_l2-nofeature-noha-virtual-daily-master-trigger' + name: 'daisy-os-odl-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '0 20 * * *' +# ---------------------------------------------- +# Triggers for job running on daisy-virtual against euphrates branch +# ---------------------------------------------- +# Basic HA Scenarios +- trigger: + name: 'daisy-os-nosdn-nofeature-ha-virtual-daily-euphrates-trigger' + triggers: + - timed: '0 0 * * *' +# Basic NOHA Scenarios +- trigger: + name: 'daisy-os-nosdn-nofeature-noha-virtual-daily-euphrates-trigger' + triggers: + - timed: '' +# ODL Scenarios +- trigger: + name: 'daisy-os-odl-nofeature-ha-virtual-daily-euphrates-trigger' + triggers: + - timed: '0 20 * * *' diff --git a/jjb/daisy4nfv/daisy-deploy.sh b/jjb/daisy4nfv/daisy-deploy.sh index 785f3a571..0bcac4b02 100755 --- a/jjb/daisy4nfv/daisy-deploy.sh +++ b/jjb/daisy4nfv/daisy-deploy.sh @@ -28,7 +28,7 @@ git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/securedlab --quiet \ # daisy ci/deploy/deploy.sh use $BASE_DIR/labs dir cp -r securedlab/labs . -DEPLOY_COMMAND="sudo ./ci/deploy/deploy.sh -b $BASE_DIR \ +DEPLOY_COMMAND="sudo -E ./ci/deploy/deploy.sh -b $BASE_DIR \ -l $LAB_NAME -p $POD_NAME -B $BRIDGE -s $DEPLOY_SCENARIO" # log info to console diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index 57e44e314..b6e9526e3 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -1,3 +1,4 @@ +--- ###################################################################### # Add daily jobs, for buidoing, deploying and testing # TODO: @@ -16,21 +17,26 @@ installer: 'daisy' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false phase: - - 'build': - slave-label: 'opnfv-build-centos' - - 'deploy': - slave-label: 'daisy-baremetal' - - 'test': - slave-label: 'opnfv-build-centos' + - '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}' + - '{installer}-daily-{stream}' + - '{installer}-{phase}-daily-{stream}' ######################## # job templates @@ -45,86 +51,89 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '{installer}-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-daily-.*' + - 'daisy4nfv-merge-build-.*' + - 'daisy4nfv-verify-build-.*' + block-level: 'NODE' scm: - - git-scm + - git-scm triggers: - - timed: '0 8 * * *' + - timed: '0 8 * * *' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - '{installer}-defaults' - - '{installer}-project-parameter': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - '{installer}-defaults' + - '{installer}-project-parameter': + gs-pathname: '{gs-pathname}' wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - 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 + - 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' + - '{installer}-recipients' + - email-jenkins-admins-on-failure - job-template: name: '{installer}-{phase}-daily-{stream}' @@ -134,41 +143,41 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 6 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 6 + option: 'project' scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-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-noha' - - '{installer}-project-parameter': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-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' + - '{installer}-project-parameter': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{installer}-{phase}-daily-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{installer}-{phase}-daily-macro' ##################################### # builder macros @@ -176,30 +185,29 @@ - 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 + - shell: + !include-raw: ./daisy4nfv-basic.sh + - shell: + !include-raw: ./daisy4nfv-build.sh + - shell: + !include-raw: ./daisy4nfv-upload-artifact.sh + - 'clean-workspace' - builder: name: 'daisy-deploy-daily-macro' builders: - - shell: - !include-raw: ./daisy4nfv-download-artifact.sh - - shell: - !include-raw: ./daisy-deploy.sh + - shell: + !include-raw: ./daisy4nfv-download-artifact.sh + - shell: + !include-raw: ./daisy-deploy.sh - builder: name: 'daisy-test-daily-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" + echo "Not activated!" ##################################### # parameter macros @@ -207,21 +215,24 @@ - 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 + # yamllint disable rule:line-length + - email: + recipients: hu.zhijiang@zte.com.cn lu.yao135@zte.com.cn zhou.ya@zte.com.cn yangyang1@zte.com.cn julienjut@gmail.com + # yamllint enable rule:line-length + - email-jenkins-admins-on-failure - 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." + - 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-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 561ffbe24..f304d0b95 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -1,3 +1,4 @@ +--- - project: name: 'daisy4nfv-merge-jobs' @@ -5,37 +6,39 @@ installer: 'daisy' -########################################################### -# use alias to keep the jobs'name existed already unchanged -########################################################### + ########################################################### + # use alias to keep the jobs'name existed already unchanged + ########################################################### alias: 'daisy4nfv' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: true -##################################### -# patch merge phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + ##################################### + # patch merge phases + ##################################### phase: - - 'build': - slave-label: 'opnfv-build-centos' - - 'deploy-virtual': - slave-label: 'daisy-virtual' -##################################### -# jobs -##################################### + - 'build': + slave-label: 'opnfv-build-centos' + - 'deploy-virtual': + slave-label: 'daisy-virtual' + + ##################################### + # jobs + ##################################### jobs: - - '{alias}-merge-{stream}' - - '{alias}-merge-{phase}-{stream}' + - '{alias}-merge-{stream}' + - '{alias}-merge-{phase}-{stream}' + ##################################### # job templates ##################################### @@ -49,93 +52,93 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '{alias}-merge-(master|danube)' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-(master|euphrates)' + block-level: 'NODE' scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - 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: 'ci/**' - - compare-type: ANT - pattern: 'code/**' - - compare-type: ANT - pattern: 'deploy/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - - compare-type: ANT - pattern: '.gitignore' - readable-message: true + - 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: 'ci/**' + - compare-type: ANT + pattern: 'code/**' + - compare-type: ANT + pattern: 'deploy/**' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: '.gitignore' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - '{alias}-merge-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - '{alias}-merge-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: '{alias}-merge-build-{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-virtual - condition: SUCCESSFUL - projects: - - name: '{alias}-merge-deploy-virtual-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: '{alias}-merge-build-{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-virtual + condition: SUCCESSFUL + projects: + - name: '{alias}-merge-deploy-virtual-{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 - job-template: name: '{alias}-merge-{phase}-{stream}' @@ -145,39 +148,40 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '{alias}-merge-{phase}-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-{phase}-.*' + - '{installer}-daily-.*' + block-level: 'NODE' scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - '{alias}-merge-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - '{alias}-merge-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-merge-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-merge-{phase}-macro' ##################################### # builder macros @@ -185,24 +189,22 @@ - builder: name: 'daisy-merge-build-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 + - shell: + !include-raw: ./daisy4nfv-basic.sh + - shell: + !include-raw: ./daisy4nfv-build.sh + - shell: + !include-raw: ./daisy4nfv-upload-artifact.sh + - 'clean-workspace' - builder: name: 'daisy-merge-deploy-virtual-macro' builders: - - shell: - !include-raw: ./daisy4nfv-download-artifact.sh - - shell: - !include-raw: ./daisy-deploy.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - shell: + !include-raw: ./daisy4nfv-download-artifact.sh + - shell: + !include-raw: ./daisy-deploy.sh + - 'clean-workspace' ##################################### # parameter macros @@ -210,15 +212,15 @@ - parameter: name: 'daisy4nfv-merge-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." + - 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-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index dff0ff0a4..4100990d4 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -1,38 +1,42 @@ +--- - project: name: 'daisy4nfv-verify-jobs' project: 'daisy' installer: 'daisy' -########################################################## -# use alias to keep the jobs'name existed alread unchanged -########################################################## + ########################################################## + # use alias to keep the jobs'name existed alread unchanged + ########################################################## alias: 'daisy4nfv' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + ##################################### + # patch verification phases + ##################################### phase: - - unit: - slave-label: 'opnfv-build' - - build: - slave-label: 'opnfv-build-centos' -##################################### -# jobs -##################################### + - unit: + slave-label: 'opnfv-build' + - build: + slave-label: 'opnfv-build-centos' + + ##################################### + # jobs + ##################################### jobs: - - '{alias}-verify-{stream}' - - '{alias}-verify-{phase}-{stream}' + - '{alias}-verify-{stream}' + - '{alias}-verify-{phase}-{stream}' + ##################################### # job templates ##################################### @@ -42,135 +46,142 @@ disabled: false concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '{installer}-merge-build-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-build-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit + wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + 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: 'ci/**' - - compare-type: ANT - pattern: 'code/**' - - compare-type: ANT - pattern: 'deploy/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - - compare-type: ANT - pattern: '.gitignore' - readable-message: true + - 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: 'ci/**' + - compare-type: ANT + pattern: 'code/**' + - compare-type: ANT + pattern: 'deploy/**' + - compare-type: ANT + pattern: 'tests/**' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: '.gitignore' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - '{alias}-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - '{alias}-verify-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: unit - condition: SUCCESSFUL - projects: - - name: '{alias}-verify-unit-{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: build - condition: SUCCESSFUL - projects: - - name: '{alias}-verify-build-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: unit + condition: SUCCESSFUL + projects: + - name: '{alias}-verify-unit-{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: build + condition: SUCCESSFUL + projects: + - name: '{alias}-verify-build-{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 - job-template: name: '{alias}-verify-{phase}-{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}-merge-build-.*' - - '{alias}-verify-build-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 6 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-build-.*' + - '{alias}-verify-build-.*' + - '{installer}-daily-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit + wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - '{alias}-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - '{alias}-verify-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' ##################################### # builder macros @@ -178,22 +189,21 @@ - builder: name: 'daisy-verify-build-macro' builders: - - shell: - !include-raw: ./daisy4nfv-basic.sh - - shell: - !include-raw: ./daisy4nfv-build.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - shell: + !include-raw: ./daisy4nfv-basic.sh + - shell: + !include-raw: ./daisy4nfv-build.sh + - 'clean-workspace' - builder: name: daisy-verify-unit-macro builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - tox -e py27 + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + tox -e py27 ##################################### # parameter macros @@ -201,15 +211,15 @@ - parameter: name: 'daisy4nfv-verify-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." + - 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-workspace-cleanup.sh b/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh deleted file mode 100755 index 26f7e9a01..000000000 --- a/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2016 ZTE Coreporation and others. -# hu.zhijiang@zte.com.cn -# sun.jing22@zte.com.cn -# 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 - -# delete the $WORKSPACE to open some space -/bin/rm -rf $WORKSPACE diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index c6b2cb6d0..6a04c5fbc 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -1,57 +1,52 @@ +--- - project: name: doctor project: '{name}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - docker-tag: 'stable' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + docker-tag: 'stable' + disabled: false installer: - - apex: - slave-label: 'doctor-apex-verify' - - fuel: - slave-label: 'doctor-fuel-verify' - #- joid: - # slave-label: 'ool-virtual3' - # pod: 'ool-virtual3' + - apex: + slave-label: 'doctor-apex-verify' + - fuel: + slave-label: 'doctor-fuel-verify' + # - joid: + # slave-label: 'ool-virtual3' + # pod: 'ool-virtual3' inspector: - - 'sample' - - 'congress' + - 'sample' + - 'congress' task: - - verify: - profiler: 'none' - auto-trigger-name: 'doctor-verify' - is-python: false - - profiling: - profiler: 'poc' - auto-trigger-name: 'experimental' - is-python: false - - python-verify: - profiler: 'none' - auto-trigger-name: 'doctor-verify' - is-python: true + - verify: + auto-trigger-name: 'doctor-verify' + is-python: false + - python-verify: + auto-trigger-name: 'doctor-verify' + is-python: true pod: - - arm-pod2: - slave-label: '{pod}' - - arm-pod3: - slave-label: '{pod}' + - armband-baremetal: + slave-label: '{pod}' + - armband-virtual: + slave-label: '{pod}' jobs: - - 'doctor-verify-{stream}' - - 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}' - - 'doctor-{task}-{installer}-{inspector}-{stream}' + - 'doctor-verify-{stream}' + - 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}' + - 'doctor-{task}-{installer}-{inspector}-{stream}' - job-template: name: 'doctor-verify-{stream}' @@ -59,39 +54,39 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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: 'tests/**' + - 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: 'doctor_tests/**' builders: - - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" + - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" - job-template: name: 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}' @@ -101,22 +96,23 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - git-scm-gerrit triggers: - - '{auto-trigger-name}': - project: '{project}' - branch: '{branch}' + - '{auto-trigger-name}': + project: '{project}' + branch: '{branch}' + files: 'doctor_tests/**' builders: - - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" + - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" - job-template: @@ -125,87 +121,92 @@ node: '{slave-label}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: OS_CREDS - default: /home/jenkins/openstack.creds - description: 'OpenStack credentials' - - '{slave-label}-defaults' - - '{installer}-defaults' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: - name: CLEAN_DOCKER_IMAGES - default: 'false' - description: 'Remove downloaded docker images (opnfv/functest:*)' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' - description: 'Scenario to deploy and test' - # functest-suite-parameter - - string: - name: FUNCTEST_SUITE_NAME - default: 'doctor-notification' - - string: - name: TESTCASE_OPTIONS - default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor' - description: 'Addtional parameters specific to test case(s)' - # functest-parameter - - string: - name: GS_PATHNAME - default: '{gs-pathname}' - description: "Version directory where the opnfv documents will be stored in gs repository" - - string: - name: FUNCTEST_REPO_DIR - default: "/home/opnfv/repos/functest" - description: "Directory where the Functest repository is cloned" - - string: - name: PUSH_RESULTS_TO_DB - default: "true" - description: "Push the results of all the tests to the resultDB" - - string: - name: CI_DEBUG - default: 'true' - description: "Show debug output information" + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: OS_CREDS + default: /home/jenkins/openstack.creds + description: 'OpenStack credentials' + - '{slave-label}-defaults' + - '{installer}-defaults' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + - string: + name: CLEAN_DOCKER_IMAGES + default: 'false' + description: 'Remove downloaded docker images (opnfv/functest:*)' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: 'Scenario to deploy and test' + # functest-suite-parameter + - string: + name: FUNCTEST_MODE + default: 'testcase' + - string: + name: FUNCTEST_SUITE_NAME + default: 'doctor-notification' + - string: + name: TESTCASE_OPTIONS + default: '-e INSPECTOR_TYPE={inspector} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor' + description: 'Addtional parameters specific to test case(s)' + # functest-parameter + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where the opnfv documents will be stored in gs repository" + - string: + name: FUNCTEST_REPO_DIR + default: "/home/opnfv/repos/functest" + description: "Directory where the Functest repository is cloned" + - string: + name: PUSH_RESULTS_TO_DB + default: "true" + description: "Push the results of all the tests to the resultDB" + - string: + name: CI_DEBUG + default: 'true' + description: "Show debug output information" scm: - - git-scm-gerrit + - git-scm-gerrit triggers: - - '{auto-trigger-name}': - project: '{project}' - branch: '{branch}' + - '{auto-trigger-name}': + project: '{project}' + branch: '{branch}' + files: 'doctor_tests/**' builders: - - 'clean-workspace-log' - - shell: | - # NOTE: Create symbolic link, so that we can archive file outside - # of $WORKSPACE . - # NOTE: We are printing all logs under 'tests/' during test run, - # so this symbolic link should not be in 'tests/'. Otherwise, - # we'll have the same log twice in jenkins console log. - ln -sfn $HOME/opnfv/functest/results/{stream} functest_results - # NOTE: Get functest script in $WORKSPACE. This functest script is - # needed to perform VM image download in set-functest-env.sh - # from E release cycle. - mkdir -p functest/ci - wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh - - 'functest-suite-builder' - - shell: | - functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log" - # 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 + - 'clean-workspace-log' + - shell: | + # NOTE: Create symbolic link, so that we can archive file outside + # of $WORKSPACE . + # NOTE: We are printing all logs under 'tests/' during test run, + # so this symbolic link should not be in 'tests/'. Otherwise, + # we'll have the same log twice in jenkins console log. + ln -sfn $HOME/opnfv/functest/results/{stream} functest_results + # NOTE: Get functest script in $WORKSPACE. This functest script is + # needed to perform VM image download in set-functest-env.sh + # from E release cycle. + mkdir -p functest/ci + wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh + - 'functest-suite-builder' + - shell: | + functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log" + # NOTE: checking the test result, as the previous job could return + # 0 regardless the result of doctor test scenario. + grep -e 'doctor test successfully' $functest_log || exit 1 publishers: - - archive: - artifacts: 'tests/*.log' - - archive: - artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log' + - archive: + artifacts: 'doctor_tests/*.log' + - archive: + artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log' + - email-jenkins-admins-on-failure ##################################### @@ -214,29 +215,29 @@ - trigger: name: 'doctor-verify' 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: 'tests/**' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true + - 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: '{files}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true diff --git a/jjb/domino/domino.yml b/jjb/domino/domino.yml index 8c9be120b..7fc818c7a 100644 --- a/jjb/domino/domino.yml +++ b/jjb/domino/domino.yml @@ -1,20 +1,21 @@ +--- - project: name: domino project: '{name}' jobs: - - 'domino-verify-{stream}' + - 'domino-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'domino-verify-{stream}' @@ -22,39 +23,39 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - #!/bin/bash - ./tests/run.sh + - shell: | + #!/bin/bash + ./tests/run.sh diff --git a/jjb/dovetail/dovetail-artifacts-upload.yml b/jjb/dovetail/dovetail-artifacts-upload.yml index 0c8efbe0d..9a11c6e26 100644 --- a/jjb/dovetail/dovetail-artifacts-upload.yml +++ b/jjb/dovetail/dovetail-artifacts-upload.yml @@ -1,3 +1,4 @@ +--- ############################################ # dovetail upload artifacts job ############################################ @@ -7,20 +8,20 @@ project: 'dovetail' jobs: - - 'dovetail-{image}-artifacts-upload-{stream}' + - 'dovetail-{image}-artifacts-upload-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false image: - - 'dovetail' - - 'functest' - - 'yardstick' - - 'testapi' - - 'mongo' + - 'dovetail' + - 'functest' + - 'yardstick' + - 'testapi' + - 'mongo' ############################################# # job template @@ -35,30 +36,30 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' + - 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}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - dovetail-parameter: + gs-pathname: '{gs-pathname}' + image: '{image}' + branch: '{branch}' scm: - - git-scm + - git-scm builders: - - 'dovetail-builder-artifacts-upload' - - 'dovetail-upload-artifacts-cache-cleanup' - - 'dovetail-images-cleanup' + - 'dovetail-builder-artifacts-upload' + - 'dovetail-upload-artifacts-cache-cleanup' + - 'dovetail-images-cleanup' #################### # parameter macros @@ -66,49 +67,49 @@ - 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" + - 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 +# builders for dovetail project #################################### - builder: name: dovetail-builder-artifacts-upload builders: - - shell: - !include-raw: ./dovetail-artifacts-upload.sh + - shell: + !include-raw: ./dovetail-artifacts-upload.sh - builder: name: dovetail-upload-artifacts-cache-cleanup builders: - - shell: | - #!/bin/bash - set -o errexit + - shell: | + #!/bin/bash + set -o errexit - echo "Dovetail: cleanup cache used for storage downloaded packages" + echo "Dovetail: cleanup cache used for storage downloaded packages" - /bin/rm -rf $CACHE_DIR + /bin/rm -rf $CACHE_DIR - builder: name: dovetail-images-cleanup builders: - - shell: - !include-raw: ./dovetail-cleanup.sh + - shell: + !include-raw: ./dovetail-cleanup.sh diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index bcda2b7ca..9fde120f8 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -1,3 +1,4 @@ +--- ################################### # job configuration for dovetail ################################### @@ -6,184 +7,179 @@ project: '{name}' -#--------------------------------------- -# BRANCH ANCHORS -#--------------------------------------- -# 1)the stream/branch here represents the SUT(System Under Test) stream/branch -# 2)docker-tag is the docker tag of dovetail(only master by now, then all latest used) -# the dovetail stream is one-to-one mapping with dovetail docker-tag -# the dovetail is not sync with A/B/C release -# + # -------------------------------------- + # BRANCH ANCHORS + # -------------------------------------- + # 1)the stream/branch here represents the SUT(System Under Test) stream/branch + # 2)docker-tag is the docker tag of dovetail(only master by now, then all latest used) + # the dovetail stream is one-to-one mapping with dovetail docker-tag + # the dovetail is not sync with A/B/C release master: &master - stream: master - branch: '{stream}' - dovetail-branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' + stream: master + branch: '{stream}' + dovetail-branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' danube: &danube - stream: danube - branch: 'stable/{stream}' - dovetail-branch: master - gs-pathname: '/{stream}' - docker-tag: 'cvp.0.3.0' + stream: danube + branch: 'stable/{stream}' + dovetail-branch: master + gs-pathname: '/{stream}' + docker-tag: 'cvp.0.7.0' -#----------------------------------- -# POD, PLATFORM, AND BRANCH MAPPING -#----------------------------------- -# CI PODs -# This section should only contain the SUTs -# that have been switched using labels for slaves -#------------------------------------------------ -# the pods, SUTs listed here are just examples to -# let the dovetail tool run, there can be more ways beside CI to -# run the dovetail tool. -# pods, SUTs will be added/adjusted when needed + # ---------------------------------- + # POD, PLATFORM, AND BRANCH MAPPING + # ---------------------------------- + # CI PODs + # This section should only contain the SUTs + # that have been switched using labels for slaves + # ----------------------------------------------- + # the pods, SUTs listed here are just examples to + # let the dovetail tool run, there can be more ways beside CI to + # run the dovetail tool. + # pods, SUTs will be added/adjusted when needed pod: -# fuel CI PODs - - baremetal: - slave-label: fuel-baremetal - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - virtual: - slave-label: fuel-virtual - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - baremetal: - slave-label: fuel-baremetal - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - virtual: - slave-label: fuel-virtual - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube -#compass CI PODs - - baremetal: - slave-label: compass-baremetal - SUT: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - virtual: - slave-label: compass-virtual - SUT: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - baremetal: - slave-label: compass-baremetal - SUT: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - virtual: - slave-label: compass-virtual - SUT: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube -#-------------------------------- -# Installers not using labels -# CI PODs -# This section should only contain the installers -# that have not been switched using labels for slaves -#-------------------------------- -#apex PODs - - virtual: - slave-label: apex-virtual-master - SUT: apex - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - baremetal: - slave-label: apex-baremetal-master - SUT: apex - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - virtual: - slave-label: apex-virtual-danube - SUT: apex - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - baremetal: - slave-label: apex-baremetal-danube - SUT: apex - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube -#armband CI PODs - - armband-baremetal: - slave-label: armband-baremetal - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - armband-virtual: - slave-label: armband-virtual - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - armband-baremetal: - slave-label: armband-baremetal - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - armband-virtual: - slave-label: armband-virtual - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube -#-------------------------------- -# None-CI PODs -#-------------------------------- - - baremetal-centos: - slave-label: 'intel-pod8' - SUT: compass - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-pod2: - slave-label: '{pod}' - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-pod3: - slave-label: '{pod}' - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-virtual1: - slave-label: '{pod}' - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - zte-pod1: - slave-label: zte-pod1 - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - zte-pod2: - slave-label: zte-pod2 - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - zte-pod3: - slave-label: zte-pod3 - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - zte-pod1: - slave-label: zte-pod1 - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - zte-pod3: - slave-label: zte-pod3 - SUT: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube -#-------------------------------- + # fuel CI PODs + - baremetal: + slave-label: fuel-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - virtual: + slave-label: fuel-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - baremetal: + slave-label: fuel-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - virtual: + slave-label: fuel-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + # compass CI PODs + - baremetal: + slave-label: compass-baremetal + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - virtual: + slave-label: compass-virtual + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - baremetal: + slave-label: compass-baremetal + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - virtual: + slave-label: compass-virtual + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + # ------------------------------- + # Installers not using labels + # CI PODs + # This section should only contain the installers + # that have not been switched using labels for slaves + # ------------------------------- + # apex PODs + - virtual: + slave-label: apex-virtual-master + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - baremetal: + slave-label: apex-baremetal-master + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - virtual: + slave-label: apex-virtual-danube + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - baremetal: + slave-label: apex-baremetal-danube + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + # armband CI PODs + - armband-baremetal: + slave-label: armband-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - armband-virtual: + slave-label: armband-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - armband-baremetal: + slave-label: armband-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - armband-virtual: + slave-label: armband-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + # ------------------------------- + # None-CI PODs + # ------------------------------- + - baremetal-centos: + slave-label: 'intel-pod8' + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod1: + slave-label: zte-pod1 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod2: + slave-label: zte-pod2 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod3: + slave-label: zte-pod3 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod1: + slave-label: zte-pod1 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - zte-pod3: + slave-label: zte-pod3 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - huawei-pod4: + slave-label: huawei-pod4 + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - huawei-pod7: + slave-label: huawei-pod7 + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + + # ------------------------------- testsuite: - - 'compliance_set' - - 'proposed_tests' + - 'compliance_set' + - 'proposed_tests' jobs: - - 'dovetail-{SUT}-{pod}-{testsuite}-{stream}' + - 'dovetail-{SUT}-{pod}-{testsuite}-{stream}' ################################ # job templates @@ -196,79 +192,80 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: 180 - abort: true - - fix-workspace-permissions + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 300 + abort: true + - fix-workspace-permissions triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' 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" - - string: - name: SUT_BRANCH - default: '{branch}' - description: "SUT branch" + - 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" + - string: + name: SUT_BRANCH + default: '{branch}' + description: "SUT branch" scm: - - git-scm + - git-scm builders: - - description-setter: - description: "POD: $NODE_NAME" - - 'dovetail-cleanup' - - 'dovetail-run' + - description-setter: + description: "POD: $NODE_NAME" + - 'dovetail-cleanup' + - 'dovetail-run' publishers: - - archive: - artifacts: 'results/**/*' - allow-empty: true - fingerprint: true + - archive: + artifacts: 'results/**/*' + allow-empty: true + fingerprint: true + - email-jenkins-admins-on-failure -#-------------------------- +# ------------------------- # builder macros -#-------------------------- +# ------------------------- - builder: name: dovetail-run builders: - - shell: - !include-raw: ./dovetail-run.sh + - shell: + !include-raw: ./dovetail-run.sh - builder: name: dovetail-cleanup builders: - - shell: - !include-raw: ./dovetail-cleanup.sh + - shell: + !include-raw: ./dovetail-cleanup.sh diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh index 3ae0cbcc9..2d66fe022 100755 --- a/jjb/dovetail/dovetail-cleanup.sh +++ b/jjb/dovetail/dovetail-cleanup.sh @@ -12,16 +12,16 @@ # clean up dependent project docker images, which has no containers and image tag None clean_images=(opnfv/functest opnfv/yardstick opnfv/testapi mongo) 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 + echo "Removing image $image_id, which has no containers and image tag is None" docker rmi $image_id >${redirect} done fi done -echo "Remove containers with image opnfv/dovetail:<None>..." +echo "Remove dovetail images with tag None and containers with these images ..." 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 @@ -37,13 +37,13 @@ if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >${redirect} fi -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} - image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image opnfv/dovetail:$tag..." - docker rmi opnfv/dovetail:$tag >${redirect} - done -fi +#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} +# image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}')) +# for tag in "${image_tags[@]}"; do +# echo "Removing docker image opnfv/dovetail:$tag..." +# docker rmi opnfv/dovetail:$tag >${redirect} +# done +#fi diff --git a/jjb/dovetail/dovetail-project-jobs.yml b/jjb/dovetail/dovetail-project-jobs.yml index 9dc4808b4..c38ec9637 100644 --- a/jjb/dovetail/dovetail-project-jobs.yml +++ b/jjb/dovetail/dovetail-project-jobs.yml @@ -1,3 +1,4 @@ +--- ################################################### # Non-ci jobs for Dovetail project # They will only be enabled on request by projects! @@ -8,13 +9,13 @@ project: 'dovetail' jobs: - - 'dovetail-verify-{stream}' - - 'dovetail-merge-{stream}' + - 'dovetail-verify-{stream}' + - 'dovetail-merge-{stream}' stream: - - master: - branch: '{stream}' - disabled: false + - master: + branch: '{stream}' + disabled: false ################################ # job templates @@ -26,35 +27,35 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' + - 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}' builders: - - dovetail-unit-tests + - dovetail-unit-tests - job-template: name: 'dovetail-merge-{stream}' @@ -62,50 +63,50 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm 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}' + - 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}' builders: - - dovetail-unit-tests + - dovetail-unit-tests ################################ -#builders for dovetail project +# builders for dovetail project ############################### - builder: name: dovetail-hello-world builders: - - shell: | - #!/bin/bash - set -o errexit + - shell: | + #!/bin/bash + set -o errexit - echo "hello world" + echo "hello world" - builder: name: dovetail-unit-tests builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail - tox + tox diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index bf96fd492..2cbb94766 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -83,6 +83,8 @@ if [[ ${INSTALLER_TYPE} == compass ]]; then options="-u root -p root" elif [[ ${INSTALLER_TYPE} == fuel ]]; then options="-u root -p r00tme" +elif [[ ${INSTALLER_TYPE} == apex ]]; then + options="-u stack -k /root/.ssh/id_rsa" else echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." echo "HA test cases may not run properly." @@ -115,9 +117,31 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa fi +if [ "$INSTALLER_TYPE" == "apex" ]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sudo scp $ssh_options stack@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa +fi + +image_path=${HOME}/opnfv/dovetail/images +if [[ ! -d ${image_path} ]]; then + mkdir -p ${image_path} +fi # sdnvpn test case needs to download this image first before running -echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..." -wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} +ubuntu_image=${image_path}/ubuntu-16.04-server-cloudimg-amd64-disk1.img +if [[ ! -f ${ubuntu_image} ]]; then + echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..." + wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${image_path} +fi +sudo cp ${ubuntu_image} ${DOVETAIL_CONFIG} + +# functest needs to download this image first before running +cirros_image=${image_path}/cirros-0.3.5-x86_64-disk.img +if [[ ! -f ${cirros_image} ]]; then + echo "Download image cirros-0.3.5-x86_64-disk.img ..." + wget -q -nc http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img -P ${image_path} +fi +sudo cp ${cirros_image} ${DOVETAIL_CONFIG} + opts="--privileged=true -id" @@ -128,8 +152,10 @@ dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}" echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}" docker pull opnfv/dovetail:$DOCKER_TAG >$redirect +env4bgpvpn="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}" + cmd="docker run ${opts} -e DOVETAIL_HOME=${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \ - ${sshkey} opnfv/dovetail:${DOCKER_TAG} /bin/bash" + ${sshkey} ${env4bgpvpn} opnfv/dovetail:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} sleep 5 @@ -149,6 +175,29 @@ if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi +# Modify tempest_conf.yaml file +tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml +if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then + volume_device='vdb' +else + volume_device='vdc' +fi + +cat << EOF >$tempest_conf_file + +compute: + min_compute_nodes: 2 + volume_device_name: ${volume_device} + +EOF + +echo "${tempest_conf_file}..." +cat ${tempest_conf_file} + +cp_tempest_cmd="docker cp ${DOVETAIL_CONFIG}/tempest_conf.yaml $container_id:/home/opnfv/dovetail/dovetail/userconfig" +echo "exec command: ${cp_tempest_cmd}" +$cp_tempest_cmd + list_cmd="dovetail list ${TESTSUITE}" run_cmd="dovetail run --testsuite ${TESTSUITE} -d" echo "Container exec command: ${list_cmd}" @@ -163,5 +212,8 @@ sudo cp -r ${DOVETAIL_HOME}/results ./ # PRIMARY_GROUP=$(id -gn $CURRENT_USER) # sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results +#remove useless workspace from yardstick to save disk space +sudo rm -rf ./results/workspace + echo "Dovetail: done!" diff --git a/jjb/dovetail/dovetail-weekly-jobs.yml b/jjb/dovetail/dovetail-weekly-jobs.yml index 700657d68..5a162bb7f 100644 --- a/jjb/dovetail/dovetail-weekly-jobs.yml +++ b/jjb/dovetail/dovetail-weekly-jobs.yml @@ -1,59 +1,60 @@ +--- - project: name: dovetail-weekly-jobs project: dovetail -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - dovetail-branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' + stream: master + branch: '{stream}' + dovetail-branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' danube: &danube - stream: danube - branch: 'stable/{stream}' - dovetail-branch: master - gs-pathname: '/{stream}' - docker-tag: 'latest' + stream: danube + 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, 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 -# <<: *danube - - baremetal: - slave-label: compass-baremetal - SUT: compass - <<: *danube -# - baremetal: -# slave-label: fuel-baremetal -# SUT: fuel -# <<: *danube -# - baremetal: -# slave-label: joid-baremetal -# SUT: joid -# <<: *danube + # - baremetal: + # slave-label: apex-baremetal + # SUT: apex + # <<: *danube + - baremetal: + slave-label: compass-baremetal + SUT: compass + <<: *danube + # - baremetal: + # slave-label: fuel-baremetal + # SUT: fuel + # <<: *danube + # - baremetal: + # slave-label: joid-baremetal + # SUT: joid + # <<: *danube testsuite: - - 'debug' - - 'compliance_set' - - 'proposed_tests' + - 'debug' + - 'compliance_set' + - 'proposed_tests' loop: - - 'weekly': - job-timeout: 180 + - 'weekly': + job-timeout: 180 jobs: - - 'dovetail-{SUT}-{pod}-{testsuite}-{loop}-{stream}' + - 'dovetail-{SUT}-{pod}-{testsuite}-{loop}-{stream}' ################################ # job template @@ -66,60 +67,61 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - 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 - - fix-workspace-permissions + - build-name: + name: '$BUILD_NUMBER Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: '{job-timeout}' + abort: true + - fix-workspace-permissions 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" + - 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 + - git-scm builders: - - description-setter: - description: "POD: $NODE_NAME" - - 'dovetail-cleanup' - - 'dovetail-run' + - description-setter: + description: "POD: $NODE_NAME" + - 'dovetail-cleanup' + - 'dovetail-run' publishers: - - archive: - artifacts: 'results/**/*' - allow-empty: true - fingerprint: true + - archive: + artifacts: 'results/**/*' + allow-empty: true + fingerprint: true + - email-jenkins-admins-on-failure ######################## # builder macros @@ -127,10 +129,11 @@ - builder: name: dovetail-run-weekly builders: - - shell: - !include-raw: ./dovetail-run.sh + - shell: + !include-raw: ./dovetail-run.sh + - builder: name: dovetail-cleanup-weekly builders: - - shell: - !include-raw: ./dovetail-cleanup.sh + - shell: + !include-raw: ./dovetail-cleanup.sh diff --git a/jjb/dpacc/dpacc.yml b/jjb/dpacc/dpacc.yml index 63eb044ad..3501d276d 100644 --- a/jjb/dpacc/dpacc.yml +++ b/jjb/dpacc/dpacc.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'dpacc-verify-{stream}' + - 'dpacc-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'dpacc-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/escalator/escalator.yml b/jjb/escalator/escalator.yml index 041a41f91..d203dc113 100644 --- a/jjb/escalator/escalator.yml +++ b/jjb/escalator/escalator.yml @@ -1,31 +1,36 @@ +--- - project: name: 'escalator' project: 'escalator' -##################################### -# branch definitions -##################################### + + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false -##################################### -# phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + ##################################### + # phases + ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-centos' - - 'build': - slave-label: 'opnfv-build-centos' -##################################### -# jobs -##################################### + - 'basic': + slave-label: 'opnfv-build-centos' + - 'build': + slave-label: 'opnfv-build-centos' + + ##################################### + # jobs + ##################################### jobs: - - 'escalator-verify-{stream}' - - 'escalator-verify-{phase}-{stream}' - - 'escalator-merge-{stream}' - - 'escalator-merge-{phase}-{stream}' + - 'escalator-verify-{stream}' + - 'escalator-verify-{phase}-{stream}' + - 'escalator-merge-{stream}' + - 'escalator-merge-{phase}-{stream}' + ##################################### # job templates ##################################### @@ -39,85 +44,85 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - readable-message: true + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-defaults' - - 'escalator-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-defaults' + - 'escalator-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'escalator-verify-basic-{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: build - condition: SUCCESSFUL - projects: - - name: 'escalator-verify-build-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'escalator-verify-basic-{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: build + condition: SUCCESSFUL + projects: + - name: 'escalator-verify-build-{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 - job-template: name: 'escalator-verify-{phase}-{stream}' @@ -127,26 +132,26 @@ concurrent: true scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - 'escalator-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + - 'escalator-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' - job-template: name: 'escalator-merge-{stream}' @@ -158,79 +163,79 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - readable-message: true + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-defaults' - - 'escalator-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-defaults' + - 'escalator-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'escalator-merge-basic-{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: build - condition: SUCCESSFUL - projects: - - name: 'escalator-merge-build-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'escalator-merge-basic-{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: build + condition: SUCCESSFUL + projects: + - name: 'escalator-merge-build-{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 - job-template: name: 'escalator-merge-{phase}-{stream}' @@ -240,69 +245,73 @@ concurrent: true scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - 'escalator-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + - 'escalator-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-merge-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-merge-{phase}-macro' + ##################################### # builder macros ##################################### - builder: name: 'escalator-verify-basic-macro' builders: - - shell: - !include-raw: ./escalator-basic.sh + - shell: + !include-raw: ./escalator-basic.sh - builder: name: 'escalator-verify-build-macro' builders: - - shell: - !include-raw: ./escalator-build.sh + - shell: + !include-raw: ./escalator-build.sh - builder: name: 'escalator-merge-basic-macro' builders: - - shell: - !include-raw: ./escalator-basic.sh + - shell: + !include-raw: ./escalator-basic.sh +# yamllint disable rule:indentation - builder: name: 'escalator-merge-build-macro' builders: - - shell: - !include-raw: - - ./escalator-build.sh - - ./escalator-upload-artifact.sh + - shell: + !include-raw: + - ./escalator-build.sh + - ./escalator-upload-artifact.sh +# yamllint enable rule:indentation + ##################################### # parameter macros ##################################### - parameter: name: 'escalator-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." + - 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-build.sh b/jjb/fuel/fuel-build.sh deleted file mode 100755 index 2c0d12a80..000000000 --- a/jjb/fuel/fuel-build.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# disable Fuel iso build for master branch -if [[ "$BRANCH" == 'master' ]]; then - touch $WORKSPACE/.noupload - echo "--------------------------------------------------------" - echo "Done!" - exit 0 -fi - -set -o errexit -set -o nounset -set -o pipefail - -export TERM="vt220" - -cd $WORKSPACE - -# remove the expired items from cache -test -f $WORKSPACE/ci/clean_cache.sh && $WORKSPACE/ci/clean_cache.sh $CACHE_DIRECTORY - -LATEST_ISO_PROPERTIES=$WORKSPACE/latest.iso.properties -if [[ "$JOB_NAME" =~ "daily" ]]; then - # check to see if we already have an artifact on artifacts.opnfv.org - # for this commit during daily builds - echo "Checking to see if we already built and stored Fuel ISO for this commit" - - curl -s -o $LATEST_ISO_PROPERTIES http://$GS_URL/latest.properties 2>/dev/null -fi - -# get metadata of latest ISO -if grep -q OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES 2>/dev/null; then - LATEST_ISO_SHA1=$(grep OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES | cut -d'=' -f2) - LATEST_ISO_URL=$(grep OPNFV_ARTIFACT_URL $LATEST_ISO_PROPERTIES | cut -d'=' -f2) -else - LATEST_ISO_SHA1=none -fi - -# get current SHA1 -CURRENT_SHA1=$(git rev-parse HEAD) - -# set FORCE_BUILD to false for non-daily builds -FORCE_BUILD=${FORCE_BUILD:-false} - -if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" && "$FORCE_BUILD" == "false" ]]; then - echo "***************************************************" - echo " An ISO has already been built for this commit" - echo " $LATEST_ISO_URL" - echo "***************************************************" -# echo "Nothing new to build. Exiting." -# touch $WORKSPACE/.noupload -# exit 0 -else - echo "This commit has not been built yet or forced build! Proceeding with the build." - /bin/rm -f $LATEST_ISO_PROPERTIES - echo -fi - -# log info to console -echo "Starting the build of $INSTALLER_TYPE. This could take some time..." -echo "--------------------------------------------------------" -echo - -# create the cache directory if it doesn't exist -mkdir -p $CACHE_DIRECTORY - -# set OPNFV_ARTIFACT_VERSION -if [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Building Fuel ISO for a merged change" - export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER" -else - export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") -fi - -NOCACHE_PATTERN="verify: no-cache" -if [[ "$JOB_NAME" =~ "verify" && "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "$NOCACHE_PATTERN" ]]; then - echo "The cache will not be used for this build!" - NOCACHE_ARG="-f P" -fi -NOCACHE_ARG=${NOCACHE_ARG:-} - -# start the build -cd $WORKSPACE/ci -./build.sh -v $OPNFV_ARTIFACT_VERSION $NOCACHE_ARG -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY - -# list the build artifacts -ls -al $BUILD_DIRECTORY - -# 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/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 - -echo -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 7a57cb554..b6a1bc469 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -1,3 +1,4 @@ +--- # jenkins job templates for Fuel - project: @@ -7,111 +8,114 @@ installer: '{name}' -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - disabled: false - gs-pathname: '' + stream: master + branch: '{stream}' + disabled: false + gs-pathname: '' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' danube: &danube - stream: danube - branch: 'stable/{stream}' - disabled: false - gs-pathname: '/{stream}' -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# CI PODs -#-------------------------------- + stream: danube + branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- + # CI PODs + # ------------------------------- pod: - - baremetal: - slave-label: fuel-baremetal - <<: *master - - virtual: - slave-label: fuel-virtual - <<: *master - - baremetal: - slave-label: fuel-baremetal - <<: *danube - - virtual: - slave-label: fuel-virtual - <<: *danube -#-------------------------------- -# None-CI PODs -#-------------------------------- - - zte-pod1: - slave-label: zte-pod1 - <<: *master - - zte-pod2: - slave-label: zte-pod2 - <<: *master - - zte-pod3: - slave-label: zte-pod3 - <<: *master - - zte-pod1: - slave-label: zte-pod1 - <<: *danube - - zte-pod3: - slave-label: zte-pod3 - <<: *danube -#-------------------------------- -# scenarios -#-------------------------------- + - baremetal: + slave-label: fuel-baremetal + <<: *master + - virtual: + slave-label: fuel-virtual + <<: *master + - baremetal: + slave-label: fuel-baremetal + <<: *euphrates + - virtual: + slave-label: fuel-virtual + <<: *euphrates + # ------------------------------- + # None-CI PODs + # ------------------------------- + - zte-pod1: + slave-label: zte-pod1 + <<: *master + - zte-pod3: + slave-label: zte-pod3 + <<: *master + - zte-pod1: + slave-label: zte-pod1 + <<: *euphrates + - zte-pod3: + slave-label: zte-pod3 + <<: *euphrates + - zte-pod1: + slave-label: zte-pod1 + <<: *danube + # ------------------------------- + # scenarios + # ------------------------------- scenario: - # HA scenarios - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-nofeature-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l3-nofeature-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-sfc-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-nofeature-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-sfc-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-bgpvpn-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-ovs-ha': - 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' - - 'os-odl_l2-nofeature-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l3-nofeature-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-sfc-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-nofeature-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-sfc-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-bgpvpn-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm-noha': - 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' - - 'os-nosdn-kvm_ovs_dpdk_bar-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + # HA scenarios + - 'os-nosdn-nofeature-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-odl-nofeature-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-onos-sfc-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-onos-nofeature-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-nosdn-kvm-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-nosdn-ovs-ha': + 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' + - 'os-odl-nofeature-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-onos-sfc-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-onos-nofeature-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-nosdn-kvm-noha': + 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' + - 'os-nosdn-kvm_ovs_dpdk_bar-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + # danube scenario for Dovetail only + - 'os-odl_l2-bgpvpn-ha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + + exclude: + - scenario: os-odl_l2-bgpvpn-ha + stream: master + - scenario: os-odl_l2-bgpvpn-ha + stream: euphrates jobs: - - 'fuel-{scenario}-{pod}-daily-{stream}' - - 'fuel-deploy-{pod}-daily-{stream}' + - 'fuel-{scenario}-{pod}-daily-{stream}' + - 'fuel-deploy-{pod}-daily-{stream}' + - 'fuel-collect-logs-{pod}-daily-{stream}' ######################## # job templates @@ -124,124 +128,115 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-{pod}-daily-.*' - - 'fuel-os-.*?-{pod}-weekly-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-{pod}-daily-.*' + - 'fuel-os-.*?-{pod}-weekly-.*' + - 'fuel-verify-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - fuel-ci-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - trigger-builds: - - project: 'fuel-deploy-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-fuel-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-fuel-{pod}-daily-{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' - # 1.dovetail only has master, based on D release - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only debug testsuite here(refstack, ha, ipv6, bgpvpn) - # 4.not used for release criteria or compliance, - # only to debug the dovetail tool bugs with bgpvpn - # 5,only run against scenario os-odl_l2-bgpvpn-ha(regex used here, can extend to more scenarios future) - - conditional-step: + - description-setter: + description: "Built on $NODE_NAME" + - trigger-builds: + - project: 'fuel-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-fuel-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'yardstick-fuel-{pod}-daily-{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' + # 1.dovetail only has master, based on D release + # 2.here the stream means the SUT stream, dovetail stream is defined in its own job + # 3.only debug testsuite here(refstack, ha, ipv6, bgpvpn) + # 4.not used for release criteria or compliance, + # only to debug the dovetail tool bugs with bgpvpn and nosdn-nofeature + # 5.only run against scenario os-odl-bgpvpn-ha(regex used here, can extend to more scenarios future) + # 6.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube + - conditional-step: + condition-kind: regex-match + regex: os-(nosdn-nofeature|odl_l2-bgpvpn)-ha + label: '{scenario}' + steps: + - trigger-builds: + - project: 'dovetail-fuel-{pod}-proposed_tests-master' + 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' + - conditional-step: + condition-kind: not + condition-operand: condition-kind: regex-match - regex: os-odl_l2-bgpvpn-ha - label: '{scenario}' - steps: - - trigger-builds: - - project: 'dovetail-fuel-{pod}-proposed_tests-{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' - # ZTE pod1 weekly(Sunday), os-odl_l2-nofeature-ha, run against master and danube - - conditional-step: - condition-kind: and - condition-operands: - - condition-kind: regex-match - regex: os-odl_l2-nofeature-ha - label: '{scenario}' - - condition-kind: regex-match - regex: zte-pod1 - label: '{pod}' - - condition-kind: day-of-week - day-selector: select-days - days: - SAT: true - use-build-time: true - steps: - - trigger-builds: - - project: 'dovetail-fuel-zte-pod1-proposed_tests-{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' + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'fuel-collect-logs-{pod}-daily-{stream}' + current-parameters: false + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' publishers: - - email: - recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email: + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email-jenkins-admins-on-failure - job-template: name: 'fuel-deploy-{pod}-daily-{stream}' @@ -251,1003 +246,710 @@ 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: - - 'fuel-deploy-{pod}-daily-.*' - - 'fuel-deploy-generic-daily-.*' - - 'fuel-deploy-{pod}-weekly-.*' - - 'fuel-deploy-generic-weekly-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-deploy-{pod}-daily-.*' + - 'fuel-deploy-generic-daily-.*' + - 'fuel-deploy-{pod}-weekly-.*' + - 'fuel-deploy-generic-weekly-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - fuel-ci-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_TIMEOUT - default: '150' - description: 'Deployment timeout in minutes' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl-nofeature-ha' + - string: + name: DEPLOY_TIMEOUT + default: '150' + description: 'Deployment timeout in minutes' scm: - - git-scm + - git-scm wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' builders: - - description-setter: - description: "Built on $NODE_NAME" - - shell: - !include-raw-escape: ./fuel-download-artifact.sh - - shell: - !include-raw-escape: ./fuel-deploy.sh + - description-setter: + description: "Built on $NODE_NAME" + - shell: + !include-raw-escape: ./fuel-download-artifact.sh + - shell: + !include-raw-escape: ./fuel-deploy.sh publishers: - - email: - recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email: + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email-jenkins-admins-on-failure + +- job-template: + name: 'fuel-collect-logs-{pod}-daily-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default -######################## -# parameter macros -######################## -- parameter: - name: fuel-ci-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." - - string: - name: SSH_KEY - default: "/tmp/mcp.rsa" - description: "Path to private SSH key to access environment nodes. For MCP deployments only." + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + + scm: + - git-scm + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: + !include-raw-escape: ./fuel-logs.sh + + publishers: + - email-jenkins-admins-on-failure + ######################## # trigger macros ######################## -#----------------------------------------------- +# ---------------------------------------------- # Triggers for job running on fuel-baremetal against master branch -#----------------------------------------------- +# ---------------------------------------------- # HA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 20 * * *' -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 23 * * *' + - timed: '5 20 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-master-trigger' + name: 'fuel-os-odl-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 * * *' + - timed: '5 5 * * *' - trigger: name: 'fuel-os-onos-sfc-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 5 * * *' + - timed: '' # '5 5 * * *' - trigger: name: 'fuel-os-onos-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 8 * * *' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 11 * * *' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 14 * * *' + - timed: '' # '5 8 * * *' - trigger: name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '5 17 * * *' + - timed: '' # '5 17 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '30 12 * * *' + - timed: '' # '30 12 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master-trigger' triggers: - - timed: '' # '30 8 * * *' + - timed: '' # '30 8 * * *' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-baremetal-daily-master-trigger' + name: 'fuel-os-odl-nofeature-noha-baremetal-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-noha-baremetal-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-noha-baremetal-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-master-trigger' triggers: - - timed: '' -#----------------------------------------------- -# Triggers for job running on fuel-baremetal against danube branch -#----------------------------------------------- + - timed: '' +# ---------------------------------------------- +# Triggers for job running on fuel-baremetal against euphrates branch +# ---------------------------------------------- # HA Scenarios - 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-danube-trigger' - triggers: - - timed: '0 23 * * *' -- 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-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' # '0 5 * * *' + - timed: '0 20 * * *' - trigger: - name: 'fuel-os-onos-nofeature-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' # '0 8 * * *' + - timed: '0 2 * * *' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-onos-sfc-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 11 * * *' + - timed: '' # '0 5 * * *' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 14 * * *' + - timed: '' # '0 8 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 17 * * *' + - timed: '' # '0 17 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 20 * * *' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 12 * * *' + - timed: '' # '0 12 * * *' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '0 8 * * *' + - timed: '' # '0 8 * * *' # NOHA Scenarios - 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_l3-nofeature-noha-baremetal-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-onos-sfc-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' -#----------------------------------------------- + - timed: '' +# ---------------------------------------------- # Triggers for job running on fuel-virtual against master branch -#----------------------------------------------- +# ---------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-virtual-daily-master-trigger' + name: 'fuel-os-odl-nofeature-ha-virtual-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-virtual-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-ha-virtual-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-virtual-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-master-trigger' triggers: - - timed: '' + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: '5 13 * * *' + - timed: '5 13 * * *' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-virtual-daily-master-trigger' + name: 'fuel-os-odl-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: '35 15 * * *' -- trigger: - name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-master-trigger' - triggers: - - timed: '5 18 * * *' + - timed: '5 18 * * *' - 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 * * *' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '35 1 * * *' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '5 4 * * *' + - timed: '' # '5 23 * * *' - trigger: name: 'fuel-os-nosdn-kvm-noha-virtual-daily-master-trigger' triggers: - - timed: '' # '35 6 * * *' + - timed: '' # '35 6 * * *' - trigger: name: 'fuel-os-nosdn-ovs-noha-virtual-daily-master-trigger' triggers: - - timed: '5 9 * * *' + - timed: '5 9 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master-trigger' triggers: - - timed: '' # '30 16 * * *' + - timed: '' # '30 16 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-master-trigger' triggers: - - timed: '' # '30 20 * * *' -#----------------------------------------------- -# Triggers for job running on fuel-virtual against danube branch -#----------------------------------------------- + - timed: '' # '30 20 * * *' +# ---------------------------------------------- +# Triggers for job running on fuel-virtual against euphrates branch +# ---------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-virtual-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-virtual-daily-danube-trigger' + name: 'fuel-os-onos-sfc-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-virtual-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-euphrates-trigger' triggers: - - timed: '' -- 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: '' + - timed: '' # NOHA Scenarios - 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-danube-trigger' - triggers: - - timed: '30 15 * * *' -- trigger: - name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '0 18 * * *' + - timed: '0 13 * * *' - trigger: - name: 'fuel-os-onos-sfc-noha-virtual-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '' # '30 20 * * *' + - timed: '0 18 * * *' - trigger: - name: 'fuel-os-onos-nofeature-noha-virtual-daily-danube-trigger' + name: 'fuel-os-onos-sfc-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '' # '0 23 * * *' + - timed: '' # '30 20 * * *' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '30 1 * * *' + - timed: '' # '0 23 * * *' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '0 4 * * *' + - timed: '' # '30 6 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-noha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '30 6 * * *' + - timed: '0 9 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-noha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '0 9 * * *' + - timed: '' # '0 16 * * *' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '0 16 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-danube-trigger' - triggers: - - timed: '0 20 * * *' -#----------------------------------------------- + - timed: '' # '0 20 * * *' +# ---------------------------------------------- # ZTE POD1 Triggers running against master branch -#----------------------------------------------- +# ---------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '0 10 * * *' + - timed: '0 10 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod1-daily-master-trigger' + name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod1-daily-master-trigger' + name: 'fuel-os-odl-nofeature-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-master-trigger' triggers: - - timed: '' - -#----------------------------------------------- -# ZTE POD2 Triggers running against master branch -#----------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - 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' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -- trigger: - 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: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod2-daily-master-trigger' - triggers: - - timed: '' -#----------------------------------------------- + - timed: '' +# ---------------------------------------------- # ZTE POD3 Triggers running against master branch -#----------------------------------------------- +# ---------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' + - timed: '' # '0 10 * * *' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod3-daily-master-trigger' + name: 'fuel-os-odl-nofeature-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '0 10 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod3-daily-master-trigger' + name: 'fuel-os-odl-nofeature-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod3-daily-master-trigger' triggers: - - timed: '' -#----------------------------------------------- -# ZTE POD1 Triggers running against danube branch -#----------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' + - timed: '' +# ---------------------------------------------- +# ZTE POD1 Triggers running against euphrates branch +# ---------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '0 2 * * *' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' -- 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: '' + - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- 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-danube-trigger' - triggers: - - timed: '' -- 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-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' - -#----------------------------------------------- -# ZTE POD2 Triggers running against danube branch -#----------------------------------------------- + - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' +# ---------------------------------------------- +# ZTE POD3 Triggers running against euphrates branch +# ---------------------------------------------- - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' # '0 18 * * *' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' # '0 2 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod2-daily-danube-trigger' - triggers: - - timed: '' + - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod2-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod3-daily-euphrates-trigger' triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod2-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod2-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod2-daily-danube-trigger' - triggers: - - timed: '' -#----------------------------------------------- -# ZTE POD3 Triggers running against danube branch -#----------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-danube-trigger' - triggers: - - timed: '0 18 * * *' -- trigger: - name: 'fuel-os-odl_l2-nofeature-ha-zte-pod3-daily-danube-trigger' - triggers: - - timed: '' + - timed: '' +# ----------------------------------------------- +# ZTE POD1 Triggers running against danube branch +# ----------------------------------------------- - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '0 2 * * *' + - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' # NOHA Scenarios - 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_l3-nofeature-noha-zte-pod3-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-odl-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod3-daily-danube-trigger' + name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-danube-trigger' triggers: - - timed: '' + - timed: '' diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 2fb5c71e4..e818d90a3 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-license-identifier: Apache-2.0 ############################################################################## -# Copyright (c) 2016 Ericsson AB and others. +# Copyright (c) 2017 Ericsson AB, Mirantis Inc., Enea Software 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 @@ -12,7 +12,7 @@ set -o pipefail export TERM="vt220" -if [[ "$BRANCH" != 'master' ]]; then +if [[ "$BRANCH" =~ 'danube' ]]; then # source the file so we get OPNFV vars source latest.properties @@ -20,75 +20,94 @@ if [[ "$BRANCH" != 'master' ]]; then echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" fi -if [[ "$JOB_NAME" =~ "merge" ]]; then - # set simplest scenario for virtual deploys to run for merges +# shellcheck disable=SC2153 +if [[ "${JOB_NAME}" =~ 'verify' ]]; then + # set simplest scenario for virtual deploys to run for verify DEPLOY_SCENARIO="os-nosdn-nofeature-ha" -elif [[ "$BRANCH" != 'master' ]]; then - # for none-merge deployments +elif [[ "${BRANCH}" =~ 'danube' ]]; then + # for Danube deployments (no artifact for current master or newer branches) # checkout the commit that was used for building the downloaded artifact # to make sure the ISO and deployment mechanism uses same versions - echo "Checking out $OPNFV_GIT_SHA1" - git checkout $OPNFV_GIT_SHA1 --quiet + echo "Checking out ${OPNFV_GIT_SHA1}" + git checkout "${OPNFV_GIT_SHA1}" --quiet fi # set deployment parameters -export TMPDIR=$HOME/tmpdir +export TMPDIR=${HOME}/tmpdir BRIDGE=${BRIDGE:-pxebr} +# shellcheck disable=SC2153 LAB_NAME=${NODE_NAME/-*} +# shellcheck disable=SC2153 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 +# Armband might override LAB_CONFIG_URL, all others use the default +LAB_CONFIG_URL=${LAB_CONFIG_URL:-'ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab'} + +# Fuel requires deploy script to be ran with sudo, Armband does not +SUDO='sudo -E' +if [ "${PROJECT}" = 'fuel' ]; then + # Fuel does not use any POD-specific configuration for virtual deploys + if [[ "${NODE_NAME}" =~ "virtual" ]]; then + POD_NAME="virtual_kvm" + fi + # Fuel currently supports ericsson, intel, lf and zte labs + if [[ ! "${LAB_NAME}" =~ (ericsson|intel|lf|zte) ]]; then + echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" + exit 1 + fi else - echo "Using configuration for $LAB_NAME" + SUDO= + # Armband currently supports arm, enea labs + if [[ ! "${LAB_NAME}" =~ (arm|enea) ]]; then + echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" + exit 1 + fi fi -# create TMPDIR if it doesn't exist -export TMPDIR=$HOME/tmpdir -mkdir -p $TMPDIR +echo "Using configuration for ${LAB_NAME}" -# change permissions down to TMPDIR -chmod a+x $HOME -chmod a+x $TMPDIR +# create TMPDIR if it doesn't exist, change permissions +mkdir -p "${TMPDIR}" +chmod a+x "${HOME}" "${TMPDIR}" -# clone the securedlab repo -cd $WORKSPACE -echo "Cloning securedlab repo $BRANCH" -git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet \ - --branch $BRANCH +cd "${WORKSPACE}" || exit 1 +if [[ "${LAB_CONFIG_URL}" =~ ^(git|ssh):// ]]; then + echo "Cloning securedlab repo ${BRANCH}" + LOCAL_CFG="${TMPDIR}/securedlab" + rm -rf "${LOCAL_CFG}" + git clone --quiet --branch "${BRANCH}" "${LAB_CONFIG_URL}" "${LOCAL_CFG}" + LAB_CONFIG_URL="file://${LOCAL_CFG}" +fi + +# releng wants us to use nothing else but opnfv.iso for now. We comply. +ISO_FILE=file://${WORKSPACE}/opnfv.iso # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" # construct the command -DEPLOY_COMMAND="sudo $WORKSPACE/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" +DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh -b ${LAB_CONFIG_URL} \ + -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} -i ${ISO_FILE} \ + -B ${DEFAULT_BRIDGE:-${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" -[[ "$BRANCH" != 'master' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" +echo "Scenario: ${DEPLOY_SCENARIO}" +echo "Lab: ${LAB_NAME}" +echo "POD: ${POD_NAME}" +[[ "${BRANCH}" =~ 'danube' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" echo -echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..." +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}" echo -$DEPLOY_COMMAND +${DEPLOY_COMMAND} exit_code=$? echo @@ -96,17 +115,18 @@ echo "--------------------------------------------------------" echo "Deployment is done!" # upload logs for baremetal deployments -# work with virtual deployments is still going on so we skip that for the timebeing -if [[ "$JOB_NAME" =~ (baremetal-daily|baremetal-weekly) ]]; then +# work with virtual deployments is still going on, so skip that for now +if [[ "${JOB_NAME}" =~ (baremetal-daily|baremetal-weekly) ]]; then echo "Uploading deployment logs" - gsutil cp $WORKSPACE/$FUEL_LOG_FILENAME gs://$GS_URL/logs/$FUEL_LOG_FILENAME > /dev/null 2>&1 - echo "Logs are available as http://$GS_URL/logs/$FUEL_LOG_FILENAME" + gsutil cp "${WORKSPACE}/${FUEL_LOG_FILENAME}" \ + "gs://${GS_URL}/logs/${FUEL_LOG_FILENAME}" > /dev/null 2>&1 + echo "Logs are available at http://${GS_URL}/logs/${FUEL_LOG_FILENAME}" fi -if [[ $exit_code -ne 0 ]]; then +if [[ "${exit_code}" -ne 0 ]]; then echo "Deployment failed!" - exit $exit_code -else - echo "Deployment is successful!" - exit 0 + exit "${exit_code}" fi + +echo "Deployment is successful!" +exit 0 diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh index c3b8253de..02ca10305 100755 --- a/jjb/fuel/fuel-download-artifact.sh +++ b/jjb/fuel/fuel-download-artifact.sh @@ -11,20 +11,14 @@ set -o errexit set -o pipefail # disable Fuel ISO download for master branch -[[ "$BRANCH" == 'master' ]] && exit 0 +[[ ! "$BRANCH" =~ (danube) ]] && exit 0 -# use proxy url to replace the nomral URL, for googleusercontent.com will be blocked randomly +# use proxy url to replace the normal URL, or googleusercontent.com will be blocked randomly [[ "$NODE_NAME" =~ (zte) ]] && GS_URL=${GS_BASE_PROXY%%/*}/$GS_URL -if [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties" - # get the properties file for the Fuel ISO built for a merged change - curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties -else - # get the latest.properties file in order to get info regarding latest artifact - echo "Downloading http://$GS_URL/latest.properties" - curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties -fi +# get the latest.properties file in order to get info regarding latest artifact +echo "Downloading http://$GS_URL/latest.properties" +curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties # check if we got the file [[ -f $WORKSPACE/latest.properties ]] || exit 1 @@ -36,21 +30,18 @@ source $WORKSPACE/latest.properties OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/} 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/${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 - echo "--------------------------------------------------------" - echo - ls -al $WORKSPACE/opnfv.iso - echo - echo "--------------------------------------------------------" - echo "Done!" - exit 0 - fi +# check if we already have the ISO to avoid redownload +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 + echo "--------------------------------------------------------" + echo + ls -al $WORKSPACE/opnfv.iso + echo + echo "--------------------------------------------------------" + echo "Done!" + exit 0 fi [[ "$NODE_NAME" =~ (zte) ]] && OPNFV_ARTIFACT_URL=${GS_BASE_PROXY%%/*}/$OPNFV_ARTIFACT_URL diff --git a/jjb/fuel/fuel-logs.sh b/jjb/fuel/fuel-logs.sh new file mode 100755 index 000000000..a7d852685 --- /dev/null +++ b/jjb/fuel/fuel-logs.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 Ericsson AB, Mirantis Inc., Enea Software 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 + +# Fuel requires deploy script to be ran with sudo, Armband does not +SUDO='sudo -E' +[ "${PROJECT}" = 'fuel' ] || SUDO= + +# Log file name +FUEL_PM_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}_pm.log.tar.gz" + +# Construct the command +LOG_COMMAND="${SUDO} ${WORKSPACE}/mcp/scripts/log.sh \ + ${WORKSPACE}/${FUEL_PM_LOG_FILENAME}" + +# Log info to console +echo "Collecting post mortem logs ..." +echo "--------------------------------------------------------" +echo "${LOG_COMMAND}" + +${LOG_COMMAND} + +# Upload logs for both baremetal and virtual deployments +echo "Uploading deployment logs" +echo "--------------------------------------------------------" +gsutil cp "${WORKSPACE}/${FUEL_PM_LOG_FILENAME}" \ + "gs://${GS_URL}/logs/${FUEL_PM_LOG_FILENAME}" > /dev/null 2>&1 +echo "Logs are available at http://${GS_URL}/logs/${FUEL_PM_LOG_FILENAME}" diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index 1f0ddd363..9e890cde7 100644 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -1,3 +1,4 @@ +--- ######################## # Job configuration for fuel ######################## @@ -9,210 +10,22 @@ installer: 'fuel' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false jobs: - - 'fuel-build-daily-{stream}' - - 'fuel-merge-build-{stream}' - - 'fuel-merge-deploy-virtual-{stream}' - - 'fuel-deploy-generic-daily-{stream}' + - 'fuel-deploy-generic-daily-{stream}' ######################## # job templates ######################## - job-template: - name: 'fuel-build-daily-{stream}' - - disabled: '{obj:disabled}' - - concurrent: false - - 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' - - '{installer}-defaults' - - choice: - name: FORCE_BUILD - choices: - - 'false' - - 'true' - description: "Force build even if there is no changes in fuel repo. Default false" - - fuel-project-parameter: - gs-pathname: '{gs-pathname}' - - scm: - - git-scm - - triggers: - - timed: '0 H/4 * * *' - - wrappers: - - timeout: - timeout: 360 - fail: true - - builders: - - shell: - !include-raw-escape: ./fuel-build.sh - - shell: - !include-raw-escape: ./fuel-upload-artifact.sh - - shell: - !include-raw-escape: ./fuel-workspace-cleanup.sh - - publishers: - - email: - recipients: fzhadaev@mirantis.com - -- job-template: - name: 'fuel-merge-build-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - '{installer}-defaults' - - fuel-project-parameter: - gs-pathname: '{gs-pathname}' - - 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: 'ci/**' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'deploy/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - - builders: - - shell: - !include-raw-escape: ./fuel-build.sh - - shell: - !include-raw-escape: ./fuel-upload-artifact.sh - - shell: - !include-raw-escape: ./fuel-workspace-cleanup.sh - -- job-template: - name: 'fuel-merge-deploy-virtual-{stream}' - - disabled: true - - concurrent: true - - properties: - - logrotate-default - - throttle: - enabled: true - max-total: 2 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-virtual-daily-.*' - - 'fuel-merge-deploy-virtual-.*' - block-level: 'NODE' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'fuel-virtual-defaults': - installer: '{installer}' - - '{installer}-defaults' - - fuel-project-parameter: - gs-pathname: '{gs-pathname}' - scm: - - git-scm - - wrappers: - - ssh-agent-wrapper - - 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: 'ci/**' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'deploy/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - dependency-jobs: 'fuel-merge-build-{stream}' - - builders: - - shell: - !include-raw-escape: ./fuel-download-artifact.sh - - shell: - !include-raw-escape: ./fuel-deploy.sh - - shell: - !include-raw-escape: ./fuel-workspace-cleanup.sh - - publishers: - - email: - recipients: fzhadaev@mirantis.com - -- job-template: name: 'fuel-deploy-generic-daily-{stream}' concurrent: true @@ -220,70 +33,48 @@ disabled: '{obj:disabled}' properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-daily-.*' - - 'fuel-deploy-generic-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-daily-.*' + - 'fuel-deploy-generic-daily-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-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-odl_l2-nofeature-ha' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - ericsson-pod2 - - lf-pod2 - - ericsson-pod1 - default-slaves: - - ericsson-pod2 - - fuel-project-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - 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-odl-nofeature-ha' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ericsson-pod2 + - lf-pod2 + - ericsson-pod1 + default-slaves: + - ericsson-pod2 scm: - - git-scm + - git-scm wrappers: - - build-name: - name: '$BUILD_NUMBER - POD: $NODE_NAME Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - POD: $NODE_NAME Scenario: $DEPLOY_SCENARIO' builders: - - shell: - !include-raw-escape: ./fuel-download-artifact.sh - - shell: - !include-raw-escape: ./fuel-deploy.sh - -######################## -# parameter macros -######################## -- parameter: - name: fuel-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." + - shell: + !include-raw-escape: ./fuel-deploy.sh diff --git a/jjb/fuel/fuel-upload-artifact.sh b/jjb/fuel/fuel-upload-artifact.sh deleted file mode 100755 index d1ac3509b..000000000 --- a/jjb/fuel/fuel-upload-artifact.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o pipefail - -# check if we built something -if [ -f $WORKSPACE/.noupload ]; then - echo "Nothing new to upload. Exiting." - /bin/rm -f $WORKSPACE/.noupload - exit 0 -fi - -# source the opnfv.properties to get ARTIFACT_VERSION -source $WORKSPACE/opnfv.properties - -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/${BRANCH##*/}" - if [[ -d "$ISOSTORE" ]]; then - # remove all but most recent 5 ISOs first to keep iso_mount clean & tidy - cd $ISOSTORE - ls -tp | grep -v '/' | tail -n +6 | xargs -d '\n' /bin/rm -f -- - - # store ISO - echo "Storing $INSTALLER_TYPE artifact on NFS..." - /bin/cp -f $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ - $ISOSTORE/opnfv-$OPNFV_ARTIFACT_VERSION.iso - fi -fi -} - -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 -} - -signiso () { -gpg2 -vvv --batch --yes --no-tty \ - --default-key opnfv-helpdesk@rt.linuxfoundation.org \ - --passphrase besteffort \ - --detach-sig $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso - -gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig -echo "ISO signature Upload Complete!" -} - -uploadiso () { -# log info to console -echo "Uploading $INSTALLER_TYPE artifact. This could take some time..." -echo - -cd $WORKSPACE -# upload artifact and additional files to google storage -gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 -gsutil cp $WORKSPACE/opnfv.properties \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 -if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then - gsutil cp $WORKSPACE/opnfv.properties \ - gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 -elif [[ "$JOB_NAME" =~ "merge" ]]; then - echo "Uploaded Fuel ISO for a merged change" -fi - -gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://$GS_URL/latest.properties \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1 - -gsutil -m setmeta \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /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 gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 -if [[ $? -ne 0 ]]; then - echo "Problem while uploading artifact!" - echo "Check log $WORKSPACE/gsutil.iso.log on the machine where this build is done." - exit 1 -fi - -echo "Done!" -echo -echo "--------------------------------------------------------" -echo -echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" -echo -echo "--------------------------------------------------------" -echo -} - -nfsstore - -if [[ "$JOB_NAME" =~ merge ]]; then - uploadiso -elif [[ "$JOB_NAME" =~ build ]]; then - importkey - signiso - uploadiso -fi - diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml index 549f7dafa..8026c19af 100644 --- a/jjb/fuel/fuel-verify-jobs.yml +++ b/jjb/fuel/fuel-verify-jobs.yml @@ -1,39 +1,38 @@ +--- - project: name: 'fuel-verify-jobs' project: 'fuel' installer: 'fuel' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + ##################################### + # patch verification phases + ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-ubuntu' - - 'build': - slave-label: 'opnfv-build-ubuntu' - - 'deploy-virtual': - slave-label: 'opnfv-build-ubuntu' - - 'smoke-test': - slave-label: 'opnfv-build-ubuntu' -##################################### -# jobs -##################################### + - 'basic': + slave-label: 'fuel-virtual' + - 'deploy-virtual': + slave-label: 'fuel-virtual' + - 'smoke-test': + slave-label: 'fuel-virtual' + ##################################### + # jobs + ##################################### jobs: - - 'fuel-verify-{stream}' - - 'fuel-verify-{phase}-{stream}' + - 'fuel-verify-{stream}' + - 'fuel-verify-{phase}-{stream}' ##################################### # job templates ##################################### @@ -47,120 +46,110 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-virtual-daily-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + 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: 'ci/**' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'deploy/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - readable-message: true + - 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: 'ci/**' + - compare-type: ANT + pattern: 'mcp/**' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - 'fuel-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'fuel-virtual-defaults': + installer: '{installer}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-basic-{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: build - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-build-{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-virtual - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-deploy-virtual-{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: smoke-test - condition: SUCCESSFUL - projects: - - name: 'fuel-verify-smoke-test-{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 + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'fuel-verify-basic-{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-virtual + condition: SUCCESSFUL + projects: + - name: 'fuel-verify-deploy-virtual-{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: smoke-test + condition: SUCCESSFUL + projects: + - name: 'fuel-verify-smoke-test-{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 - job-template: name: 'fuel-verify-{phase}-{stream}' @@ -170,88 +159,63 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 6 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-verify-deploy-.*' - - 'fuel-verify-test-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 2 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-verify-deploy-.*' + - 'fuel-verify-test-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - '{installer}-defaults' - - 'fuel-verify-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + - 'fuel-virtual-defaults': + installer: '{installer}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' ##################################### # builder macros ##################################### - builder: name: 'fuel-verify-basic-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" - -- builder: - name: 'fuel-verify-build-macro' - builders: - - shell: - !include-raw: ./fuel-build.sh - - shell: - !include-raw: ./fuel-workspace-cleanup.sh + echo "Not activated!" - builder: name: 'fuel-verify-deploy-virtual-macro' builders: - - shell: | - #!/bin/bash - - echo "Not activated!" + - shell: + !include-raw: ./fuel-deploy.sh - builder: name: 'fuel-verify-smoke-test-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" -##################################### -# parameter macros -##################################### -- parameter: - name: 'fuel-verify-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." + echo "Not activated!" diff --git a/jjb/fuel/fuel-weekly-jobs.yml b/jjb/fuel/fuel-weekly-jobs.yml index bd42ed85c..2544e9210 100644 --- a/jjb/fuel/fuel-weekly-jobs.yml +++ b/jjb/fuel/fuel-weekly-jobs.yml @@ -1,3 +1,4 @@ +--- # jenkins job templates for Fuel - project: @@ -7,48 +8,48 @@ installer: fuel -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - disabled: false - gs-pathname: '' - danube: &danube - stream: danube - branch: 'stable/{stream}' - disabled: false - gs-pathname: '/{stream}' -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# CI PODs -#-------------------------------- + stream: master + branch: '{stream}' + disabled: false + gs-pathname: '' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- + # CI PODs + # ------------------------------- pod: - - baremetal: - slave-label: fuel-baremetal - <<: *master - - virtual: - slave-label: fuel-virtual - <<: *master - - baremetal: - slave-label: fuel-baremetal - <<: *danube - - virtual: - slave-label: fuel-virtual - <<: *danube -#-------------------------------- -# scenarios -#-------------------------------- + - baremetal: + slave-label: fuel-baremetal + <<: *master + - virtual: + slave-label: fuel-virtual + <<: *master + - baremetal: + slave-label: fuel-baremetal + <<: *euphrates + - virtual: + slave-label: fuel-virtual + <<: *euphrates + # ------------------------------- + # scenarios + # ------------------------------- scenario: - # HA scenarios - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'weekly-trigger-disabled' + # HA scenarios + - 'os-nosdn-nofeature-ha': + auto-trigger-name: 'weekly-trigger-disabled' jobs: - - 'fuel-{scenario}-{pod}-weekly-{stream}' - - 'fuel-deploy-{pod}-weekly-{stream}' + - 'fuel-{scenario}-{pod}-weekly-{stream}' + - 'fuel-deploy-{pod}-weekly-{stream}' ######################## # job templates @@ -61,64 +62,65 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-{pod}-daily-.*' - - 'fuel-os-.*?-{pod}-weekly-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-{pod}-daily-.*' + - 'fuel-os-.*?-{pod}-weekly-.*' + - 'fuel-verify-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - fuel-weekly-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' builders: - - description-setter: - description: "Built on $NODE_NAME" - - trigger-builds: - - project: 'fuel-deploy-{pod}-weekly-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-fuel-{pod}-weekly-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - description-setter: + description: "Built on $NODE_NAME" + - trigger-builds: + - project: 'fuel-deploy-{pod}-weekly-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-fuel-{pod}-weekly-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' publishers: - - email: - recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email: + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email-jenkins-admins-on-failure - job-template: name: 'fuel-deploy-{pod}-weekly-{stream}' @@ -128,83 +130,63 @@ 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: - - 'fuel-deploy-{pod}-daily-.*' - - 'fuel-deploy-generic-daily-.*' - - 'fuel-deploy-{pod}-weekly-.*' - - 'fuel-deploy-generic-weekly-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-deploy-{pod}-daily-.*' + - 'fuel-deploy-generic-daily-.*' + - 'fuel-deploy-{pod}-weekly-.*' + - 'fuel-deploy-generic-weekly-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - fuel-weekly-parameter: - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_TIMEOUT - default: '150' - description: 'Deployment timeout in minutes' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults': + gs-pathname: '{gs-pathname}' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl-nofeature-ha' + - string: + name: DEPLOY_TIMEOUT + default: '150' + description: 'Deployment timeout in minutes' scm: - - git-scm + - git-scm wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' builders: - - description-setter: - description: "Built on $NODE_NAME" - - shell: - !include-raw-escape: ./fuel-download-artifact.sh - - shell: - !include-raw-escape: ./fuel-deploy.sh + - description-setter: + description: "Built on $NODE_NAME" + - shell: + !include-raw-escape: ./fuel-deploy.sh publishers: - - email: - recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email: + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com + - email-jenkins-admins-on-failure ######################## -# parameter macros -######################## -- parameter: - name: fuel-weekly-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." -######################## # trigger macros ######################## -#----------------------------------------------- +# ---------------------------------------------- # Triggers for job running on fuel-baremetal against master branch -#----------------------------------------------- +# ---------------------------------------------- # HA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-ha-baremetal-weekly-master-trigger' triggers: - - timed: '' + - timed: '' diff --git a/jjb/fuel/fuel-workspace-cleanup.sh b/jjb/fuel/fuel-workspace-cleanup.sh deleted file mode 100755 index d8948c7a0..000000000 --- a/jjb/fuel/fuel-workspace-cleanup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# delete the $WORKSPACE to open some space -/bin/rm -rf $WORKSPACE diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 512a01edc..f5f39b8ff 100644..100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -4,18 +4,85 @@ set -e set +u set +o pipefail +run_tiers() { + tiers=$1 + cmd_opt="prepare_env start && run_tests -r -t all" + [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all" + ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" + echo 0 > ${ret_val_file} + + for tier in ${tiers[@]}; do + FUNCTEST_IMAGE=opnfv/functest-${tier}:${DOCKER_TAG} + echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." + docker pull ${FUNCTEST_IMAGE}>/dev/null + cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + echo "Running Functest tier '${tier}'. CMD: ${cmd}" + eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + if [ ${tier} == 'healthcheck' ]; then + echo "Healthcheck tier failed. Exiting Functest..." + break + fi + fi + done +} + +run_test() { + test_name=$1 + cmd_opt="prepare_env start && run_tests -r -t ${test_name}" + [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t ${test_name}" + ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" + echo 0 > ${ret_val_file} + # Determine which Functest image should be used for the test case + case ${test_name} in + connection_check|api_check|snaps_health_check) + FUNCTEST_IMAGE=opnfv/functest-healthcheck:${DOCKER_TAG} ;; + vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|fds|snaps_smoke) + FUNCTEST_IMAGE=opnfv/functest-smoke:${DOCKER_TAG} ;; + tempest_full_parallel|tempest_custom|rally_full) + FUNCTEST_IMAGE=opnfv/functest-components:${DOCKER_TAG} ;; + cloudify_ims|orchestra_openims|orchestra_clearwaterims|vyos_vrouter) + FUNCTEST_IMAGE=opnfv/functest-vnf:${DOCKER_TAG} ;; + promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd) + FUNCTEST_IMAGE=opnfv/functest-features:${DOCKER_TAG} ;; + parser-basics) + FUNCTEST_IMAGE=opnfv/functest-parser:${DOCKER_TAG} ;; + *) + echo "Unkown test case $test_name" + exit 1 + ;; + esac + echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." + docker pull ${FUNCTEST_IMAGE}>/dev/null + cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + echo "Running Functest test case '${test_name}'. CMD: ${cmd}" + eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + fi +} + + [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" FUNCTEST_DIR=/home/opnfv/functest +DEPLOY_TYPE=baremetal +[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt +HOST_ARCH=$(uname -m) +DOCKER_TAG=${DOCKER_TAG:-latest} # Prepare OpenStack credentials volume +rc_file=${HOME}/opnfv-openrc.sh + if [[ ${INSTALLER_TYPE} == 'joid' ]]; then rc_file=$LAB_CONFIG/admin-openrc -elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then +elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:${FUNCTEST_DIR}/conf/os_cacert" echo "export OS_CACERT=${FUNCTEST_DIR}/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh - rc_file=${HOME}/opnfv-openrc.sh -else - rc_file=${HOME}/opnfv-openrc.sh +elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" fi rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds" @@ -25,10 +92,6 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR sudo iptables -I FORWARD -j RETURN fi -DEPLOY_TYPE=baremetal -[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt -HOST_ARCH=$(uname -m) - echo "Functest: Start Docker and prepare environment" echo "Functest: Download images that will be used by test cases" @@ -54,25 +117,36 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ -e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" -if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-ha'* ]]; then - ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - openo_msb_port=${openo_msb_port:-80} - openo_msb_endpoint="$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ - 'mysql -ucompass -pcompass -Dcompass -e "select package_config from cluster;" \ - | sed s/,/\\n/g | grep openo_ip | cut -d \" -f 4'):$openo_msb_port" - - envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}" -fi +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol}" +if [ "${INSTALLER_TYPE}" == 'fuel' ]; then + COMPUTE_ARCH=$(ssh -l ubuntu ${INSTALLER_IP} -i ${SSH_KEY} ${ssh_options} \ + "sudo salt 'cmp*' grains.get cpuarch --out yaml | awk '{print \$2; exit}'") + envs="${envs} -e POD_ARCH=${COMPUTE_ARCH}" +fi -tiers=(healthcheck smoke) -for tier in ${tiers[@]}; do - FUNCTEST_IMAGE=opnfv/functest-${tier} - echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." - docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run ${envs} ${volumes} ${FUNCTEST_IMAGE}" - echo "Running Functest tier '${tier}'. CMD: ${cmd}" - ${cmd} -done +volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol} ${cacert_file_vol}" + +set +e + + +if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then + if [ ${FUNCTEST_MODE} == 'testcase' ]; then + echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}" + run_test ${FUNCTEST_SUITE_NAME} + elif [ ${FUNCTEST_MODE} == 'tier' ]; then + echo "FUNCTEST_MODE=tier, FUNCTEST_TIER=${FUNCTEST_TIER}" + tiers=(${FUNCTEST_TIER}) + run_tiers ${tiers} + else + if [ ${DEPLOY_TYPE} == 'baremetal' ]; then + tiers=(healthcheck smoke features vnf parser) + else + tiers=(healthcheck smoke features) + fi + run_tiers ${tiers} + fi +else + echo "k8 deployment has not been supported by functest yet" +fi diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index cc9bac0a9..bddb2777b 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -1,3 +1,4 @@ +--- ################################### # job configuration for functest ################################### @@ -6,224 +7,210 @@ project: functest -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' - danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - docker-tag: 'stable' -#-------------------------------- -# 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 -#-------------------------------- + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + docker-tag: 'stable' + # ------------------------------- + # 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: -# fuel CI PODs - - baremetal: - slave-label: fuel-baremetal - installer: fuel - <<: *master - - virtual: - slave-label: fuel-virtual - installer: fuel - <<: *master - - baremetal: - slave-label: fuel-baremetal - installer: fuel - <<: *danube - - virtual: - slave-label: fuel-virtual - installer: fuel - <<: *danube -# joid CI PODs - - baremetal: - slave-label: joid-baremetal - installer: joid - <<: *master - - virtual: - slave-label: joid-virtual - installer: joid - <<: *master - - baremetal: - slave-label: joid-baremetal - installer: joid - <<: *danube - - virtual: - slave-label: joid-virtual - installer: joid - <<: *danube -# compass CI PODs - - baremetal: - slave-label: compass-baremetal - installer: compass - <<: *master - - virtual: - slave-label: compass-virtual - installer: compass - <<: *master - - baremetal: - slave-label: compass-baremetal - installer: compass - <<: *danube - - virtual: - slave-label: compass-virtual - installer: compass - <<: *danube -# apex CI PODs - - virtual: - slave-label: apex-virtual-master - installer: apex - <<: *master - - baremetal: - slave-label: apex-baremetal-master - installer: apex - <<: *master - - virtual: - slave-label: apex-virtual-danube - installer: apex - <<: *danube - - baremetal: - slave-label: apex-baremetal-danube - installer: apex - <<: *danube -# armband CI PODs - - armband-baremetal: - slave-label: armband-baremetal - installer: fuel - <<: *master - - armband-virtual: - slave-label: armband-virtual - installer: fuel - <<: *master - - armband-baremetal: - slave-label: armband-baremetal - installer: fuel - <<: *danube - - armband-virtual: - slave-label: armband-virtual - installer: fuel - <<: *danube -# daisy CI PODs - - baremetal: - slave-label: daisy-baremetal - installer: daisy - <<: *master - - virtual: - slave-label: daisy-virtual - installer: daisy - <<: *master -# netvirt 3rd party ci - - virtual: - slave-label: odl-netvirt-virtual - installer: netvirt - <<: *master -#-------------------------------- -# None-CI PODs -#-------------------------------- - - orange-pod1: - slave-label: '{pod}' - installer: joid - <<: *master - - orange-pod5: - slave-label: '{pod}' - installer: fuel - <<: *master - - orange-pod2: - slave-label: '{pod}' - installer: joid - <<: *master - - baremetal-centos: - slave-label: 'intel-pod8' - installer: compass - <<: *master - - nokia-pod1: - slave-label: '{pod}' - installer: apex - <<: *master - - arm-pod2: - slave-label: '{pod}' - installer: fuel - <<: *master - - arm-pod3: - slave-label: '{pod}' - installer: fuel - <<: *master - - arm-pod4: - slave-label: '{pod}' - installer: fuel - <<: *master - - arm-virtual1: - slave-label: '{pod}' - installer: fuel - <<: *master - - zte-pod1: - slave-label: '{pod}' - installer: fuel - <<: *master - - zte-pod1: - slave-label: '{pod}' - installer: fuel - <<: *danube - - zte-pod2: - slave-label: '{pod}' - installer: fuel - <<: *master - - zte-pod3: - slave-label: '{pod}' - installer: fuel - <<: *master - - zte-pod3: - slave-label: '{pod}' - installer: fuel - <<: *danube - - arm-pod2: - slave-label: '{pod}' - installer: fuel - <<: *danube - - arm-pod3: - slave-label: '{pod}' - installer: fuel - <<: *danube - - arm-pod4: - slave-label: '{pod}' - installer: fuel - <<: *danube - - arm-virtual1: - slave-label: '{pod}' - installer: fuel - <<: *danube -# PODs for verify jobs triggered by each patch upload -# - ool-virtual1: -# slave-label: '{pod}' -# installer: apex -# <<: *master -#-------------------------------- + # fuel CI PODs + - baremetal: + slave-label: fuel-baremetal + installer: fuel + <<: *master + - virtual: + slave-label: fuel-virtual + installer: fuel + <<: *master + - baremetal: + slave-label: fuel-baremetal + installer: fuel + <<: *euphrates + - virtual: + slave-label: fuel-virtual + installer: fuel + <<: *euphrates + # joid CI PODs + - baremetal: + slave-label: joid-baremetal + installer: joid + <<: *master + - virtual: + slave-label: joid-virtual + installer: joid + <<: *master + - baremetal: + slave-label: joid-baremetal + installer: joid + <<: *euphrates + - virtual: + slave-label: joid-virtual + installer: joid + <<: *euphrates + # compass CI PODs + - baremetal: + slave-label: compass-baremetal + installer: compass + <<: *master + - virtual: + slave-label: compass-virtual + installer: compass + <<: *master + - baremetal: + slave-label: compass-baremetal + installer: compass + <<: *euphrates + - virtual: + slave-label: compass-virtual + installer: compass + <<: *euphrates + # apex CI PODs + - virtual: + slave-label: apex-virtual-master + installer: apex + <<: *master + - baremetal: + slave-label: apex-baremetal-master + installer: apex + <<: *master + - virtual: + slave-label: apex-virtual-euphrates + installer: apex + <<: *euphrates + - baremetal: + slave-label: apex-baremetal-euphrates + installer: apex + <<: *euphrates + # armband CI PODs + - armband-baremetal: + slave-label: armband-baremetal + installer: fuel + <<: *master + - armband-virtual: + slave-label: armband-virtual + installer: fuel + <<: *master + - armband-baremetal: + slave-label: armband-baremetal + installer: fuel + <<: *euphrates + - armband-virtual: + slave-label: armband-virtual + installer: fuel + <<: *euphrates + # daisy CI PODs + - baremetal: + slave-label: daisy-baremetal + installer: daisy + <<: *master + - virtual: + slave-label: daisy-virtual + installer: daisy + <<: *master + - baremetal: + slave-label: daisy-baremetal + installer: daisy + <<: *euphrates + - virtual: + slave-label: daisy-virtual + installer: daisy + <<: *euphrates + # netvirt 3rd party ci + - virtual: + slave-label: odl-netvirt-virtual + installer: netvirt + <<: *master + # ------------------------------- + # None-CI PODs + # ------------------------------- + - orange-pod1: + slave-label: '{pod}' + installer: joid + <<: *master + - orange-pod5: + slave-label: '{pod}' + installer: fuel + <<: *master + - orange-pod2: + slave-label: '{pod}' + installer: joid + <<: *master + - baremetal-centos: + slave-label: 'intel-pod8' + installer: compass + <<: *master + - nokia-pod1: + slave-label: '{pod}' + installer: apex + <<: *master + - zte-pod1: + slave-label: '{pod}' + installer: fuel + <<: *master + - zte-pod1: + slave-label: '{pod}' + installer: fuel + <<: *euphrates + - zte-pod2: + slave-label: '{pod}' + installer: daisy + <<: *master + - zte-pod2: + slave-label: '{pod}' + installer: daisy + <<: *euphrates + - zte-pod3: + slave-label: '{pod}' + installer: daisy + <<: *master + - zte-pod3: + slave-label: '{pod}' + installer: daisy + <<: *euphrates + # PODs for verify jobs triggered by each patch upload + # - ool-virtual1: + # slave-label: '{pod}' + # installer: apex + # <<: *master + # ------------------------------- alpine-pod: - - ericsson-virtual-pod1bl01: - slave-label: '{alpine-pod}' - installer: fuel - <<: *master + - ericsson-virtual-pod1bl01: + slave-label: '{alpine-pod}' + installer: fuel + <<: *master + - huawei-virtual5: + slave-label: '{alpine-pod}' + installer: compass + <<: *master testsuite: - - 'suite': - job-timeout: 60 - - 'daily': - job-timeout: 240 + - 'suite': + job-timeout: 60 + - 'daily': + job-timeout: 240 + - 'arm-daily': + job-timeout: 240 jobs: - - 'functest-{installer}-{pod}-{testsuite}-{stream}' - - 'functest-alpine-{installer}-{alpine-pod}-{testsuite}-{stream}' + - 'functest-{installer}-{pod}-{testsuite}-{stream}' + - 'functest-alpine-{installer}-{alpine-pod}-{testsuite}-{stream}' ################################ # job template @@ -234,47 +221,47 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: '{job-timeout}' - abort: true + - build-name: + name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: '{job-timeout}' + abort: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - 'functest-{testsuite}-parameter' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: - name: CLEAN_DOCKER_IMAGES - default: 'false' - description: 'Remove downloaded docker images (opnfv/functest*:*)' - - functest-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - 'functest-{testsuite}-parameter' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + - string: + name: CLEAN_DOCKER_IMAGES + default: 'false' + description: 'Remove downloaded docker images (opnfv/functest*:*)' + - functest-parameter: + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-{testsuite}-builder' + - description-setter: + description: "Built on $NODE_NAME" + - 'functest-{testsuite}-builder' - job-template: name: 'functest-alpine-{installer}-{alpine-pod}-{testsuite}-{stream}' @@ -282,39 +269,39 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: '{job-timeout}' - abort: true + - build-name: + name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: '{job-timeout}' + abort: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - 'functest-{testsuite}-parameter' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - functest-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - 'functest-{testsuite}-parameter' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-noha' + - functest-parameter: + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-alpine-daily-builder' + - description-setter: + description: "Built on $NODE_NAME" + - 'functest-alpine-daily-builder' ######################## # parameter macros @@ -322,135 +309,199 @@ - parameter: name: functest-daily-parameter parameters: - - string: - name: FUNCTEST_SUITE_NAME - default: 'daily' - description: "Daily suite name to run" + - string: + name: FUNCTEST_MODE + default: 'daily' + description: "Daily suite name to run" + +- parameter: + name: functest-arm-daily-parameter + parameters: + - string: + name: FUNCTEST_MODE + default: 'arm-daily' + description: "Daily suite name (Aarch64) to run" + - parameter: name: functest-suite-parameter parameters: - - choice: - name: FUNCTEST_SUITE_NAME - choices: - - 'healthcheck' - - 'vping_userdata' - - 'vping_ssh' - - 'tempest_smoke_serial' - - 'rally_sanity' - - 'odl' - - 'odl_netvirt' - - 'onos' - - 'promise' - - 'doctor' - - 'bgpvpn' - - 'security_scan' - - 'tempest_full_parallel' - - 'rally_full' - - 'vims' - - 'multisite' - - 'parser' - - 'opera_vims' - - string: - name: TESTCASE_OPTIONS - default: '' - description: 'Additional parameters specific to test case(s)' + - choice: + name: FUNCTEST_MODE + choices: + - 'tier' + - 'testcase' + default: 'tier' + description: "Test case or Tier to be run" + - choice: + name: FUNCTEST_SUITE_NAME + choices: + - 'connection_check' + - 'api_check' + - 'snaps_health_check' + - 'vping_userdata' + - 'vping_ssh' + - 'tempest_smoke_serial' + - 'rally_sanity' + - 'odl' + - 'odl_netvirt' + - 'snaps_smoke' + - 'refstack_defcore' + - 'promise' + - 'doctor' + - 'bgpvpn' + - 'parser' + - 'security_scan' + - 'tempest_full_parallel' + - 'rally_full' + - 'cloudify_ims' + - 'cloudify_vrouter' + - 'orchestra_openims' + - 'orchestra_clearwaterims' + default: 'connection_check' + - choice: + name: FUNCTEST_TIER + choices: + - 'healthcheck' + - 'smoke' + - 'features' + - 'components' + - 'vnf' + default: 'healthcheck' + - string: + name: TESTCASE_OPTIONS + default: '' + description: 'Additional parameters specific to test case(s)' + - parameter: name: functest-parameter parameters: - - string: - name: GS_PATHNAME - default: '{gs-pathname}' - description: "Version directory where the opnfv documents will be stored in gs repository" - - string: - name: FUNCTEST_REPO_DIR - default: "/home/opnfv/repos/functest" - description: "Directory where the Functest repository is cloned" - - string: - name: PUSH_RESULTS_TO_DB - default: "true" - description: "Push the results of all the tests to the resultDB" - - string: - name: CI_DEBUG - default: 'false' - description: "Show debug output information" - - string: - name: RC_FILE_PATH - default: '' - description: "Path to the OS credentials file if given" + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where the opnfv documents will be stored in gs repository" + - string: + name: FUNCTEST_REPO_DIR + default: "/home/opnfv/repos/functest" + description: "Directory where the Functest repository is cloned" + - string: + name: PUSH_RESULTS_TO_DB + default: "true" + description: "Push the results of all the tests to the resultDB" + - string: + name: CI_DEBUG + default: 'false' + description: "Show debug output information" + - string: + name: RC_FILE_PATH + default: '' + description: "Path to the OS credentials file if given" ######################## # trigger macros ######################## - trigger: name: 'functest-master' triggers: - - pollscm: - cron: "H 9 * * *" + - pollscm: + cron: "H 9 * * *" ######################## # builder macros ######################## - builder: name: functest-daily-builder builders: - - 'functest-cleanup' - - 'set-functest-env' - - 'functest-daily' - - 'functest-store-results' - - 'functest-exit' + - 'functest-cleanup' + - 'functest-daily' + - 'functest-store-results' + - 'functest-exit' + +- builder: + name: functest-arm-daily-builder + builders: + - 'functest-cleanup' + - 'set-functest-env' + - 'functest-arm-daily' + - 'functest-store-results' + - 'functest-exit' - builder: name: functest-suite-builder builders: - - 'functest-cleanup' - - 'set-functest-env' - - 'functest-suite' - - 'functest-store-results' - - 'functest-exit' + - 'functest-cleanup' + - 'set-functest-env-alpine' + - 'functest-suite' + - 'functest-store-results' + - 'functest-exit' - builder: name: functest-alpine-daily-builder builders: - - shell: - !include-raw: - - ./functest-env-presetup.sh - - ../../utils/fetch_os_creds.sh - - ./functest-alpine.sh + - 'functest-cleanup' + - 'set-functest-env-alpine' + - 'functest-daily' + - 'functest-store-results' + - 'functest-exit' - builder: name: functest-daily builders: - - shell: - !include-raw: ./functest-loop.sh + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./functest-alpine.sh +# yamllint enable rule:indentation +- builder: + name: functest-arm-daily + builders: + - shell: + !include-raw: ./functest-loop.sh - builder: name: functest-suite builders: - - shell: - !include-raw: ./functest-suite.sh + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-alpine.sh +# yamllint enable rule:indentation - builder: name: set-functest-env builders: - - shell: - !include-raw: - - ./functest-env-presetup.sh - - ../../utils/fetch_os_creds.sh - - ./set-functest-env.sh + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./set-functest-env.sh + +# yamllint enable rule:indentation +- builder: + name: set-functest-env-alpine + builders: + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh +# yamllint enable rule:indentation - builder: name: functest-store-results builders: - - shell: - !include-raw: ../../utils/push-test-logs.sh + - shell: + !include-raw: ../../utils/push-test-logs.sh - builder: name: functest-cleanup builders: - - shell: - !include-raw: ./functest-cleanup.sh + - shell: + !include-raw: ./functest-cleanup.sh - builder: name: functest-exit builders: - - shell: - !include-raw: ./functest-exit.sh + - shell: + !include-raw: ./functest-exit.sh diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh index 00a5f135b..a590d9f95 100755 --- a/jjb/functest/functest-loop.sh +++ b/jjb/functest/functest-loop.sh @@ -2,11 +2,7 @@ set +e [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" -if [ "$BRANCH" == 'master' ]; then - cmd="run_tests -t all ${flags}" -else - cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" -fi +cmd="run_tests -t all ${flags}" container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml index 353423d59..e068a4fee 100644 --- a/jjb/functest/functest-project-jobs.yml +++ b/jjb/functest/functest-project-jobs.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,78 +9,119 @@ project: 'functest' jobs: - - 'functest-verify-{stream}' - - 'functest-docs-upload-{stream}' + - 'functest-verify-{stream}' + - 'functest-verify-{phase}-{stream}' + - 'functest-docs-upload-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: true + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + phase: + - 'unit-tests-and-docs': + slave-label: 'opnfv-build-ubuntu' + - 'build-x86_64': + slave-label: 'opnfv-build-ubuntu' + - 'build-aarch64': + slave-label: 'opnfv-build-ubuntu-arm' - job-template: name: 'functest-verify-{stream}' disabled: '{obj:disabled}' + project-type: 'multijob' + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 'functest-verify-triggers-macro': + project: '{project}' + branch: '{branch}' + + builders: + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'functest-build-and-unittest' + execution-type: PARALLEL + projects: + - name: 'functest-verify-unit-tests-and-docs-{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 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'functest-verify-build-x86_64-{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 + ARCH=x86_64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'functest-verify-build-aarch64-{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 + ARCH=aarch64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'functest-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 30 + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + + scm: + - git-scm-gerrit builders: - - functest-unit-tests-and-docs-build + - 'functest-verify-{phase}-builders-macro' publishers: - - junit: - results: nosetests.xml - - cobertura: - report-file: "coverage.xml" - only-stable: "true" - health-auto-update: "true" - stability-auto-update: "true" - zoom-coverage-chart: "true" - targets: - - files: - healthy: 10 - unhealthy: 20 - failing: 30 - - method: - healthy: 50 - unhealthy: 40 - failing: 30 + - 'functest-verify-{phase}-publishers-macro' - job-template: name: 'functest-docs-upload-{stream}' @@ -87,48 +129,129 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 'functest-docs-upload-triggers-macro': + project: '{project}' + branch: '{branch}' builders: - - functest-upload-doc-artifact + - functest-upload-doc-artifact ################################ +# job triggers +################################ +- trigger: + name: 'functest-verify-triggers-macro' + 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + +- trigger: + name: 'functest-docs-upload-triggers-macro' + 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' +################################ # job builders ################################ - builder: - name: functest-unit-tests-and-docs-build + name: 'functest-verify-unit-tests-and-docs-builders-macro' + builders: + - shell: | + cd $WORKSPACE && tox + +- builder: + name: 'functest-verify-build-x86_64-builders-macro' + builders: + - shell: | + echo "Not activated!" + +- builder: + name: 'functest-verify-build-aarch64-builders-macro' builders: - - shell: | - cd $WORKSPACE && tox + - shell: | + echo "Not activated!" - builder: - name: functest-upload-doc-artifact + name: 'functest-upload-doc-artifact' builders: - - shell: | - cd $WORKSPACE && tox -edocs - wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "functest/api/_build" "docs" + - shell: | + cd $WORKSPACE && tox -edocs + wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs" +################################ +# job publishers +################################ +- publisher: + name: 'functest-verify-unit-tests-and-docs-publishers-macro' + publishers: + - junit: + results: nosetests.xml + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "true" + stability-auto-update: "true" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 + - email-jenkins-admins-on-failure + +- publisher: + name: 'functest-verify-build-x86_64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure + +- publisher: + name: 'functest-verify-build-aarch64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index 9b7f1356c..469a57726 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -10,11 +10,7 @@ global_ret_val=0 tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n")) for test in ${tests[@]}; do - if [ "$BRANCH" == 'master' ]; then - cmd="run_tests -t $test" - else - cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test" - fi + cmd="run_tests -t $test" docker exec $container_id $cmd let global_ret_val+=$? done diff --git a/jjb/functest/functest-weekly-jobs.yml b/jjb/functest/functest-weekly-jobs.yml index 59d24cc87..6826e4151 100644 --- a/jjb/functest/functest-weekly-jobs.yml +++ b/jjb/functest/functest-weekly-jobs.yml @@ -1,3 +1,4 @@ +--- ################################### # job configuration for functest ################################### @@ -6,50 +7,50 @@ project: functest -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - docker-tag: 'latest' - disabled: false - danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - docker-tag: 'stable' - disabled: true -#-------------------------------- -# 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 -#-------------------------------- + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' + disabled: false + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + docker-tag: 'stable' + disabled: false + # ------------------------------- + # 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: -# fuel CI PODs - - baremetal: - slave-label: fuel-baremetal - installer: fuel - <<: *master - - virtual: - slave-label: fuel-virtual - installer: fuel - <<: *master - - baremetal: - slave-label: fuel-baremetal - installer: fuel - <<: *danube - - virtual: - slave-label: fuel-virtual - installer: fuel - <<: *danube -#-------------------------------- + # fuel CI PODs + - baremetal: + slave-label: fuel-baremetal + installer: fuel + <<: *master + - virtual: + slave-label: fuel-virtual + installer: fuel + <<: *master + - baremetal: + slave-label: fuel-baremetal + installer: fuel + <<: *euphrates + - virtual: + slave-label: fuel-virtual + installer: fuel + <<: *euphrates + # ------------------------------- jobs: - - 'functest-{installer}-{pod}-weekly-{stream}' + - 'functest-{installer}-{pod}-weekly-{stream}' ################################ # job template @@ -62,66 +63,68 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: '400' - abort: true + - build-name: + name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: '400' + abort: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - string: - name: FUNCTEST_SUITE_NAME - default: 'weekly' - description: "Weekly suite name to run" - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: - name: CLEAN_DOCKER_IMAGES - default: 'false' - description: 'Remove downloaded docker images (opnfv/functest*:*)' - - functest-parameter: - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - string: + name: FUNCTEST_SUITE_NAME + default: 'weekly' + description: "Weekly suite name to run" + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + - string: + name: CLEAN_DOCKER_IMAGES + default: 'false' + description: 'Remove downloaded docker images (opnfv/functest*:*)' + - functest-parameter: + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-weekly-builder' + - description-setter: + description: "Built on $NODE_NAME" + - 'functest-weekly-builder' ######################## # builder macros ######################## - builder: name: functest-weekly-builder builders: - - shell: - !include-raw: ./functest-cleanup.sh - - shell: - !include-raw: - - ./functest-env-presetup.sh - - ../../utils/fetch_os_creds.sh - - ./set-functest-env.sh - - shell: - !include-raw: ./functest-loop.sh - - shell: - !include-raw: ../../utils/push-test-logs.sh - - shell: - !include-raw: ./functest-exit.sh + - shell: + !include-raw: ./functest-cleanup.sh + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./set-functest-env.sh + # yamllint enable rule:indentation + - shell: + !include-raw: ./functest-loop.sh + - shell: + !include-raw: ../../utils/push-test-logs.sh + - shell: + !include-raw: ./functest-exit.sh diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index f6071e37a..b116a8528 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -6,15 +6,20 @@ set +o pipefail [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +DEPLOY_TYPE=baremetal +[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt +HOST_ARCH=$(uname -m) + # Prepare OpenStack credentials volume +rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" + if [[ ${INSTALLER_TYPE} == 'joid' ]]; then rc_file_vol="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds" elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/home/opnfv/functest/conf/os_cacert" echo "export OS_CACERT=/home/opnfv/functest/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh - rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" -else - rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" +elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" fi @@ -23,18 +28,15 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR sudo iptables -I FORWARD -j RETURN fi -DEPLOY_TYPE=baremetal -[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt -HOST_ARCH=$(uname -m) - echo "Functest: Start Docker and prepare environment" if [ "$BRANCH" != 'stable/danube' ]; then echo "Functest: Download images that will be used by test cases" images_dir="${HOME}/opnfv/functest/images" chmod +x ${WORKSPACE}/functest/ci/download_images.sh - ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} ${DEPLOY_SCENARIO} ${HOST_ARCH} 2> ${redirect} + ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} > ${redirect} images_vol="-v ${images_dir}:/home/opnfv/functest/images" + echo "Functest: Images successfully downloaded" fi dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}" @@ -43,13 +45,21 @@ sudo rm -rf ${dir_result}/* results_vol="-v ${dir_result}:/home/opnfv/functest/results" custom_params= test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}) +echo "Functest: custom parameters successfully retrieved: ${custom_params}" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + +if [ "${INSTALLER_TYPE}" == 'fuel' ] && [ "$BRANCH" != 'stable/danube' ]; then + COMPUTE_ARCH=$(ssh -l ubuntu ${INSTALLER_IP} -i ${SSH_KEY} ${ssh_options} \ + "sudo salt 'cmp*' grains.get cpuarch --out yaml | awk '{print \$2; exit}'") + envs="${envs} -e POD_ARCH=${COMPUTE_ARCH}" +fi + if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-ha'* ]]; then - ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" openo_msb_port=${openo_msb_port:-80} openo_msb_endpoint="$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ 'mysql -ucompass -pcompass -Dcompass -e "select package_config from cluster;" \ @@ -64,6 +74,8 @@ else volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" fi +echo "Functest: volumes defined" + FUNCTEST_IMAGE="opnfv/functest" if [ "$HOST_ARCH" = "aarch64" ]; then FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" @@ -94,12 +106,6 @@ if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi -if [ "$BRANCH" == 'master' ]; then - cmd="prepare_env start" -else - cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" -fi - - +cmd="prepare_env start" echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index ee154af03..454cee841 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -1,142 +1,144 @@ +--- - parameter: name: 'apex-defaults' parameters: - - string: - name: INSTALLER_IP - default: '192.168.X.X' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: apex - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'external' - description: 'external network for test' + - string: + name: INSTALLER_IP + default: '192.168.X.X' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: apex + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'external' + description: 'external network for test' - parameter: name: 'compass-defaults' parameters: - - string: - name: INSTALLER_IP - default: '192.168.200.2' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: compass - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'ext-net' - description: 'external network for test' + - string: + name: INSTALLER_IP + default: '192.168.200.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: compass + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'ext-net' + description: 'external network for test' - parameter: name: 'fuel-defaults' parameters: - - string: - name: INSTALLER_IP - default: '10.20.0.2' - description: 'IP of the installer' - - string: - name: SALT_MASTER_IP - default: '192.168.10.100' - description: 'IP of the salt master (for mcp deployments)' - - string: - name: SSH_KEY - default: '/tmp/mcp.rsa' - description: 'Path to private SSH key to access environment nodes' - - string: - name: INSTALLER_TYPE - default: fuel - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'admin_floating_net' - description: 'external network for test' - - string: - name: BRIDGE - default: 'pxebr' - description: 'pxe bridge for booting of Fuel master' + - string: + name: INSTALLER_IP + default: '10.20.0.2' + description: 'IP of the installer' + - string: + name: SSH_KEY + default: "/var/lib/opnfv/mcp.rsa" + description: 'Path to private SSH key to access environment nodes' + - string: + name: INSTALLER_TYPE + default: fuel + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'floating_net' + description: 'external network for test' + - string: + name: BRIDGE + default: 'pxebr' + description: 'Bridge(s) to be used by salt master' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "URL to Google Storage." - parameter: name: 'joid-defaults' parameters: - - string: - name: INSTALLER_IP - default: '192.168.122.5' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: joid - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: MODEL - default: 'os' - description: 'Model to deploy (os|k8)' - - string: - name: OS_RELEASE - default: 'newton' - description: 'OpenStack release (mitaka|newton)' - - string: - name: EXTERNAL_NETWORK - default: ext-net - description: "External network used for Floating ips." - - string: - name: LAB_CONFIG - default: "$HOME/joid_config" - description: "Local lab config and Openstack openrc location" - - string: - name: MAAS_REINSTALL - default: 'false' - description: "Reinstall MAAS and Bootstrap before deploy [true/false]" - - string: - name: UBUNTU_DISTRO - default: 'xenial' - description: "Ubuntu distribution to use for Openstack (xenial)" - - string: - name: CPU_ARCHITECTURE - default: 'amd64' - description: "CPU Architecture to use for Ubuntu distro " + - string: + name: INSTALLER_IP + default: '192.168.122.5' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: joid + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: MODEL + default: 'os' + description: 'Model to deploy (os|k8)' + - string: + name: OS_RELEASE + default: 'ocata' + description: 'OpenStack release (mitaka|newton|ocata)' + - string: + name: EXTERNAL_NETWORK + default: ext-net + description: "External network used for Floating ips." + - string: + name: LAB_CONFIG + default: "$HOME/joid_config" + description: "Local lab config and Openstack openrc location" + - string: + name: MAAS_REINSTALL + default: 'false' + description: "Reinstall MAAS and Bootstrap before deploy [true/false]" + - string: + name: UBUNTU_DISTRO + default: 'xenial' + description: "Ubuntu distribution to use for Openstack (xenial)" + - string: + name: CPU_ARCHITECTURE + default: 'amd64' + description: "CPU Architecture to use for Ubuntu distro " - parameter: name: 'daisy-defaults' parameters: - - string: - name: INSTALLER_IP - default: '10.20.7.3' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: daisy - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: BRIDGE - default: 'br7' - description: 'pxe bridge for booting of Fuel master' + - string: + name: INSTALLER_IP + default: '10.20.7.3' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: daisy + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: BRIDGE + default: 'br7' + description: 'pxe bridge for booting of Daisy master' - parameter: name: 'infra-defaults' parameters: - - string: - name: INSTALLER_IP - default: '192.168.122.2' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: infra - description: 'Installer used for deploying OPNFV on this POD' + - string: + name: INSTALLER_IP + default: '192.168.122.2' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: infra + description: 'Installer used for deploying OPNFV on this POD' + - parameter: name: 'netvirt-defaults' parameters: - - string: - name: INSTALLER_IP - default: '192.168.X.X' - description: 'IP of the installer' - - string: - name: INSTALLER_TYPE - default: apex - description: 'Installer used for deploying OPNFV on this POD' - - string: - name: EXTERNAL_NETWORK - default: 'external' - description: 'external network for test' + - string: + name: INSTALLER_IP + default: '192.168.X.X' + description: 'IP of the installer' + - string: + name: INSTALLER_TYPE + default: apex + description: 'Installer used for deploying OPNFV on this POD' + - string: + name: EXTERNAL_NETWORK + default: 'external' + description: 'external network for test' diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml index 75e00f983..2e94767e8 100644 --- a/jjb/global/releng-defaults.yml +++ b/jjb/global/releng-defaults.yml @@ -1,17 +1,18 @@ +--- # jjb defaults - defaults: name: global wrappers: - - ssh-agent-wrapper + - ssh-agent-wrapper project-type: freestyle node: master properties: - - logrotate-default + - logrotate-default publishers: # Any project that has a publisher will not have this macro diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 92199d6e7..59415f5ca 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -1,3 +1,4 @@ +--- # Releng macros # # NOTE: make sure macros are listed in execution ordered. @@ -14,250 +15,258 @@ - parameter: name: project-parameter parameters: - - string: - name: PROJECT - default: '{project}' - description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project" - - string: - name: GS_BASE - default: artifacts.opnfv.org/$PROJECT - description: "URL to Google Storage." - - string: - name: GS_BASE_PROXY - default: build.opnfv.org/artifacts.opnfv.org/$PROJECT - description: "URL to Google Storage proxy" - - 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 (deprecated)" + - string: + name: PROJECT + default: '{project}' + description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project" + - string: + name: GS_BASE + default: artifacts.opnfv.org/$PROJECT + description: "URL to Google Storage." + - string: + name: GS_BASE_PROXY + default: build.opnfv.org/artifacts.opnfv.org/$PROJECT + description: "URL to Google Storage proxy" + - 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 (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 + - 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: &git-scm-defaults - credentials-id: '$SSH_CREDENTIAL_ID' - url: '$GIT_BASE' - branches: - - 'origin/$BRANCH' - timeout: 15 + - git: &git-scm-defaults + credentials-id: '$SSH_CREDENTIAL_ID' + url: '$GIT_BASE' + branches: + - 'origin/$BRANCH' + timeout: 15 - scm: name: git-scm-gerrit scm: - - git: - choosing-strategy: 'gerrit' - refspec: '$GERRIT_REFSPEC' - <<: *git-scm-defaults + - git: + choosing-strategy: 'gerrit' + refspec: '$GERRIT_REFSPEC' + <<: *git-scm-defaults - scm: name: git-scm-with-submodules scm: - - git: - credentials-id: '$SSH_CREDENTIAL_ID' - url: '$GIT_BASE' - refspec: '' - branches: - - 'refs/heads/{branch}' - skip-tag: true - wipe-workspace: true - submodule: - recursive: true - timeout: 20 + - git: + credentials-id: '$SSH_CREDENTIAL_ID' + url: '$GIT_BASE' + refspec: '' + branches: + - 'refs/heads/{branch}' + skip-tag: true + wipe-workspace: true + submodule: + recursive: true + timeout: 20 - trigger: name: 'daily-trigger-disabled' triggers: - - timed: '' + - timed: '' - trigger: name: 'weekly-trigger-disabled' triggers: - - timed: '' + - timed: '' - trigger: name: gerrit-trigger-patchset-created 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: '{files}' - skip-vote: - successful: false - failed: false - unstable: false - notbuilt: false + - 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: '{files}' + skip-vote: + successful: false + failed: false + unstable: false + notbuilt: false - trigger: name: gerrit-trigger-change-merged triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: 'ANT' - pattern: '{files}' + - 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: '{files}' - 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 + - 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: '{files}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true - wrapper: name: ssh-agent-wrapper wrappers: - - ssh-agent-credentials: - users: - - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' + - ssh-agent-credentials: + users: + - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' + +- wrapper: + name: build-timeout + wrappers: + - timeout: + timeout: '{timeout}' + timeout-var: 'BUILD_TIMEOUT' + fail: true - wrapper: name: fix-workspace-permissions wrappers: - - pre-scm-buildstep: + - pre-scm-buildstep: - shell: | - #!/bin/bash - sudo chown -R $USER:$USER $WORKSPACE || exit 1 + #!/bin/bash + sudo chown -R $USER:$USER $WORKSPACE || exit 1 - builder: name: build-html-and-pdf-docs-output builders: - - shell: | - #!/bin/bash - set -o errexit - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs - GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh + - shell: | + #!/bin/bash + set -o errexit + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs + GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh - builder: name: upload-under-review-docs-to-opnfv-artifacts builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - [[ -d docs_output ]] || exit 0 - - echo - echo "###########################" - echo "UPLOADING DOCS UNDER REVIEW" - echo "###########################" - echo - - gs_base="artifacts.opnfv.org/$PROJECT/review" - gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" - local_path="upload/$GERRIT_CHANGE_NUMBER" - - mkdir -p upload - mv docs_output "$local_path" - gsutil -m cp -r "$local_path" "gs://$gs_base" - - gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - "gs://$gs_path"/**.html > /dev/null 2>&1 - - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ - sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] + [[ -d docs_output ]] || exit 0 + + echo + echo "###########################" + echo "UPLOADING DOCS UNDER REVIEW" + echo "###########################" + echo + + gs_base="artifacts.opnfv.org/$PROJECT/review" + gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" + local_path="upload/$GERRIT_CHANGE_NUMBER" + + mkdir -p upload + mv docs_output "$local_path" + gsutil -m cp -r "$local_path" "gs://$gs_base" + + gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + "gs://$gs_path"/**.html > /dev/null 2>&1 + + echo "Document link(s):" >> gerrit_comment.txt + find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ + sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt - builder: name: upload-generated-docs-to-opnfv-artifacts builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ - [[ -d docs_output ]] || exit 0 + [[ -d docs_output ]] || exit 0 - echo - echo "########################" - echo "UPLOADING GENERATED DOCS" - echo "########################" - echo + echo + echo "########################" + echo "UPLOADING GENERATED DOCS" + echo "########################" + echo - echo "gs_path="$GS_URL/docs"" - echo "local_path="upload/docs"" + echo "gs_path="$GS_URL/docs"" + echo "local_path="upload/docs"" - gs_path="$GS_URL/docs" - local_path="upload/docs" + gs_path="$GS_URL/docs" + local_path="upload/docs" - mkdir -p upload - mv docs_output "$local_path" - ls "$local_path" + mkdir -p upload + mv docs_output "$local_path" + ls "$local_path" - echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path"" - gsutil -m cp -r "$local_path"/* "gs://$gs_path" + echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path"" + gsutil -m cp -r "$local_path"/* "gs://$gs_path" - gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - "gs://$gs_path"/**.html > /dev/null 2>&1 + gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + "gs://$gs_path"/**.html > /dev/null 2>&1 - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ - sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt + echo "Document link(s):" >> gerrit_comment.txt + find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ + sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt # To take advantage of this macro, have your build write # out the file 'gerrit_comment.txt' with information to post @@ -265,213 +274,223 @@ - builder: name: report-build-result-to-gerrit builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - if [[ -e gerrit_comment.txt ]] ; then - echo - echo "posting review comment to gerrit..." - echo - cat gerrit_comment.txt - echo - ssh -p 29418 gerrit.opnfv.org \ - "gerrit review -p $GERRIT_PROJECT \ - -m '$(cat gerrit_comment.txt)' \ - $GERRIT_PATCHSET_REVISION \ - --notify NONE" - fi + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + if [[ -e gerrit_comment.txt ]] ; then + echo + echo "posting review comment to gerrit..." + echo + cat gerrit_comment.txt + echo + ssh -p 29418 gerrit.opnfv.org \ + "gerrit review -p $GERRIT_PROJECT \ + -m '$(cat gerrit_comment.txt)' \ + $GERRIT_PATCHSET_REVISION \ + --notify NONE" + fi - builder: name: remove-old-docs-from-opnfv-artifacts builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - - gs_path="artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" - - if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then - echo - echo "Deleting Out-of-dated Documents..." - gsutil -m rm -r "gs://$gs_path" - fi - gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER" - - if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then - echo - echo "Deleting Out-of-dated Documents..." - gsutil -m rm -r "gs://$gs_path" - fi + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] + + gs_path="artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" + + if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then + echo + echo "Deleting Out-of-dated Documents..." + gsutil -m rm -r "gs://$gs_path" + fi + gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER" + + if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then + echo + echo "Deleting Out-of-dated Documents..." + gsutil -m rm -r "gs://$gs_path" + fi - builder: name: build-and-upload-artifacts-json-api builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - export PATH=$PATH:/usr/local/bin/ + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + export PATH=$PATH:/usr/local/bin/ - virtualenv -p python2.7 $WORKSPACE/releng_artifacts - source $WORKSPACE/releng_artifacts/bin/activate + virtualenv -p python2.7 $WORKSPACE/releng_artifacts + source $WORKSPACE/releng_artifacts/bin/activate - # install python packages - pip install google-api-python-client + # install python packages + pip install google-api-python-client - # generate and upload index file - echo "Generating Artifacts API ..." - python $WORKSPACE/utils/opnfv-artifacts.py > index.json - gsutil cp index.json gs://artifacts.opnfv.org/index.json + # generate and upload index file + echo "Generating Artifacts API ..." + python $WORKSPACE/utils/opnfv-artifacts.py > index.json + gsutil cp index.json gs://artifacts.opnfv.org/index.json - deactivate + deactivate - builder: name: lint-python-code builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - virtualenv -p python2.7 $WORKSPACE/releng_flake8 - source $WORKSPACE/releng_flake8/bin/activate - - # install python packages - pip install "flake8==2.6.2" - - # generate and upload lint log - echo "Running flake8 code on $PROJECT ..." - - # Get number of flake8 violations. If none, this will be an - # empty string: "" - FLAKE_COUNT="$(find . \ + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + virtualenv -p python2.7 $WORKSPACE/releng_flake8 + source $WORKSPACE/releng_flake8/bin/activate + + # install python packages + pip install "flake8==2.6.2" + + # generate and upload lint log + echo "Running flake8 code on $PROJECT ..." + + # Get number of flake8 violations. If none, this will be an + # empty string: "" + FLAKE_COUNT="$(find . \ + -path './releng_flake8' -prune -o \ + -path './.tox' -prune -o \ + -type f -name "*.py" -print | \ + xargs flake8 --exit-zero -qq --count 2>&1)" + + # Ensure we start with a clean environment + rm -f lint.log + + if [ ! -z $FLAKE_COUNT ]; then + echo "Flake8 Violations: $FLAKE_COUNT" > lint.log + find . \ -path './releng_flake8' -prune -o \ -path './.tox' -prune -o \ -type f -name "*.py" -print | \ - xargs flake8 --exit-zero -qq --count 2>&1)" - - # Ensure we start with a clean environment - rm -f lint.log - - if [ ! -z $FLAKE_COUNT ]; then - echo "Flake8 Violations: $FLAKE_COUNT" > lint.log - find . \ - -path './releng_flake8' -prune -o \ - -path './.tox' -prune -o \ - -type f -name "*.py" -print | \ - xargs flake8 --exit-zero --first >> violation.log - SHOWN=$(wc -l violation.log | cut -d' ' -f1) - echo -e "First $SHOWN shown\n---" >> lint.log - cat violation.log >> lint.log - sed -r -i '4,$s/^/ /g' lint.log - rm violation.log - fi - - deactivate + xargs flake8 --exit-zero --first >> violation.log + SHOWN=$(wc -l violation.log | cut -d' ' -f1) + echo -e "First $SHOWN shown\n---" >> lint.log + cat violation.log >> lint.log + sed -r -i '4,$s/^/ /g' lint.log + rm violation.log + fi + + deactivate - builder: name: report-lint-result-to-gerrit builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ - # If no violations were found, no lint log will exist. - if [[ -e lint.log ]] ; then - echo -e "\nposting linting report to gerrit...\n" + # If no violations were found, no lint log will exist. + if [[ -e lint.log ]] ; then + echo -e "\nposting linting report to gerrit...\n" - cat lint.log - echo + cat lint.log + echo - ssh -p 29418 gerrit.opnfv.org \ - "gerrit review -p $GERRIT_PROJECT \ - -m \"$(cat lint.log)\" \ - $GERRIT_PATCHSET_REVISION \ - --notify NONE" + ssh -p 29418 gerrit.opnfv.org \ + "gerrit review -p $GERRIT_PROJECT \ + -m \"$(cat lint.log)\" \ + $GERRIT_PATCHSET_REVISION \ + --notify NONE" - exit 1 - fi + exit 1 + fi - builder: name: upload-review-docs builders: - - build-html-and-pdf-docs-output - - upload-under-review-docs-to-opnfv-artifacts - - report-build-result-to-gerrit + - build-html-and-pdf-docs-output + - upload-under-review-docs-to-opnfv-artifacts + - report-build-result-to-gerrit - builder: name: upload-merged-docs builders: - - build-html-and-pdf-docs-output - - upload-generated-docs-to-opnfv-artifacts - - report-build-result-to-gerrit - - remove-old-docs-from-opnfv-artifacts + - build-html-and-pdf-docs-output + - upload-generated-docs-to-opnfv-artifacts + - report-build-result-to-gerrit + - remove-old-docs-from-opnfv-artifacts - builder: name: check-bash-syntax builders: - - shell: "find . -name '*.sh' | xargs bash -n" + - 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 + - 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 - # 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 + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + sudo /bin/rm -rf "$WORKSPACE" - builder: name: clean-workspace-log builders: - - shell: | - find $WORKSPACE -type f -name '*.log' | xargs rm -f + - shell: | + find $WORKSPACE -type f -name '*.log' | xargs rm -f - publisher: name: archive-artifacts publishers: - - archive: - artifacts: '{artifacts}' - allow-empty: true - fingerprint: true - latest-only: true + - archive: + artifacts: '{artifacts}' + allow-empty: true + fingerprint: true + latest-only: true - publisher: name: publish-coverage diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 3694c0bc9..8739a78a3 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -1,3 +1,4 @@ +--- ##################################################### # Parameters for slaves using old labels # This will be cleaned up once the new job structure and @@ -6,1009 +7,1138 @@ - parameter: name: 'apex-baremetal-master-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-baremetal-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 + - label: + name: SLAVE_LABEL + default: 'apex-baremetal-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 + +- parameter: + name: 'apex-baremetal-euphrates-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-baremetal-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 + - parameter: name: 'apex-baremetal-danube-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-baremetal-danube' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 + - label: + name: SLAVE_LABEL + default: 'apex-baremetal-danube' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 + - parameter: name: 'apex-virtual-master-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-virtual-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-virtual2 - - lf-virtual3 - default-slaves: - - lf-virtual2 - - lf-virtual3 + - label: + name: SLAVE_LABEL + default: 'apex-virtual-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-virtual2 + - lf-virtual3 + default-slaves: + - lf-virtual2 + - lf-virtual3 + +- parameter: + name: 'apex-virtual-euphrates-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-virtual-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-virtual2 + - lf-virtual3 + default-slaves: + - lf-virtual2 + - lf-virtual3 - parameter: name: 'apex-virtual-danube-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-virtual-danube' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod3 - default-slaves: - - lf-pod3 + - label: + name: SLAVE_LABEL + default: 'apex-virtual-danube' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod3 + default-slaves: + - lf-pod3 + +- parameter: + name: 'arm-pod5-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - arm-pod5 + default-slaves: + - arm-pod5 + - string: + name: BRIDGE + default: 'admin7_br0,mgmt7_br0,,public7_br0' + description: 'Pre-existing bridges used by Fuel' + - parameter: name: 'lf-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod1 - default-slaves: - - lf-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod1 + default-slaves: + - lf-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + +- parameter: + name: 'lf-pod2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod2 + default-slaves: + - lf-pod2 + - string: + name: BRIDGE + default: 'pxebr,br-ctl' + description: 'Pre-existing bridges used by Fuel' + - parameter: name: 'lf-pod3-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - lf-pod3 - default-slaves: - - lf-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod3 + default-slaves: + - lf-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + ##################################################### # Parameters for CI baremetal PODs ##################################################### - parameter: name: 'apex-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' + - label: + name: SLAVE_LABEL + default: 'apex-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' - parameter: name: 'compass-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'compass-baremetal-master-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-baremetal-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-baremetal-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'compass-baremetal-branch-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-baremetal-branch' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-baremetal-branch' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'fuel-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'fuel-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'fuel-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'armband-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'armband-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' + - label: + name: SLAVE_LABEL + default: 'armband-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' + - parameter: name: 'joid-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'joid-baremetal' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: EXTERNAL_NETWORK - default: ext-net - description: "External network floating ips" + - label: + name: SLAVE_LABEL + default: 'joid-baremetal' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: EXTERNAL_NETWORK + default: ext-net + description: "External network floating ips" + - 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: INSTALLER_IP - default: '10.20.7.3' - description: 'IP of the installer' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - 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: INSTALLER_IP + default: '10.20.7.3' + description: 'IP of the installer' + - 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 ##################################################### - parameter: name: 'apex-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'apex-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' + - label: + name: SLAVE_LABEL + default: 'apex-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - parameter: name: 'compass-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'compass-virtual-master-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-virtual-master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-virtual-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'compass-virtual-branch-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'compass-virtual-branch' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'compass-virtual-branch' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'fuel-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'fuel-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'fuel-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'armband-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'armband-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' + - label: + name: SLAVE_LABEL + default: 'armband-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: LAB_CONFIG_URL + default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab + description: 'Base URI to the configuration directory' + - parameter: name: 'joid-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'joid-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'joid-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - 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: INSTALLER_IP - default: '10.20.11.2' - description: 'IP of the installer' - - string: - name: BRIDGE - default: 'daisy1' - description: 'pxe bridge for booting of Fuel master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - 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: INSTALLER_IP + default: '10.20.11.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'daisy1' + description: 'pxe bridge for booting of Daisy master' + - 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-enea-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-enea' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." -- parameter: name: 'opnfv-build-centos-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-centos' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'opnfv-build-centos' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - parameter: name: 'opnfv-build-ubuntu-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build-ubuntu' - description: 'Slave label on Jenkins' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'opnfv-build-ubuntu' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - parameter: name: 'opnfv-build-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'opnfv-build' - description: 'Slave label on Jenkins' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'opnfv-build' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - parameter: name: 'huawei-build-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-build - default-slaves: - - huawei-build - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-build + default-slaves: + - huawei-build + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - 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." + - 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 ##################################################### - parameter: name: 'ericsson-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - ericsson-pod1 - default-slaves: - - ericsson-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ericsson-pod1 + default-slaves: + - ericsson-pod1 + - string: + name: INSTALLER_IP + default: '10.20.1.2' + description: 'IP of the installer' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'cengn-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - cengn-pod1 - default-slaves: - - cengn-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - cengn-pod1 + default-slaves: + - cengn-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'intel-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-pod1 - default-slaves: - - intel-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod1 + default-slaves: + - intel-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'intel-pod2-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-pod2 - default-slaves: - - intel-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod2 + default-slaves: + - intel-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + - parameter: name: 'intel-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' + - 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' + - 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-pod12 - default-slaves: - - intel-pod12 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod12 + default-slaves: + - intel-pod12 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'huawei-pod3-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-pod3 - default-slaves: - - huawei-pod3 - - label: - name: SLAVE_LABEL - default: 'huawei-test' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod3 + default-slaves: + - huawei-pod3 + - label: + name: SLAVE_LABEL + default: 'huawei-test' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'huawei-pod4-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - huawei-pod4 - default-slaves: - - huawei-pod4 - - label: - name: SLAVE_LABEL - default: 'huawei-test' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod4 + default-slaves: + - huawei-pod4 + - label: + name: SLAVE_LABEL + default: 'huawei-test' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: '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 + - 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-virtual5-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'huawei-virtual5' + - 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-virtual7 - default-slaves: - - huawei-virtual7 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-virtual7 + default-slaves: + - 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 + - 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 + - parameter: name: 'zte-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod1 - default-slaves: - - zte-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: INSTALLER_IP - default: '10.20.6.2' - description: 'IP of the installer' - - string: - name: BRIDGE - default: 'br6' - description: 'pxe bridge for booting of Fuel master' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod1 + default-slaves: + - zte-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.6.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br6' + description: 'pxe bridge for booting of Fuel master' + - parameter: name: 'zte-pod2-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod2 - default-slaves: - - zte-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: INSTALLER_IP - default: '10.20.7.3' - description: 'IP of the installer' - - string: - name: BRIDGE - default: 'br7' - description: 'pxe bridge for booting of Fuel master' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod2 + default-slaves: + - zte-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.7.3' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br7' + description: 'pxe bridge for booting of Daisy master' + - parameter: name: 'zte-pod3-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - zte-pod3 - default-slaves: - - zte-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BRIDGE - default: 'br0' - description: 'pxe bridge for booting of Fuel master' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod3 + default-slaves: + - zte-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.0.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br0' + description: 'pxe bridge for booting of Daisy master' + +- parameter: + name: zte-pod4-defaults + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod4 + default-slaves: + - zte-pod4 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'juniper-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - juniper-pod1 - default-slaves: - - juniper-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: CEPH_DISKS - default: /srv - description: "Disks to use by ceph (comma separated list)" + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - juniper-pod1 + default-slaves: + - juniper-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: CEPH_DISKS + default: /srv + description: "Disks to use by ceph (comma separated list)" + - parameter: name: 'orange-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod1 - default-slaves: - - orange-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod1 + default-slaves: + - orange-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'orange-pod2-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod2 - default-slaves: - - orange-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod2 + default-slaves: + - orange-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'orange-pod5-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - orange-pod5 - default-slaves: - - orange-pod5 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - orange-pod5 + default-slaves: + - orange-pod5 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'dell-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - dell-pod1 - default-slaves: - - dell-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - dell-pod1 + default-slaves: + - dell-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'dell-pod2-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - dell-pod2 - default-slaves: - - dell-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - dell-pod2 + default-slaves: + - dell-pod2 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'nokia-pod1-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - nokia-pod1 - default-slaves: - - nokia-pod1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to use for Apex' -- parameter: - name: 'arm-pod2-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-pod2 - default-slaves: - - arm-pod2 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'arm-pod3-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-pod3 - default-slaves: - - arm-pod3 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'arm-pod4-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-pod4 - default-slaves: - - arm-pod4 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' -- parameter: - name: 'arm-virtual1-defaults' - parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - arm-virtual1 - default-slaves: - - arm-virtual1 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - nokia-pod1 + default-slaves: + - nokia-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + +- parameter: + name: 'arm-virtual2-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - arm-virtual2 + default-slaves: + - arm-virtual2 + - string: + name: BRIDGE + default: ',,,public8_br0' + description: 'Pre-existing bridges used by Fuel' + - parameter: name: 'intel-virtual6-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - intel-virtual6 - default-slaves: - - intel-virtual6 - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-virtual6 + default-slaves: + - intel-virtual6 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + +- parameter: + name: 'intel-virtual10-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-virtual10 + default-slaves: + - intel-virtual10 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'doctor-defaults' parameters: - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - '{default-slave}' - default-slaves: - - '{default-slave}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: SSH_KEY - default: /root/.ssh/id_rsa - description: 'SSH key to be used' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - '{default-slave}' + default-slaves: + - '{default-slave}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to be used' + - parameter: name: 'doctor-apex-verify-defaults' parameters: - - 'doctor-defaults': - default-slave: 'doctor-apex-verify' + - 'doctor-defaults': + default-slave: 'doctor-apex-verify' + - parameter: name: 'doctor-fuel-verify-defaults' parameters: - - 'doctor-defaults': - default-slave: 'doctor-fuel-verify' + - 'doctor-defaults': + default-slave: 'doctor-fuel-verify' + - parameter: name: 'doctor-joid-verify-defaults' parameters: - - 'doctor-defaults': - default-slave: 'doctor-joid-verify' + - 'doctor-defaults': + default-slave: 'doctor-joid-verify' + - parameter: name: 'multisite-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'multisite-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'multisite-virtual' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - parameter: name: 'ericsson-virtual5-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'ericsson-virtual5' - - string: - name: GIT_BASE - default: https://git.opendaylight.org/gerrit/p/$PROJECT.git - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'ericsson-virtual5' + - string: + name: GIT_BASE + 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' + - 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' + - 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: 'ericsson-virtual-pod1bl01-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'ericsson-virtual-pod1bl01' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'ericsson-virtual-pod1bl01' + - 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: - name: SLAVE_LABEL - default: 'odl-netvirt-virtual' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'odl-netvirt-virtual' + - 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-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' + - 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' + +- parameter: + name: 'flex-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - flex-pod1 + default-slaves: + - flex-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + ##################################################### # These slaves are just dummy slaves for sandbox jobs ##################################################### - parameter: name: 'sandbox-baremetal-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'sandbox-baremetal' - description: 'Slave label on Jenkins' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'sandbox-baremetal' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - parameter: name: 'sandbox-virtual-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'sandbox-virtual' - description: 'Slave label on Jenkins' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'sandbox-virtual' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - parameter: name: 'dummy-pod1-defaults' parameters: - - label: - name: SLAVE_LABEL - default: 'dummy-pod1' - description: 'Slave label on Jenkins' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - description: "Directory where the build artifact will be located upon the completion of the build." + - label: + name: SLAVE_LABEL + default: 'dummy-pod1' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." diff --git a/jjb/ipv6/ipv6.yml b/jjb/ipv6/ipv6.yml index b0db7640a..f51c4970b 100644 --- a/jjb/ipv6/ipv6.yml +++ b/jjb/ipv6/ipv6.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'ipv6-verify-{stream}' + - 'ipv6-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'ipv6-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/joid/joid-daily-jobs.yml b/jjb/joid/joid-daily-jobs.yml index 1ff260ac8..b28efc3b3 100644 --- a/jjb/joid/joid-daily-jobs.yml +++ b/jjb/joid/joid-daily-jobs.yml @@ -1,3 +1,4 @@ +--- ######################## # Job configuration for joid ######################## @@ -9,71 +10,56 @@ installer: '{name}' -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- - master: &master - stream: master - branch: '{stream}' + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' disabled: false - gs-pathname: '' -#-------------------------------- -# POD, INSTALLER, AND BRANCH MAPPING -#-------------------------------- -# CI PODs -#-------------------------------- + gs-pathname: '/{stream}' + # ------------------------------- + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------- + # CI PODs + # ------------------------------- pod: - - baremetal: - slave-label: joid-baremetal - <<: *master - - virtual: - slave-label: joid-virtual - <<: *master -#-------------------------------- -# None-CI PODs -#-------------------------------- - - orange-pod1: - slave-label: orange-pod1 - <<: *master - - cengn-pod1: - slave-label: cengn-pod1 - <<: *master -#-------------------------------- -# scenarios -#-------------------------------- + - baremetal: + slave-label: joid-baremetal + <<: *euphrates + + # ------------------------------- + # scenarios + # ------------------------------- scenario: - - 'os-nosdn-nofeature-noha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - - 'os-nosdn-lxd-ha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - - 'os-nosdn-lxd-noha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - - 'os-odl_l2-nofeature-ha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-onos-nofeature-ha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-odl_l2-nofeature-noha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-onos-nofeature-noha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-onos-sfc-ha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-ocl-nofeature-ha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-ocl-nofeature-noha': - auto-trigger-name: 'daily-trigger-disabled' - - 'k8-nosdn-nofeature-noha': - auto-trigger-name: 'daily-trigger-disabled' - - 'k8-nosdn-lb-noha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - - 'k8-ovn-lb-noha': - auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-nofeature-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-nofeature-ha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-lxd-ha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-lxd-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-odl_l2-nofeature-ha': + auto-trigger-name: 'daily-trigger-disabled' + - 'os-odl_l2-nofeature-noha': + auto-trigger-name: 'daily-trigger-disabled' + - 'os-ocl-nofeature-ha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-ocl-nofeature-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-nosdn-nofeature-noha': + auto-trigger-name: 'daily-trigger-disabled' + - 'k8-nosdn-lb-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-ovn-lb-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-openbaton-ha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' jobs: - - 'joid-{scenario}-{pod}-daily-{stream}' - - 'joid-deploy-{pod}-daily-{stream}' + - 'joid-{scenario}-{pod}-daily-{stream}' + - 'joid-deploy-{pod}-daily-{stream}' ######################## # job templates @@ -86,85 +72,86 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'joid-os-.*?-{pod}-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-os-.*?-{pod}-daily-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' builders: - - description-setter: - description: "POD: $NODE_NAME" - - trigger-builds: - - project: 'joid-deploy-{pod}-daily-{stream}' - current-parameters: true - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-joid-{pod}-daily-{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: 'yardstick-joid-{pod}-daily-{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' - # 1.dovetail only master by now, not sync with A/B/C branches - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only debug testsuite here(includes basic testcase, - # i.e. one tempest smoke ipv6, two vping from functest) - # 4.not used for release criteria or compliance, - # only to debug the dovetail tool bugs with joid - #- trigger-builds: - # - project: 'dovetail-joid-{pod}-proposed_tests-{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' + - description-setter: + description: "POD: $NODE_NAME" + - trigger-builds: + - project: 'joid-deploy-{pod}-daily-{stream}' + current-parameters: true + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-joid-{pod}-daily-{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: 'yardstick-joid-{pod}-daily-{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' +# 1.dovetail only euphrates by now, not sync with A/B/C branches +# 2.here the stream means the SUT stream, dovetail stream is defined in +# its own job +# 3.only debug testsuite here(includes basic testcase, +# i.e. one tempest smoke ipv6, two vping from functest) +# 4.not used for release criteria or compliance, +# only to debug the dovetail tool bugs with joid +# - trigger-builds: +# - project: 'dovetail-joid-{pod}-proposed_tests-{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: 'joid-deploy-{pod}-daily-{stream}' @@ -174,229 +161,114 @@ 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: - - 'joid-deploy-{pod}-daily-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-deploy-{pod}-daily-.*' + block-level: 'NODE' wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: 180 - fail: true + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 180 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl_l2-nofeature-ha' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' scm: - - git-scm + - git-scm builders: - - description-setter: - description: "POD: $NODE_NAME" - - 'builder-macro' + - description-setter: + description: "POD: $NODE_NAME" + - 'builder-macro' ######################## # builder macros ######################## - builder: name: 'builder-macro' builders: - - shell: | - #!/bin/bash - echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER" - echo - echo "------ First Executing clean.sh ------" - cd $WORKSPACE/ci - ./clean.sh - - shell: - !include-raw: ./joid-deploy.sh + - shell: | + #!/bin/bash + echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER" + echo + echo "------ First Executing clean.sh ------" + cd $WORKSPACE/ci + ./clean.sh + - shell: + !include-raw: ./joid-deploy.sh ######################## # trigger macros ######################## -# os-nosdn-nofeature-ha trigger - branch: master -- trigger: - name: 'joid-os-nosdn-nofeature-ha-baremetal-master-trigger' - triggers: - - timed: '5 2 * * *' -- trigger: - name: 'joid-os-nosdn-nofeature-ha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-nofeature-ha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-nofeature-ha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-odl_l2-nofeature-ha trigger - branch: master -- trigger: - name: 'joid-os-odl_l2-nofeature-ha-baremetal-master-trigger' - triggers: - - timed: '5 7 * * *' -- trigger: - name: 'joid-os-odl_l2-nofeature-ha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-odl_l2-nofeature-ha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-onos-nofeature-ha trigger - branch: master -- trigger: - name: 'joid-os-onos-nofeature-ha-baremetal-master-trigger' - triggers: - - timed: '5 12 * * *' -- trigger: - name: 'joid-os-onos-nofeature-ha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-onos-nofeature-ha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-onos-nofeature-ha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-onos-sfc-ha trigger - branch: master -- trigger: - name: 'joid-os-onos-sfc-ha-baremetal-master-trigger' - triggers: - - timed: '5 17 * * *' -- trigger: - name: 'joid-os-onos-sfc-ha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-onos-sfc-ha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-onos-sfc-ha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-nosdn-lxd-noha trigger - branch: master -- trigger: - name: 'joid-os-nosdn-lxd-noha-baremetal-master-trigger' - triggers: - - timed: '5 22 * * *' -- trigger: - name: 'joid-os-nosdn-lxd-noha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-lxd-noha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-lxd-noha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-nosdn-lxd-ha trigger - branch: master -- trigger: - name: 'joid-os-nosdn-lxd-ha-baremetal-master-trigger' - triggers: - - timed: '5 10 * * *' -- trigger: - name: 'joid-os-nosdn-lxd-ha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-lxd-ha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-lxd-ha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# os-nosdn-nofeature-noha trigger - branch: master -- trigger: - name: 'joid-os-nosdn-nofeature-noha-baremetal-master-trigger' - triggers: - - timed: '5 4 * * *' -- trigger: - name: 'joid-os-nosdn-nofeature-noha-virtual-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-nofeature-noha-orange-pod1-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'joid-os-nosdn-nofeature-noha-cengn-pod1-master-trigger' - triggers: - - timed: '' -# k8-nosdn-nofeature-noha trigger - branch: master -- trigger: - name: 'joid-k8-nosdn-nofeature-noha-baremetal-master-trigger' - triggers: - - timed: '5 15 * * *' +# os-nosdn-nofeature-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-nofeature-noha-virtual-master-trigger' + name: 'joid-os-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 2 * * *' +# os-odl_l2-nofeature-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-nofeature-noha-orange-pod1-master-trigger' + name: 'joid-os-odl_l2-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 7 * * *' +# os-nosdn-lxd-noha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-nofeature-noha-cengn-pod1-master-trigger' + name: 'joid-os-nosdn-lxd-noha-baremetal-euphrates-trigger' triggers: - - timed: '' -# k8-nosdn-lb-noha trigger - branch: master + - timed: '5 22 * * *' +# os-nosdn-lxd-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-lb-noha-baremetal-master-trigger' + name: 'joid-os-nosdn-lxd-ha-baremetal-euphrates-trigger' triggers: - - timed: '5 20 * * *' + - timed: '5 10 * * *' +# os-nosdn-nofeature-noha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-lb-noha-virtual-master-trigger' + name: 'joid-os-nosdn-nofeature-noha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 4 * * *' +# k8-nosdn-nofeature-noha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-lb-noha-orange-pod1-master-trigger' + name: 'joid-k8-nosdn-nofeature-noha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 15 * * *' +# k8-nosdn-lb-noha trigger - branch: euphrates - trigger: - name: 'joid-k8-nosdn-lb-noha-cengn-pod1-master-trigger' + name: 'joid-k8-nosdn-lb-noha-baremetal-euphrates-trigger' triggers: - - timed: '' -# k8-ovn-lb-noha trigger - branch: master + - timed: '5 20 * * *' +# k8-ovn-lb-noha trigger - branch: euphrates - trigger: - name: 'joid-k8-ovn-lb-noha-baremetal-master-trigger' + name: 'joid-k8-ovn-lb-noha-baremetal-euphrates-trigger' triggers: - - timed: '5 17 * * *' + - timed: '5 17 * * *' +# os-nosdn-openbaton-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-ovn-lb-noha-virtual-master-trigger' + name: 'joid-os-nosdn-openbaton-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 25 * * *' +# os-ocl-nofeature-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-ovn-lb-noha-orange-pod1-master-trigger' + name: 'joid-os-ocl-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 13 * * *' +# os-ocl-nofeature-ha trigger - branch: euphrates - trigger: - name: 'joid-k8-ovn-lb-noha-cengn-pod1-master-trigger' + name: 'joid-os-ocl-nofeature-noha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '5 17 * * *' diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index e197dbd8c..9740d38bf 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -94,9 +94,6 @@ EXTRA=${DEPLOY_OPTIONS[4]} if [ "$SDN_CONTROLLER" == 'odl_l2' ] || [ "$SDN_CONTROLLER" == 'odl_l3' ]; then SDN_CONTROLLER='odl' fi -if [ "$HA_MODE" == 'noha' ]; then - HA_MODE='nonha' -fi # Add extra to features if [ "$EXTRA" != "" ];then diff --git a/jjb/joid/joid-verify-jobs.yml b/jjb/joid/joid-verify-jobs.yml index 03fab553e..53bc3f38a 100644 --- a/jjb/joid/joid-verify-jobs.yml +++ b/jjb/joid/joid-verify-jobs.yml @@ -1,37 +1,38 @@ +--- - project: name: 'joid-verify-jobs' project: 'joid' installer: 'joid' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + ##################################### + # patch verification phases + ##################################### phase: - - 'basic': - slave-label: 'opnfv-build-ubuntu' - - 'deploy-virtual': - slave-label: 'joid-virtual' - - 'smoke-test': - slave-label: 'joid-virtual' -##################################### -# jobs -##################################### + - 'basic': + slave-label: 'opnfv-build-ubuntu' + - 'deploy-virtual': + slave-label: 'joid-virtual' + - 'smoke-test': + slave-label: 'joid-virtual' + ##################################### + # jobs + ##################################### jobs: - - 'joid-verify-{stream}' - - 'joid-verify-{phase}-{stream}' + - 'joid-verify-{stream}' + - 'joid-verify-{phase}-{stream}' ##################################### # job templates ##################################### @@ -45,103 +46,103 @@ 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: - - 'joid-verify-master' - - 'joid-verify-danube' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-verify-master' + - 'joid-verify-danube' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - readable-message: true + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'joid-virtual-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'joid-virtual-defaults' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'joid-verify-basic-{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 - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'joid-verify-deploy-virtual-{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: true - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: smoke-test - condition: SUCCESSFUL - projects: - - name: 'joid-verify-smoke-test-{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: true - kill-phase-on: FAILURE - abort-all-job: true + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'joid-verify-basic-{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 + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'joid-verify-deploy-virtual-{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: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: smoke-test + condition: SUCCESSFUL + projects: + - name: 'joid-verify-smoke-test-{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: true + kill-phase-on: FAILURE + abort-all-job: true - job-template: name: 'joid-verify-{phase}-{stream}' @@ -151,62 +152,62 @@ 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: - - 'joid-verify-deploy-.*' - - 'joid-verify-test-.*' - block-level: 'NODE' + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-verify-deploy-.*' + - 'joid-verify-test-.*' + block-level: 'NODE' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' ##################################### # builder macros ##################################### - builder: name: 'joid-verify-basic-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" + echo "Not activated!" - builder: name: 'joid-verify-deploy-virtual-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" + echo "Not activated!" - builder: name: 'joid-verify-smoke-test-macro' builders: - - shell: | - #!/bin/bash + - shell: | + #!/bin/bash - echo "Not activated!" + echo "Not activated!" diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index e5b56bf9b..2e542acea 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -1,41 +1,44 @@ +--- - project: name: kvmfornfv project: '{name}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: true -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + ##################################### + # patch verification phases + ##################################### phase: - - 'build': - slave-label: 'opnfv-build-ubuntu' - - 'test': - slave-label: 'intel-pod10' -##################################### -# patch verification phases -##################################### + - 'build': + slave-label: 'opnfv-build-ubuntu' + - 'test': + slave-label: 'intel-pod10' + ##################################### + # patch verification phases + ##################################### testname: - - 'cyclictest' - - 'packet_forward' -##################################### -# patch verification phases -##################################### + - 'cyclictest' + - 'packet_forward' + - 'livemigration' + ##################################### + # patch verification phases + ##################################### jobs: - - 'kvmfornfv-verify-{stream}' - - 'kvmfornfv-verify-{phase}-{stream}' - - 'kvmfornfv-merge-{stream}' - - 'kvmfornfv-daily-{stream}' - - 'kvmfornfv-daily-build-{stream}' - - 'kvmfornfv-{testname}-daily-test-{stream}' + - 'kvmfornfv-verify-{stream}' + - 'kvmfornfv-verify-{phase}-{stream}' + - 'kvmfornfv-merge-{stream}' + - 'kvmfornfv-daily-{stream}' + - 'kvmfornfv-daily-build-{stream}' + - 'kvmfornfv-{testname}-daily-test-{stream}' + ##################################### # job templates ##################################### @@ -49,71 +52,72 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 3 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 3 + option: 'project' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'kvmfornfv-verify-build-{stream}' - current-parameters: false - predefined-parameters: | - BRANCH=$BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: test - condition: SUCCESSFUL - projects: - - name: 'kvmfornfv-verify-test-{stream}' - current-parameters: false - predefined-parameters: | - BRANCH=$BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-verify-build-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-verify-test-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - job-template: name: 'kvmfornfv-verify-{phase}-{stream}' @@ -122,29 +126,30 @@ concurrent: true scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - 'kvmfornfv-defaults': - gs-pathname: '{gs-pathname}' - - string: - name: PHASE - default: '{phase}' - description: "Execution of kvmfornfv daily '{phase}' job ." + - project-parameter: + project: '{project}' + 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: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' - job-template: name: 'kvmfornfv-merge-{stream}' @@ -152,33 +157,33 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - 'kvmfornfv-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'kvmfornfv-defaults': + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm 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}' + - 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}' builders: - - shell: - !include-raw: ./kvmfornfv-build.sh + - shell: + !include-raw: ./kvmfornfv-build.sh - job-template: name: 'kvmfornfv-daily-{stream}' @@ -190,52 +195,62 @@ concurrent: false parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - 'kvmfornfv-defaults': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'kvmfornfv-defaults': + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm triggers: - - timed: '@midnight' + - timed: '@midnight' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: cyclictest-build - condition: SUCCESSFUL - projects: - - name: 'kvmfornfv-daily-build-{stream}' - current-parameters: false - node-parameters: false - git-revision: true - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - 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-test - condition: SUCCESSFUL - projects: - - name: 'kvmfornfv-packet_forward-daily-test-{stream}' - current-parameters: false - node-parameters: false - git-revision: true - kill-phase-on: FAILURE - abort-all-job: true + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: cyclictest-build + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-daily-build-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + 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-test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-packet_forward-daily-test-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: livemigration-test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-livemigration-daily-test-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true - job-template: name: 'kvmfornfv-daily-build-{stream}' @@ -245,29 +260,29 @@ concurrent: false scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - 'kvmfornfv-defaults': - gs-pathname: '{gs-pathname}' - - string: - name: PHASE - default: 'build' - description: "Execution of kvmfornfv daily 'build' job ." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'kvmfornfv-defaults': + gs-pathname: '{gs-pathname}' + - string: + name: PHASE + default: 'build' + description: "Execution of kvmfornfv daily 'build' job ." builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-daily-build-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-daily-build-macro' - job-template: name: 'kvmfornfv-{testname}-daily-test-{stream}' @@ -277,80 +292,95 @@ concurrent: false scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'intel-pod10-defaults' - - 'kvmfornfv-defaults': - gs-pathname: '{gs-pathname}' - - string: - name: TEST_NAME - default: '{testname}' - description: "Daily job to execute kvmfornfv '{testname}' testcase." - - string: - name: PHASE - default: 'test' - description: "Execution of kvmfornfv daily 'test' job ." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'intel-pod10-defaults' + - 'kvmfornfv-defaults': + gs-pathname: '{gs-pathname}' + - string: + name: TEST_NAME + default: '{testname}' + description: "Daily job to execute kvmfornfv '{testname}' testcase." + - string: + name: PHASE + default: 'test' + description: "Execution of kvmfornfv daily 'test' job ." builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-{testname}-daily-test-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-{testname}-daily-test-macro' + ##################################### # builder macros ##################################### - builder: name: 'kvmfornfv-verify-build-macro' builders: - - shell: - !include-raw: ./kvmfornfv-build.sh - - shell: - !include-raw: ./kvmfornfv-upload-artifact.sh + - shell: + !include-raw: ./kvmfornfv-build.sh + - shell: + !include-raw: ./kvmfornfv-upload-artifact.sh + - builder: name: 'kvmfornfv-verify-test-macro' builders: - - shell: - !include-raw: ./kvmfornfv-download-artifact.sh - - shell: - !include-raw: ./kvmfornfv-test.sh + - shell: + !include-raw: ./kvmfornfv-download-artifact.sh + - shell: + !include-raw: ./kvmfornfv-test.sh + - builder: name: 'kvmfornfv-daily-build-macro' builders: - - shell: - !include-raw: ./kvmfornfv-build.sh - - shell: - !include-raw: ./kvmfornfv-upload-artifact.sh + - shell: + !include-raw: ./kvmfornfv-build.sh + - shell: + !include-raw: ./kvmfornfv-upload-artifact.sh + - builder: name: 'kvmfornfv-cyclictest-daily-test-macro' builders: - - shell: - !include-raw: ./kvmfornfv-download-artifact.sh - - shell: - !include-raw: ./kvmfornfv-test.sh - - shell: - !include-raw: ./kvmfornfv-upload-artifact.sh + - shell: + !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-test-macro' builders: - - shell: - !include-raw: ./kvmfornfv-download-artifact.sh - - shell: - !include-raw: ./kvmfornfv-test.sh + - shell: + !include-raw: ./kvmfornfv-download-artifact.sh + - shell: + !include-raw: ./kvmfornfv-test.sh + +- builder: + name: 'kvmfornfv-livemigration-daily-test-macro' + builders: + - shell: + !include-raw: ./kvmfornfv-download-artifact.sh + - shell: + !include-raw: ./kvmfornfv-test.sh + ##################################### # parameter macros ##################################### - parameter: name: 'kvmfornfv-defaults' parameters: - - string: - name: GS_URL - default: artifacts.opnfv.org/$PROJECT{gs-pathname} - description: "URL to Google Storage." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." diff --git a/jjb/models/models.yml b/jjb/models/models.yml index 683103678..b317c05f2 100644 --- a/jjb/models/models.yml +++ b/jjb/models/models.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'models-verify-{stream}' + - 'models-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'models-verify-{stream}' @@ -26,43 +27,43 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail - # shellcheck -f tty tests/*.sh + # shellcheck -f tty tests/*.sh diff --git a/jjb/moon/moon.yml b/jjb/moon/moon.yml index fb28feb53..d254129e1 100644 --- a/jjb/moon/moon.yml +++ b/jjb/moon/moon.yml @@ -1,54 +1,58 @@ +--- - project: name: moon project: '{name}' jobs: - - 'moon-verify-{stream}' + - 'moon-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' + - master: + branch: '{stream}' + gs-pathname: '' + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' - job-template: name: 'moon-verify-{stream}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: - #!/bin/bash - echo "launch Moon unit tests" - nosetest $WORKSPACE/keystone-moon/keystone/tests/moon/unit + - shell: | + #!/bin/bash + echo "launch Moon unit tests" + nosetest $WORKSPACE/keystone-moon/keystone/tests/moon/unit diff --git a/jjb/multisite/fuel-deploy-for-multisite.sh b/jjb/multisite/fuel-deploy-for-multisite.sh deleted file mode 100755 index 71c6cc11d..000000000 --- a/jjb/multisite/fuel-deploy-for-multisite.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o 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" -export BRANCH=$(echo $BRANCH | sed 's/stable\///g') -# 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-$BRANCH/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 - -# use known/working version of fuel -#FUEL_PROPERTIES_FILE="opnfv-2017-03-06_16-00-15.properties" -curl -L -s -o $WORKSPACE/latest.properties $GS_PATH/$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 deleted file mode 100644 index 06cefb646..000000000 --- a/jjb/multisite/multisite-daily-jobs.yml +++ /dev/null @@ -1,305 +0,0 @@ -- project: - name: kingbird - - project: 'multisite' - - jobs: - - 'multisite-kingbird-virtual-daily-{stream}' - - 'multisite-{phase}-{stream}' - - phase: - - '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: '0 12 * * *' - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - timed: '0 0 * * *' - -- job-template: - name: 'multisite-kingbird-virtual-daily-{stream}' - - project-type: multijob - - disabled: '{obj:disabled}' - - concurrent: false - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - choice: - name: FRESH_INSTALL - choices: - - 'true' - - 'false' - - string: - name: KINGBIRD_LOG_FILE - default: $WORKSPACE/kingbird.log - - 'opnfv-build-defaults' - - triggers: - - timed: '{timed}' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: fuel-deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'multisite-fuel-deploy-regionone-virtual-{stream}' - current-parameters: false - predefined-parameters: | - FUEL_VERSION=latest - DEPLOY_SCENARIO=os-nosdn-nofeature-noha - OS_REGION=RegionOne - 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: 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=os-nosdn-nofeature-noha - OS_REGION=RegionTwo - 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: ericsson-virtual13 - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: centralize-keystone - condition: SUCCESSFUL - projects: - - name: 'multisite-register-endpoints-{stream}' - current-parameters: false - predefined-parameters: | - OS_REGION=RegionOne - 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: 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=100.64.209.10 - REGIONTWO_IP=100.64.209.11 - FRESH_INSTALL=$FRESH_INSTALL - node-parameters: false - node-label-name: SLAVE_LABEL - node-label: ericsson-virtual13 - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: kingbird-deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'multisite-kingbird-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - OS_REGION=RegionOne - 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: ericsson-virtual12 - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: kingbird-functest - condition: SUCCESSFUL - projects: - - 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=100.64.209.10 - REGIONTWO_IP=100.64.209.11 - FRESH_INSTALL=$FRESH_INSTALL - node-parameters: false - node-label-name: SLAVE_LABEL - node-label: ericsson-virtual12 - kill-phase-on: NEVER - abort-all-job: false - -- job-template: - name: 'multisite-{phase}-{stream}' - - concurrent: false - - disabled: '{obj:disabled}' - - concurrent: false - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: KINGBIRD_LOG_FILE - default: $WORKSPACE/kingbird.log - - string: - name: GS_PATH - default: 'http://artifacts.opnfv.org/fuel{gs-pathname}' - - 'fuel-defaults' - - '{slave-label}-defaults' - - choice: - name: FRESH_INSTALL - choices: - - 'true' - - 'false' - - scm: - - git-scm - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'multisite-{phase}-builder': - stream: '{stream}' - - publishers: - - 'multisite-{phase}-publisher' - -######################## -# builder macros -######################## -- 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: "endpoints.ini" - - shell: | - #!/bin/bash - - 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: "servicepass.ini" - - shell: | - #!/bin/bash - - 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: - - shell: | - #!/bin/bash - - echo "This is where we install kingbird" - cd $WORKSPACE/tools/kingbird - ./deploy.sh -######################## -# publisher macros -######################## -- publisher: - name: 'multisite-fuel-deploy-regionone-virtual-publisher' - publishers: - - archive: - artifacts: 'servicepass.ini' - allow-empty: false - only-if-success: true - fingerprint: true -- publisher: - name: 'multisite-fuel-deploy-regiontwo-virtual-publisher' - publishers: - - archive: - artifacts: 'endpoints.ini' - allow-empty: false - only-if-success: true - fingerprint: true -- publisher: - name: 'multisite-register-endpoints-publisher' - publishers: - - archive: - artifacts: 'dummy.txt' - allow-empty: true -- publisher: - name: 'multisite-update-auth-publisher' - publishers: - - archive: - artifacts: 'dummy.txt' - allow-empty: true -- publisher: - name: 'multisite-kingbird-deploy-virtual-publisher' - publishers: - - archive: - artifacts: 'dummy.txt' - allow-empty: true -- publisher: - name: 'multisite-kingbird-functest-publisher' - publishers: - - archive: - artifacts: 'dummy.txt' - allow-empty: true diff --git a/jjb/multisite/multisite-verify-jobs.yml b/jjb/multisite/multisite-verify-jobs.yml deleted file mode 100644 index 9431e0bac..000000000 --- a/jjb/multisite/multisite-verify-jobs.yml +++ /dev/null @@ -1,69 +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}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - timed: '@midnight' - - danube: - 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}' - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - - builders: - - shell: | - #!/bin/bash - - echo "Hello World" diff --git a/jjb/netready/netready.yml b/jjb/netready/netready.yml index 2702c45b3..b72eeaa46 100644 --- a/jjb/netready/netready.yml +++ b/jjb/netready/netready.yml @@ -1,17 +1,18 @@ +--- - project: name: netready project: '{name}' jobs: - - 'netready-verify-{stream}' - - 'netready-build-gluon-packages-daily-{stream}' + - 'netready-verify-{stream}' + - 'netready-build-gluon-packages-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false - job-template: name: 'netready-verify-{stream}' @@ -19,40 +20,39 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' + - project-parameter: + project: '{project}' + branch: '{branch}' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - shell: | - echo "Nothing to verify!" - + - shell: | + echo "Nothing to verify!" - job-template: @@ -63,21 +63,21 @@ concurrent: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - 'netready-parameter': - gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'netready-parameter': + gs-pathname: '{gs-pathname}' scm: - - git-scm + - git-scm builders: - - 'netready-gluon-build' + - 'netready-gluon-build' triggers: - - timed: '@midnight' + - timed: '@midnight' ######################## @@ -87,10 +87,10 @@ - builder: name: 'netready-gluon-build' builders: - - shell: - !include-raw: ./netready-gluon-build.sh - - shell: - !include-raw: ./netready-upload-gluon-packages.sh + - shell: + !include-raw: ./netready-gluon-build.sh + - shell: + !include-raw: ./netready-upload-gluon-packages.sh ######################## @@ -100,11 +100,11 @@ - 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." + - 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/nfvbench/nfvbench.yml b/jjb/nfvbench/nfvbench.yml new file mode 100644 index 000000000..62776d566 --- /dev/null +++ b/jjb/nfvbench/nfvbench.yml @@ -0,0 +1,93 @@ +--- +- project: + name: nfvbench + + project: '{name}' + + jobs: + - 'nfvbench-build-{stream}' + - 'nfvbench-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + docker-tag: 'latest' + +- job-template: + name: 'nfvbench-build-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + # yamllint disable rule:line-length + - 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." + # yamllint enable rule:line-length + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'buildvm' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + + builders: + - shell: | + cd $WORKSPACE/nfvbenchvm/dib + bash build-image.sh + +- job-template: + name: 'nfvbench-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + # yamllint disable rule:line-length + - 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." + # yamllint enable rule:line-length + - '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' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + + builders: + - shell: | + echo "pass" diff --git a/jjb/octopus/octopus.yml b/jjb/octopus/octopus.yml index c06fa89e8..f51db1bc1 100644 --- a/jjb/octopus/octopus.yml +++ b/jjb/octopus/octopus.yml @@ -14,7 +14,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - danube: + - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false diff --git a/jjb/onosfw/onosfw.yml b/jjb/onosfw/onosfw.yml index 9d6b037e1..58a50bd57 100644 --- a/jjb/onosfw/onosfw.yml +++ b/jjb/onosfw/onosfw.yml @@ -1,22 +1,23 @@ +--- - project: name: onosfw jobs: - - 'onosfw-verify-{stream}' - - 'onosfw-daily-{stream}' - - 'onosfw-build-{stream}' + - 'onosfw-verify-{stream}' + - 'onosfw-daily-{stream}' + - 'onosfw-build-{stream}' -# only master branch is enabled at the moment to keep no of jobs sane + # only master branch is enabled at the moment to keep no of jobs sane stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false project: 'onosfw' @@ -29,40 +30,40 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - 'builder-onosfw-helloworld' + - 'builder-onosfw-helloworld' - job-template: name: 'onosfw-daily-{stream}' @@ -70,19 +71,19 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm triggers: - - timed: '@midnight' + - timed: '@midnight' builders: - - trigger-builds: + - trigger-builds: - project: 'onosfw-build-{stream}' git-revision: true block: true @@ -93,20 +94,20 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm + - git-scm builders: - - 'builder-onosfw-helloworld' + - 'builder-onosfw-helloworld' ######################## # builder macros @@ -114,76 +115,78 @@ - builder: name: 'builder-onosfw-build' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - # log info to console - echo "Starting the build of $PROJECT. This could take some time..." - echo "--------------------------------------------------------" - echo - - # create the cache directory if it doesn't exist - [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY - [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY - - # set OPNFV_ARTIFACT_VERSION - export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") - - # start the build - cd $WORKSPACE/ - ./ci/build.sh $BUILD_DIRECTORY/ - - # list the build artifacts - ls -al $BUILD_DIRECTORY - - # 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/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/onosfw.iso | cut -d' ' -f1)" - echo "OPNFV_BUILD_URL=$BUILD_URL" - ) > $BUILD_DIRECTORY/opnfv.properties - echo - echo "--------------------------------------------------------" - echo "Done!" - - + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + # log info to console + echo "Starting the build of $PROJECT. This could take some time..." + echo "--------------------------------------------------------" + echo + + # create the cache directory if it doesn't exist + [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY + [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY + + # set OPNFV_ARTIFACT_VERSION + export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") + + # start the build + cd $WORKSPACE/ + ./ci/build.sh $BUILD_DIRECTORY/ + + # list the build artifacts + ls -al $BUILD_DIRECTORY + + # 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/opnfv-$OPNFV_ARTIFACT_VERSION.iso" + echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/onosfw.iso | cut -d' ' -f1)" + echo "OPNFV_BUILD_URL=$BUILD_URL" + ) > $BUILD_DIRECTORY/opnfv.properties + echo + echo "--------------------------------------------------------" + echo "Done!" + + +# yamllint disable rule:line-length - builder: name: 'builder-onosfw-upload-artifact' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail - # log info to console - echo "Uploading the $INSTALLER artifact. This could take some time..." - echo "--------------------------------------------------------" - echo + # log info to console + echo "Uploading the $INSTALLER artifact. This could take some time..." + echo "--------------------------------------------------------" + echo - # source the opnfv.properties to get ARTIFACT_VERSION - source $BUILD_DIRECTORY/opnfv.properties + # source the opnfv.properties to get ARTIFACT_VERSION + source $BUILD_DIRECTORY/opnfv.properties - # upload artifact and additional files to google storage - gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 - gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 - gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 + # upload artifact and additional files to google storage + gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 + gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 + gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 - echo - echo "--------------------------------------------------------" - echo "Done!" - echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" + echo + echo "--------------------------------------------------------" + echo "Done!" + echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" +# yamllint enable rule:line-length - builder: name: 'builder-onosfw-helloworld' builders: - - shell: | - #!/bin/bash - echo "Hello world!" + - shell: | + #!/bin/bash + echo "Hello world!" diff --git a/jjb/openretriever/openretriever-project.yml b/jjb/openretriever/openretriever-project.yml deleted file mode 100644 index 3bcfab6d3..000000000 --- a/jjb/openretriever/openretriever-project.yml +++ /dev/null @@ -1,63 +0,0 @@ -################################################### -# 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}' - disable-strict-forbidden-file-verification: 'true' - 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 index 596d3771f..5d7526bba 100644 --- a/jjb/opera/opera-daily-jobs.yml +++ b/jjb/opera/opera-daily-jobs.yml @@ -1,31 +1,32 @@ +--- - project: name: 'opera-daily-jobs' project: 'opera' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - disabled: false + stream: master + branch: '{stream}' + gs-pathname: '' + disabled: false -##################################### -# pod definitions -##################################### + ##################################### + # pod definitions + ##################################### pod: - - virtual: - slave-label: 'huawei-virtual7' - os-version: 'xenial' - <<: *master + - virtual: + slave-label: 'huawei-virtual7' + os-version: 'xenial' + <<: *master -##################################### -# jobs -##################################### + ##################################### + # jobs + ##################################### jobs: - - 'opera-{pod}-daily-{stream}' + - 'opera-{pod}-daily-{stream}' ##################################### # job templates @@ -40,59 +41,59 @@ concurrent: false properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' scm: - - git-scm + - git-scm wrappers: - - ssh-agent-wrapper - - - timeout: - timeout: 240 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 240 + fail: true triggers: - - timed: '@midnight' + - timed: '@midnight' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: DEPLOY_SCENARIO - default: os-nosdn-openo-ha - - '{slave-label}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DEPLOY_SCENARIO + default: os-nosdn-openo-ha + - '{slave-label}-defaults' builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: deploy - condition: SUCCESSFUL - projects: - - name: 'compass-deploy-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-nosdn-openo-ha - COMPASS_OS_VERSION=xenial - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - - multijob: - name: functest - condition: SUCCESSFUL - projects: - - name: 'functest-compass-{pod}-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=os-nosdn-openo-ha - FUNCTEST_SUITE_NAME=opera_vims - node-parameters: true - kill-phase-on: NEVER - abort-all-job: true + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'compass-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openo-ha + COMPASS_OS_VERSION=xenial + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'functest-compass-{pod}-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openo-ha + FUNCTEST_MODE=testcase + FUNCTEST_SUITE_NAME=opera_vims + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true diff --git a/jjb/opera/opera-project-jobs.yml b/jjb/opera/opera-project-jobs.yml index 38efbc159..f866342a4 100644 --- a/jjb/opera/opera-project-jobs.yml +++ b/jjb/opera/opera-project-jobs.yml @@ -1,3 +1,4 @@ +--- - project: name: opera-project @@ -5,12 +6,12 @@ project: 'opera' stream: - - master: - branch: '{stream}' - gs-pathname: '' + - master: + branch: '{stream}' + gs-pathname: '' jobs: - - 'opera-build-{stream}' + - 'opera-build-{stream}' ######################## # job templates @@ -21,27 +22,27 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' + - 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' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm triggers: - - timed: 'H 23 * * *' + - timed: 'H 23 * * *' builders: - - 'opera-build-macro' + - 'opera-build-macro' ##################################### # builder macros @@ -49,9 +50,7 @@ - builder: name: 'opera-build-macro' builders: - - shell: | - #!/bin/bash - - echo "Hello world!" - + - shell: | + #!/bin/bash + echo "Hello world!" diff --git a/jjb/opera/opera-verify-jobs.yml b/jjb/opera/opera-verify-jobs.yml index 4da41d8d9..ad93d4653 100644 --- a/jjb/opera/opera-verify-jobs.yml +++ b/jjb/opera/opera-verify-jobs.yml @@ -1,30 +1,31 @@ +--- - project: name: 'opera-verify-jobs' project: 'opera' -##################################### -# branch definitions -##################################### + ##################################### + # branch definitions + ##################################### stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - -##################################### -# patch verification phases -##################################### + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + ##################################### + # patch verification phases + ##################################### phase: - - 'basic' - - 'deploy' + - 'basic' + - 'deploy' -##################################### -# jobs -##################################### + ##################################### + # jobs + ##################################### jobs: - - 'opera-verify-{stream}' - - 'opera-verify-{phase}-{stream}' + - 'opera-verify-{stream}' + - 'opera-verify-{phase}-{stream}' ##################################### # job templates ##################################### @@ -38,77 +39,77 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 1 - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 120 - fail: true + - 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: '**/*' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - readable-message: true + - 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: '**/*' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'huawei-pod7-defaults' + - 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 + - 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}' @@ -118,25 +119,25 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-per-node: 1 + option: 'project' scm: - - git-scm-gerrit + - git-scm-gerrit wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 120 - fail: true + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' ##################################### # builder macros @@ -144,14 +145,13 @@ - builder: name: 'opera-verify-basic-macro' builders: - - shell: | - #!/bin/bash - echo "Hello world!" + - shell: | + #!/bin/bash + echo "Hello world!" - builder: name: 'opera-verify-deploy-macro' builders: - - shell: | - #!/bin/bash - echo "Hello world!" - + - shell: | + #!/bin/bash + echo "Hello world!" diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index 864626b06..f81feab22 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -1,14 +1,15 @@ +--- - project: name: docs-rtd jobs: - - 'docs-merge-rtd-{stream}' - - 'docs-verify-rtd-{stream}' + - 'docs-merge-rtd-{stream}' + - 'docs-verify-rtd-{stream}' stream: - - master: - branch: 'master' - - danube: - branch: 'stable/{stream}' + - master: + branch: 'master' + - danube: + branch: 'stable/{stream}' project: 'opnfvdocs' rtdproject: 'opnfv' @@ -20,28 +21,28 @@ project-type: freestyle parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build1' - description: 'Slave label on Jenkins' - - project-parameter: - project: '{project}' - branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'lf-build1' + description: 'Slave label on Jenkins' + - project-parameter: + project: '{project}' + branch: '{branch}' triggers: - - gerrit-trigger-change-merged: - project: '**' - branch: '{branch}' - files: 'docs/**/*.*' + - gerrit-trigger-change-merged: + project: '**' + branch: '{branch}' + files: 'docs/**/*.*' builders: - - shell: | - if [ $GERRIT_BRANCH == "master" ]; then - RTD_BUILD_VERSION=latest - else - RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}} - fi - curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo + - shell: | + if [ $GERRIT_BRANCH == "master" ]; then + RTD_BUILD_VERSION=latest + else + RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}} + fi + curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo - job-template: @@ -50,42 +51,43 @@ project-type: freestyle parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build2' - description: 'Slave label on Jenkins' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/opnfvdocs - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'lf-build2' + description: 'Slave label on Jenkins' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/opnfvdocs + description: 'Git URL to use on this Jenkins Slave' + scm: - - git-scm-with-submodules: - branch: '{branch}' + - git-scm-with-submodules: + branch: '{branch}' triggers: - - gerrit-trigger-patchset-created: - server: 'gerrit.opnfv.org' - project: '**' - branch: '{branch}' - files: 'docs/**/*.*' - - timed: 'H H * * *' + - gerrit-trigger-patchset-created: + server: 'gerrit.opnfv.org' + project: '**' + branch: '{branch}' + files: 'docs/**/*.*' + - timed: 'H H * * *' builders: - - shell: | - if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then - cd docs/submodules/$GERRIT_PROJECT - git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD - else - git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD - fi - - shell: | - sudo pip install virtualenv - virtualenv $WORKSPACE/venv - . $WORKSPACE/venv/bin/activate - pip install --upgrade pip - pip freeze - pip install tox - tox -edocs + - shell: | + if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then + cd docs/submodules/$GERRIT_PROJECT + git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD + else + git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD + fi + - shell: | + sudo pip install virtualenv + virtualenv $WORKSPACE/venv + . $WORKSPACE/venv/bin/activate + pip install --upgrade pip + pip freeze + pip install tox + tox -edocs diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index fc825ff64..95bc8a9dd 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -1,3 +1,4 @@ +--- ######################## # Job configuration for opnfvdocs ######################## @@ -8,19 +9,19 @@ project: '{name}' jobs: - - 'opnfvdocs-verify-shellcheck-{stream}' - - 'opnfvdocs-merge-shellcheck-{stream}' - - 'opnfvdocs-daily-{stream}' + - 'opnfvdocs-verify-shellcheck-{stream}' + - 'opnfvdocs-merge-shellcheck-{stream}' + - 'opnfvdocs-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false ######################## # job templates @@ -32,44 +33,44 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - string: + name: GIT_CLONE_BASE + default: ssh://gerrit.opnfv.org:29418 + description: "Used for overriding the GIT URL coming from parameters macro." scm: - - git-scm-gerrit + - 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: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true + - 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: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true builders: - - check-bash-syntax + - check-bash-syntax - job-template: name: 'opnfvdocs-merge-shellcheck-{stream}' @@ -77,37 +78,37 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - string: + name: GIT_CLONE_BASE + default: ssh://gerrit.opnfv.org:29418 + description: "Used for overriding the GIT URL coming from parameters macro." + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm + - git-scm triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'REG_EXP' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'REG_EXP' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' builders: - - check-bash-syntax + - check-bash-syntax - job-template: name: 'opnfvdocs-daily-{stream}' @@ -115,24 +116,24 @@ disabled: true parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GIT_CLONE_BASE + default: ssh://gerrit.opnfv.org:29418 + description: "Used for overriding the GIT URL coming from parameters macro." scm: - - git-scm + - git-scm triggers: - - timed: '0 H/6 * * *' + - timed: '0 H/6 * * *' builders: - - build-html-and-pdf-docs-output -# - upload-generated-docs-to-opnfv-artifacts + - 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 1ea05c1d4..0722b4036 100644 --- a/jjb/opnfvdocs/project.cfg +++ b/jjb/opnfvdocs/project.cfg @@ -5,6 +5,7 @@ bottlenecks compass4nfv copper conductor +container4nfv daisy doctor domino @@ -24,7 +25,6 @@ movie multisite octopus onosfw -openretriever ovno ovsnfv parser diff --git a/jjb/orchestra/orchestra-daily-jobs.yml b/jjb/orchestra/orchestra-daily-jobs.yml new file mode 100644 index 000000000..7c2deaec4 --- /dev/null +++ b/jjb/orchestra/orchestra-daily-jobs.yml @@ -0,0 +1,100 @@ +--- +################################### +# job configuration for orchestra +################################### +- project: + name: 'orchestra-daily-jobs' + + project: 'orchestra' + + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + disabled: false + + # ------------------------------------------------------ + # POD, INSTALLER, AND BRANCH MAPPING + # ------------------------------------------------------ + pod: + - virtual: + slave-label: 'joid-virtual' + os-version: 'xenial' + <<: *master + + jobs: + - 'orchestra-{pod}-daily-{stream}' + +################################ +# job template +################################ +- job-template: + name: 'orchestra-{pod}-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: '@daily' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DEPLOY_SCENARIO + default: os-nosdn-openbaton-ha + - '{slave-label}-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'joid-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openbaton-ha + COMPASS_OS_VERSION=xenial + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'functest-joid-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openbaton-ha + FUNCTEST_MODE=testcase + FUNCTEST_SUITE_NAME=orchestra_ims + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true diff --git a/jjb/orchestra/orchestra-project-jobs.yml b/jjb/orchestra/orchestra-project-jobs.yml new file mode 100644 index 000000000..60732ce03 --- /dev/null +++ b/jjb/orchestra/orchestra-project-jobs.yml @@ -0,0 +1,49 @@ +--- +- project: + + name: orchestra-project + + project: 'orchestra' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + + jobs: + - 'orchestra-build-{stream}' + +- job-template: + name: 'orchestra-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}' + + scm: + - git-scm + + triggers: + - timed: 'H 23 * * *' + + builders: + - 'orchestra-build-macro' + +- builder: + name: 'orchestra-build-macro' + builders: + - shell: | + #!/bin/bash + + echo "Hello world!" diff --git a/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml b/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml new file mode 100644 index 000000000..ca4cfeede --- /dev/null +++ b/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml @@ -0,0 +1,88 @@ +--- +- project: + name: 'ovn4nfv-daily-jobs' + + project: 'ovn4nfv' + + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + disabled: false + + pod: + - virtual: + slave-label: 'joid-virtual' + os-version: 'xenial' + <<: *master + + jobs: + - 'ovn4nfv-{pod}-daily-{stream}' + +- job-template: + name: 'ovn4nfv-{pod}-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: '@daily' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DEPLOY_SCENARIO + default: os-ovn-nofeature-noha + - '{slave-label}-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'joid-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-ovn-nofeature-noha + COMPASS_OS_VERSION=xenial + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'functest-joid-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-ovn-nofeature-ha + FUNCTEST_MODE=testcase + FUNCTEST_SUITE_NAME=ovn4nfv_test_suite + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true diff --git a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml new file mode 100644 index 000000000..b5e078ca6 --- /dev/null +++ b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml @@ -0,0 +1,56 @@ +--- +- project: + name: ovn4nfv + + project: '{name}' + + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + jobs: + - 'ovn4nfv-build-{stream}' + +- job-template: + name: 'ovn4nfv-build-{stream}' + + concurrent: true + + disabled: '{obj:disabled}' + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parametert: + - project-parameter: + project: '{project}' + branch: '{branch}' + + scm: + - git-scm + + triggers: + - timed: 'H 23 * * *' + + builders: + - 'ovn4nfv-build-macro' + +- builder: + name: 'ovn4nfv-build-macro' + builders: + - shell: | + #!/bin/bash + + echo "hello world" diff --git a/jjb/ovsnfv/ovsnfv.yml b/jjb/ovsnfv/ovsnfv.yml index 0e8c713fd..ac2c4497f 100644 --- a/jjb/ovsnfv/ovsnfv.yml +++ b/jjb/ovsnfv/ovsnfv.yml @@ -1,22 +1,23 @@ +--- - project: name: ovsnfv project: '{name}' jobs: - - 'ovsnfv-verify-{stream}' - - 'ovsnfv-merge-{stream}' - - 'ovsnfv-daily-{stream}' + - 'ovsnfv-verify-{stream}' + - 'ovsnfv-merge-{stream}' + - 'ovsnfv-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'ovsnfv-verify-{stream}' @@ -24,45 +25,45 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm-gerrit + - 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: 'build/**' - - compare-type: ANT - pattern: 'ci/**' + - 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: 'build/**' + - compare-type: ANT + pattern: 'ci/**' builders: - - build-rpms + - build-rpms - job-template: name: 'ovsnfv-merge-{stream}' @@ -70,44 +71,44 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm + - git-scm wrappers: - - timeout: - timeout: 24 - fail: true + - timeout: + timeout: 24 + 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: 'build/**' - - compare-type: ANT - pattern: 'ci/**' + - 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: 'build/**' + - compare-type: ANT + pattern: 'ci/**' builders: - - build-rpms + - build-rpms - job-template: name: 'ovsnfv-daily-{stream}' @@ -115,41 +116,42 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-centos-defaults' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-centos-defaults' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm + - git-scm wrappers: - - timeout: - timeout: 24 - fail: true + - timeout: + timeout: 24 + fail: true triggers: - - timed: '@midnight' + - timed: '@midnight' builders: - - build-rpms + - build-rpms publishers: - - email: - recipients: therbert@redhat.com mark.d.gray@intel.com billy.o.mahony@intel.com + - email: + recipients: therbert@redhat.com mark.d.gray@intel.com billy.o.mahony@intel.com + - email-jenkins-admins-on-failure - builder: name: build-rpms builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - cd $WORKSPACE/ci - ./build.sh + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + cd $WORKSPACE/ci + ./build.sh diff --git a/jjb/parser/parser.yml b/jjb/parser/parser.yml index 35e97c3b3..87544196a 100644 --- a/jjb/parser/parser.yml +++ b/jjb/parser/parser.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'parser-verify-{stream}' + - 'parser-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'parser-verify-{stream}' @@ -26,52 +27,52 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - - compare-type: ANT - pattern: 'governance/**' - - compare-type: ANT - pattern: '*.txt|.gitignore|.gitreview|INFO|LICENSE' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: 'governance/**' + - compare-type: ANT + pattern: '*.txt|.gitignore|.gitreview|INFO|LICENSE' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ - # ut and pep8 check parser/tosca2heat - echo "Running tox on tosca2heat/tosca-parser ..." - cd $WORKSPACE/tosca2heat/tosca-parser && tox - echo "Running tox on tosca2heat/heat-translator ..." - cd $WORKSPACE/tosca2heat/heat-translator && tox + # ut and pep8 check parser/tosca2heat + echo "Running tox on tosca2heat/tosca-parser ..." + cd $WORKSPACE/tosca2heat/tosca-parser && tox + echo "Running tox on tosca2heat/heat-translator ..." + cd $WORKSPACE/tosca2heat/heat-translator && tox diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 12ae5cabe..0c104c0c0 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'pharos-verify-{stream}' + - 'pharos-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'pharos-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/prediction/prediction.yml b/jjb/prediction/prediction.yml index a153a9bb0..5e6e834e8 100644 --- a/jjb/prediction/prediction.yml +++ b/jjb/prediction/prediction.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'prediction-verify-{stream}' + - 'prediction-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'prediction-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/promise/promise.yml b/jjb/promise/promise.yml index eeace5f78..3f1d9e23b 100644 --- a/jjb/promise/promise.yml +++ b/jjb/promise/promise.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'promise-verify-{stream}' + - 'promise-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'promise-verify-{stream}' @@ -26,38 +27,38 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/qtip/helpers/cleanup-deploy.sh b/jjb/qtip/helpers/cleanup-deploy.sh deleted file mode 100644 index 9cb19a583..000000000 --- a/jjb/qtip/helpers/cleanup-deploy.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2016 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 -############################################################################## -# Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG") ]]; then - echo "Removing existing opnfv/qtip containers..." - # workaround: sometimes it throws an error when stopping qtip container. - # To make sure ci job unblocked, remove qtip container by force without stopping it. - docker rm -f $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG" | awk '{print $1}') -fi - -# Remove existing images if exist -if [[ $(docker images opnfv/qtip:${DOCKER_TAG} | wc -l) -gt 1 ]]; then - echo "Removing docker image opnfv/qtip:$DOCKER_TAG..." - docker rmi opnfv/qtip:$DOCKER_TAG -fi diff --git a/jjb/qtip/helpers/validate-deploy.sh b/jjb/qtip/helpers/validate-deploy.sh deleted file mode 100644 index af8f8c200..000000000 --- a/jjb/qtip/helpers/validate-deploy.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/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 - -echo "--------------------------------------------------------" -echo "POD: $NODE_NAME" -echo "Scenario: $DEPLOY_SCENARIO" -echo "INSTALLER: $INSTALLER_TYPE" -echo "INSTALLER_IP: $INSTALLER_IP" -echo "--------------------------------------------------------" - -echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}" -docker pull opnfv/qtip:$DOCKER_TAG >/dev/null - -envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} --e POD_NAME=${NODE_NAME} -e SCENARIO=${DEPLOY_SCENARIO}" - -cmd=" docker run -id -e $envs opnfv/qtip:${DOCKER_TAG} /bin/bash" -echo "Qtip: Running docker command: ${cmd}" -${cmd} - -container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1) -if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then - echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..." - exit 1 -fi - -echo "The container ID is: ${container_id}" -QTIP_REPO=/home/opnfv/repos/qtip - -docker exec -t ${container_id} bash -c "bash ${QTIP_REPO}/tests/ci/run_ci.sh" - -echo "Qtip done!" -exit 0
\ No newline at end of file diff --git a/jjb/qtip/helpers/validate-setup.sh b/jjb/qtip/helpers/validate-setup.sh deleted file mode 100644 index 8d84e120c..000000000 --- a/jjb/qtip/helpers/validate-setup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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-experimental-jobs.yml b/jjb/qtip/qtip-experimental-jobs.yml new file mode 100644 index 000000000..4c336d1d5 --- /dev/null +++ b/jjb/qtip/qtip-experimental-jobs.yml @@ -0,0 +1,49 @@ +--- +########################################### +# Experimental jobs for development purpose +########################################### + +- project: + name: qtip-experimental-jobs + project: qtip + jobs: + - 'qtip-experimental-{stream}' + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +################################ +## job templates +################################# + +- job-template: + name: 'qtip-experimental-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + # Pin the tests on zte-pod4 with apex deployment + - apex-defaults + - zte-pod4-defaults + scm: + - git-scm-gerrit + + triggers: + - experimental: + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - shell: | + #!/bin/bash + source tests/ci/experimental.sh diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml index 9f1ccecaf..cd77d0a09 100644 --- a/jjb/qtip/qtip-validate-jobs.yml +++ b/jjb/qtip/qtip-validate-jobs.yml @@ -1,3 +1,4 @@ +--- ####################### # validate after MERGE ####################### @@ -5,108 +6,132 @@ name: qtip project: qtip -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- + # ------------------------------- + # BRANCH ANCHORS + # ------------------------------- master: &master - stream: master - branch: '{stream}' - gs-pathname: '' - docker-tag: latest - -#-------------------------------- -# JOB VARIABLES -#-------------------------------- - pod: - - zte-pod1: - installer: fuel - scenario: os-odl_l2-nofeature-ha - <<: *master - - zte-pod3: - installer: fuel - scenario: os-nosdn-kvm-ha - <<: *master - -#-------------------------------- -# JOB LIST -#-------------------------------- + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: latest + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '{stream}' + docker-tag: 'stable' + + # ------------------------------- + # JOB VARIABLES + # ------------------------------- + qpi: + - compute: + installer: apex + pod: zte-pod4 + <<: *master + - storage: + installer: apex + pod: zte-pod4 + <<: *master + - compute: + installer: apex + pod: zte-pod4 + <<: *euphrates + - storage: + installer: apex + pod: zte-pod4 + <<: *euphrates + + # ------------------------------- + # JOB LIST + # ------------------------------- jobs: - - 'qtip-{scenario}-{pod}-daily-{stream}' + - 'qtip-{qpi}-{installer}-{stream}' ################################ # job templates ################################ - job-template: - name: 'qtip-{scenario}-{pod}-daily-{stream}' + name: 'qtip-{qpi}-{installer}-{stream}' disabled: false + parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{pod}-defaults' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: - name: CI_DEBUG - default: 'false' - description: "Show debug output information" + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{pod}-defaults' + - string: + name: DEPLOY_SCENARIO + default: generic + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + - string: + name: CI_DEBUG + default: 'false' + description: "Show debug output information" + - string: + name: TEST_SUITE + default: '{qpi}' + - string: + name: TESTAPI_URL + default: 'http://testresults.opnfv.org/test/api/v1' + - string: + name: OPNFV_RELEASE + default: '{stream}' scm: - - git-scm + - git-scm + + wrappers: + - timeout: + elastic-percentage: 150 + elastic-default-timeout: 30 + abort: true + type: elastic + - timestamps + triggers: - - 'qtip-{scenario}-{pod}-daily-{stream}-trigger' + - 'qtip-daily' + builders: - - description-setter: - description: "POD: $NODE_NAME" - - qtip-validate-deploy + - description-setter: + description: "POD: $NODE_NAME" + - shell: | + #!/bin/bash + source tests/ci/periodic.sh + publishers: - - qtip-common-publishers + - qtip-common-publishers + - email-jenkins-admins-on-failure ################ # MARCOS ################ -#--------- +# -------- # builder -#--------- -- builder: - name: qtip-validate-deploy - builders: - - shell: - !include-raw: ./helpers/cleanup-deploy.sh - - shell: - !include-raw: ./helpers/validate-deploy.sh - +# -------- -#----------- +# ---------- # parameter -#----------- +# ---------- -#----------- +# ---------- # publisher -#----------- +# ---------- - publisher: name: qtip-common-publishers publishers: - - email: - recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn + - email: + recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn -#--------- +# -------- # trigger -#--------- - -- trigger: - name: 'qtip-os-odl_l2-nofeature-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '0 15 * * *' +# -------- - trigger: - name: 'qtip-os-nosdn-kvm-ha-zte-pod3-daily-master-trigger' + name: 'qtip-daily' triggers: - - timed: '0 15 * * *' + - timed: '0 15 * * *' diff --git a/jjb/qtip/qtip-verify-jobs.yml b/jjb/qtip/qtip-verify-jobs.yml index 57d24b432..047d7f2be 100644 --- a/jjb/qtip/qtip-verify-jobs.yml +++ b/jjb/qtip/qtip-verify-jobs.yml @@ -1,3 +1,4 @@ +--- ###################### # verify before MERGE ###################### @@ -6,18 +7,18 @@ name: qtip-verify-jobs project: qtip jobs: - - 'qtip-verify-{stream}' - - 'qtip-review-notebook-{stream}' - - 'qtip-merge-{stream}' + - 'qtip-verify-{stream}' + - 'qtip-verify-notebook-{stream}' + - 'qtip-merged-notebook-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false ################################ ## job templates @@ -28,125 +29,127 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - qtip-unit-tests-and-docs-build + - qtip-unit-tests-and-docs-build publishers: - - publish-coverage + - publish-coverage + - email-jenkins-admins-on-failure # upload juypter notebook to artifacts for review - job-template: - name: 'qtip-review-notebook-{stream}' + name: 'qtip-verify-notebook-{stream}' disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - file-paths: - - compare-type: ANT - pattern: 'examples/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: '**/*.ipynb' + builders: - - upload-under-review-notebooks-to-opnfv-artifacts - - report-build-result-to-gerrit + - upload-under-review-notebooks-to-opnfv-artifacts + - report-build-result-to-gerrit - job-template: - name: 'qtip-merge-{stream}' + name: 'qtip-merged-notebook-{stream}' disabled: '{obj:disabled}' parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: GERRIT_REFSPEC - default: 'refs/heads/{branch}' - description: "JJB configured GERRIT_REFSPEC parameter" + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GERRIT_REFSPEC + default: 'refs/heads/{branch}' + description: "JJB configured GERRIT_REFSPEC parameter" scm: - - git-scm + - git-scm 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: '*' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: examples/** + - 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: '*' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*ipynb' builders: - - remove-old-docs-from-opnfv-artifacts + - remove-old-docs-from-opnfv-artifacts ################################ ## job builders @@ -154,42 +157,43 @@ - builder: name: qtip-unit-tests-and-docs-build builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace - tox + tox -# modified from upload-under-review-docs-to-opnfv-artifacts in global/releng-macro.yml +# modified from upload-under-review-docs-to-opnfv-artifacts +# in global/releng-macro.yml - builder: name: upload-under-review-notebooks-to-opnfv-artifacts builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - [[ -d examples ]] || exit 0 - - echo - echo "###########################" - echo "UPLOADING DOCS UNDER REVIEW" - echo "###########################" - echo - - gs_base="artifacts.opnfv.org/$PROJECT/review" - gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" - local_path="upload/$GERRIT_CHANGE_NUMBER" - - mkdir -p upload - cp -r examples "$local_path" - gsutil -m cp -r "$local_path" "gs://$gs_base/" - - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'ipynb$' | \ - sed -e "s|^$local_path| https://nbviewer.jupyter.org/urls/$gs_path|" >> gerrit_comment.txt + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] + + echo + echo "###########################" + echo "UPLOADING DOCS UNDER REVIEW" + echo "###########################" + echo + + gs_base="artifacts.opnfv.org/$PROJECT/review" + gs_path="$gs_base/$GERRIT_CHANGE_NUMBER" + local_path="upload/$GERRIT_CHANGE_NUMBER" + + mkdir -p $local_path + + git diff HEAD~1 --name-only | grep -E ".+\.ipynb$" | xargs -I '{}' cp '{}' $local_path + gsutil -m cp -r "$local_path" "gs://$gs_base/" + + echo "Document link(s):" >> gerrit_comment.txt + find "$local_path" | grep -e 'ipynb$' | \ + sed -e "s|^$local_path| https://nbviewer.jupyter.org/url/$gs_path|" >> gerrit_comment.txt diff --git a/jjb/qtip/qtip-weekly-jobs.yml b/jjb/qtip/qtip-weekly-jobs.yml deleted file mode 100644 index 2170de7b8..000000000 --- a/jjb/qtip/qtip-weekly-jobs.yml +++ /dev/null @@ -1,107 +0,0 @@ -################# -# QTIP weekly job -################# -- project: - name: qtip-weekly - project: qtip - -#-------------------------------- -# BRANCH ANCHORS -#-------------------------------- - danube: &danube - stream: danube - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - docker-tag: 'stable' - -#-------------------------------- -# JOB VARIABLES -#-------------------------------- - pod: - - zte-pod1: - installer: fuel - scenario: os-odl_l2-nofeature-ha - <<: *danube - - zte-pod3: - installer: fuel - scenario: os-nosdn-nofeature-ha - <<: *danube - - zte-pod3: - installer: fuel - scenario: os-nosdn-kvm-ha - <<: *danube - -#-------------------------------- -# JOB LIST -#-------------------------------- - jobs: - - 'qtip-{scenario}-{pod}-weekly-{stream}' - -################################ -# job templates -################################ -- job-template: - name: 'qtip-{scenario}-{pod}-weekly-{stream}' - disabled: false - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{pod}-defaults' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: - name: CI_DEBUG - default: 'false' - description: "Show debug output information" - scm: - - git-scm - triggers: - - 'qtip-{scenario}-{pod}-weekly-{stream}-trigger' - builders: - - description-setter: - description: "POD: $NODE_NAME" - - qtip-validate-deploy-weekly - publishers: - - email: - recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn - -################ -# MARCOS -################ - -#--------- -# builder -#--------- -- builder: - name: qtip-validate-deploy-weekly - builders: - - shell: - !include-raw: ./helpers/cleanup-deploy.sh - - shell: - !include-raw: ./helpers/validate-deploy.sh - -#--------- -# trigger -#--------- - -- trigger: - name: 'qtip-os-odl_l2-nofeature-ha-zte-pod1-weekly-danube-trigger' - triggers: - - timed: '0 7 * * 0' - -- trigger: - name: 'qtip-os-nosdn-kvm-ha-zte-pod3-weekly-danube-trigger' - triggers: - - timed: '0 7 * * 0' - -- trigger: - name: 'qtip-os-nosdn-nofeature-ha-zte-pod3-weekly-danube-trigger' - triggers: - - timed: '30 0 * * 0' diff --git a/jjb/releng/automate.yml b/jjb/releng/automate.yml index 4f6044bb5..908e9a196 100644 --- a/jjb/releng/automate.yml +++ b/jjb/releng/automate.yml @@ -90,6 +90,7 @@ publishers: - publish-coverage + - email-jenkins-admins-on-failure - job-template: name: '{module}-automate-{stream}' @@ -170,6 +171,7 @@ publishers: - 'email-publisher' + - email-jenkins-admins-on-failure - job-template: name: '{module}-automate-{phase}-{stream}' @@ -235,17 +237,17 @@ name: 'testapi-automate-docker-deploy-macro' builders: - shell: | - bash ./jjb/releng/docker-deploy.sh "sudo docker run -dti -p 8082:8000 + sudo bash ./jjb/releng/docker-deploy.sh "sudo docker run -dti --name testapi -p 8082:8000 -e mongodb_url=mongodb://172.17.0.1:27017 -e base_url=http://testresults.opnfv.org/test opnfv/testapi" \ - "http://testresults.opnfv.org/test/swagger/APIs" "testapi" + "http://testresults.opnfv.org/test/" "testapi" - builder: name: 'reporting-automate-docker-deploy-macro' builders: - shell: | - bash ./jjb/releng/docker-deploy.sh "sudo docker run -itd -p 8084:8000 opnfv/reporting" \ - "http://testresults.opnfv.org/reporting2/reporting/index.html" "reporting" + sudo bash ./jjb/releng/docker-deploy.sh "sudo docker run -itd --name reporting -p 8084:8000 opnfv/reporting" \ + "http://testresults.opnfv.org/reporting/index.html" "reporting" - builder: name: mongodb-backup diff --git a/jjb/releng/docker-deploy.sh b/jjb/releng/docker-deploy.sh index 2a3e078ae..1e8357717 100644 --- a/jjb/releng/docker-deploy.sh +++ b/jjb/releng/docker-deploy.sh @@ -16,89 +16,137 @@ # specific language governing permissions and limitations * # under the License. * -# Assigning Variables + command=$1 url=$2 module=$3 -function check() { +REPO="opnfv" +latest_image=$REPO/$module:latest +old_image=$REPO/$module:old +latest_container_name=$module +old_container_name=$module"_old" +latest_container_id= +old_container_id= +new_start_container= + +function DEBUG() { + echo `date "+%Y-%m-%d %H:%M:%S.%N"` ": $1" +} - # Verify hosted +function check_connectivity() { + # check update status via test the connectivity of provide url sleep 5 cmd=`curl -s --head --request GET ${url} | grep '200 OK' > /dev/null` rc=$? - echo $rc - - if [[ $rc == 0 ]] - then + DEBUG $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/${module}:latest" | awk '{print $1}') - -echo $contId -echo "Pulling the latest image" -sudo docker pull opnfv/${module}:latest +function pull_latest_image() { + DEBUG "pull latest image $latest_image" + docker pull $latest_image +} -echo "Deleting old containers of opnfv/${module}:old" -sudo docker ps -a | grep "opnfv/${module}" | grep "old" | awk '{print $1}' | xargs -r sudo docker rm -f +function get_latest_running_container() { + latest_container_id=`docker ps -q --filter name=^/$latest_container_name$` +} -echo "Deleting old images of opnfv/${module}:latest" -sudo docker images | grep "opnfv/${module}" | grep "old" | awk '{print $3}' | xargs -r sudo docker rmi -f +function get_old_running_container() { + old_container_id=`docker ps -q --filter name=^/$old_container_name$` +} +function delete_old_image() { + DEBUG "delete old image: $old_image" + docker rmi -f $old_image +} -if [[ -z "$contId" ]] -then - echo "No running ${module} container" +function delete_old_container() { + DEBUG "delete old container: $old_container_name" + docker ps -a -q --filter name=^/$old_container_name$ | xargs docker rm -f &>/dev/null +} - echo "Removing stopped ${module} containers in the previous iterations" - sudo docker ps -f status=exited | grep "opnfv_${module}" | awk '{print $1}' | xargs -r sudo docker rm -f -else - echo $contId +function delete_latest_container() { + DEBUG "delete latest container: $module" + docker ps -a -q --filter name=^/$latest_container_name$ | xargs docker rm -f &>/dev/null +} - echo "Get the image id of the currently running conatiner" - currImgId=$(sudo docker ps | grep "$contId" | awk '{print $2}') - echo $currImgId +function delete_latest_image() { + DEBUG "delete latest image: $REPO/$module:latest" + docker rmi -f $latest_image +} - if [[ -z "$currImgId" ]] - then - echo "No image id found for the container id" - exit 1 - fi +function change_image_tag_2_old() { + DEBUG "change image tag 2 old" + docker tag $latest_image $old_image + docker rmi -f $latest_image +} - echo "Changing current image tag to old" - sudo docker tag "$currImgId" opnfv/${module}:old +function mark_latest_container_2_old() { + DEBUG "mark latest container to be old" + docker rename "$latest_container_name" "$old_container_name" +} - echo "Removing stopped ${module} containers in the previous iteration" - sudo docker ps -f status=exited | grep "opnfv_${module}" | awk '{print $1}' | xargs -r sudo docker rm -f +function stop_old_container() { + DEBUG "stop old container" + docker stop "$old_container_name" +} - echo "Renaming the running container name to opnfv_${module} as to identify it." - sudo docker rename $contId opnfv_${module} +function run_latest_image() { + new_start_container=`$command` + DEBUG "run latest image: $new_start_container" +} - echo "Stop the currently running container" - sudo docker stop $contId +get_latest_running_container +get_old_running_container + +if [[ ! -z $latest_container_id ]]; then + DEBUG "latest container is running: $latest_container_id" + delete_old_container + delete_old_image + change_image_tag_2_old + mark_latest_container_2_old + pull_latest_image + stop_old_container + run_latest_image + +elif [[ ! -z $old_container_id ]]; then + DEBUG "old container is running: $old_container_id" + delete_latest_container + delete_latest_image + pull_latest_image + stop_old_container + run_latest_image +else + DEBUG "no container is running" + delete_old_container + delete_old_image + delete_latest_container + delete_latest_image + pull_latest_image + run_latest_image fi -echo "Running a container with the new image" -$command:latest - -if check; then - echo "TestResults Module Hosted." +if check_connectivity; then + DEBUG "CONGRATS: $module update successfully" else - echo "TestResults Module Failed" - if [[ $(sudo docker images | grep "opnfv/${module}" | grep "old" | awk '{print $3}') ]]; then - echo "Running old Image" - $command:old - exit 1 + DEBUG "ATTENTION: $module update failed" + id=`docker ps -a -q --filter name=^/$old_container_name$` + if [[ ! -z $id ]]; then + DEBUG "start old container instead" + docker stop $new_start_container + docker start $id + fi + if ! check_connectivity; then + DEBUG "BIG ISSUE: no container is running normally" fi + exit 1 fi -# Echo Images and Containers -sudo docker images -sudo docker ps -a +docker images +docker ps -a diff --git a/jjb/releng/generate-job-list.sh b/jjb/releng/generate-job-list.sh new file mode 100755 index 000000000..4bf8974e4 --- /dev/null +++ b/jjb/releng/generate-job-list.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Linux Foundation 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 pipefail + +# Job Number Formatter +function JOBS { + local NUMS=$1 + if [ $NUMS == 1 ]; then + echo -n "Job" + else + echo -n "Jobs" + fi +} + +# Activiate the virtualenv so we have access to 'jenkins-jobs' +source /opt/virtualenv/jenkins-job-builder/bin/activate + +echo "> Generating list of current JJB jobs..." +jenkins-jobs -l ERROR test -r jjb -o job_output + +echo "> Generating list of previous JJB jobs..." +git checkout -b previous-commit HEAD^ +jenkins-jobs -l ERROR test -r jjb -o job_output_prev +git checkout - && git branch -d previous-commit + +echo "> Finding job changes ..." +diff -r -q job_output job_output_prev &> job_diff.txt || true + +# Only in (job_output) = NEW +# Only in (job_output_prev) = DELETED +# Files ... differ = MODIFIED + +declare -a JOBS_ADDED=($(grep 'job_output:' job_diff.txt | cut -d':' -f2- | sed 's/^[ \t]*//;s/[ \t]*$//')) +declare -a JOBS_MODIFIED=($(grep 'differ$' job_diff.txt | sed "s/Files job_output\/\(.*\) and.*/\1/g")) +declare -a JOBS_REMOVED=($(grep 'job_output_prev:' job_diff.txt | cut -d ':' -f2- | sed 's/^[ \t]*//;s/[ \t]*$//')) + +NUM_JOBS_ADDED=${#JOBS_ADDED[@]} +NUM_JOBS_MODIFIED=${#JOBS_MODIFIED[@]} +NUM_JOBS_REMOVED=${#JOBS_REMOVED[@]} + +echo "> Writing gerrit comment ..." +if [ $NUM_JOBS_ADDED -gt 0 ]; then + JOB_STRING="$(JOBS $NUM_JOBS_ADDED)" + { printf "Added %s %s:\n\n" "${NUM_JOBS_ADDED}" "$JOB_STRING"; + printf '* %s\n' "${JOBS_ADDED[@]}"; + printf "\n"; } >> gerrit_comment.txt +fi + +if [ $NUM_JOBS_MODIFIED -gt 0 ]; then + JOB_STRING="$(JOBS $NUM_JOBS_MODIFIED)" + { printf "Modified %s %s:\n\n" "${NUM_JOBS_MODIFIED}" "$JOB_STRING"; + printf '* %s\n' "${JOBS_MODIFIED[@]}"; + printf "\n"; } >> gerrit_comment.txt +fi + +if [ $NUM_JOBS_REMOVED -gt 0 ]; then + JOB_STRING="$(JOBS $NUM_JOBS_REMOVED)" + { printf "Removed %s %s:\n\n" "${NUM_JOBS_REMOVED}" "$JOB_STRING"; + printf '* %s\n' "${JOBS_REMOVED[@]}"; + printf "\n"; } >> gerrit_comment.txt +fi diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml index 417fc702c..7f2574ec4 100644 --- a/jjb/releng/opnfv-docker-arm.yml +++ b/jjb/releng/opnfv-docker-arm.yml @@ -10,40 +10,156 @@ stream: master branch: '{stream}' disabled: false - danube: &danube - stream: danube + euphrates: &euphrates + stream: euphrates branch: 'stable/{stream}' disabled: false functest-arm-receivers: &functest-arm-receivers receivers: > cristina.pauna@enea.com alexandru.avadanii@enea.com + delia.popescu@enea.com dovetail-arm-receivers: &dovetail-arm-receivers receivers: > cristina.pauna@enea.com alexandru.avadanii@enea.com alexandru.nemes@enea.com + storperf-arm-receivers: &storperf-arm-receivers + receivers: > + cristina.pauna@enea.com + alexandru.avadanii@enea.com + mark.beierl@emc.com + yardstick-arm-receivers: &yardstick-arm-receivers + receivers: > + cristina.pauna@enea.com + alexandru.avadanii@enea.com + alexandru.nemes@enea.com + catalina.focsa@enea.com + delia.popescu@enea.com other-receivers: &other-receivers receivers: '' - project: + dockerfile: "Dockerfile.aarch64" + dockerdir: "docker" + docker_repo_name: "opnfv/{project}_aarch64" + arch_tag: "" + + dockerrepo: # projects with jobs for master - 'functest': + project: 'functest' <<: *master <<: *functest-arm-receivers - 'dovetail': + project: 'dovetail' <<: *master <<: *dovetail-arm-receivers - # projects with jobs for stable + - 'storperf-master': + project: 'storperf' + dockerdir: 'docker/storperf-master' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-master' + arch_tag: 'aarch64' + <<: *master + <<: *storperf-arm-receivers + - 'storperf-graphite': + project: 'storperf' + dockerdir: 'docker/storperf-graphite' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-graphite' + arch_tag: 'aarch64' + <<: *master + <<: *storperf-arm-receivers + - 'storperf-httpfrontend': + project: 'storperf' + dockerdir: 'docker/storperf-httpfrontend' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-httpfrontend' + arch_tag: 'aarch64' + <<: *master + <<: *storperf-arm-receivers + - 'storperf-reporting': + project: 'storperf' + dockerdir: 'docker/storperf-reporting' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-reporting' + arch_tag: 'aarch64' + <<: *master + <<: *storperf-arm-receivers + - 'storperf-swaggerui': + project: 'storperf' + dockerdir: 'docker/storperf-swaggerui' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-swaggerui' + arch_tag: 'aarch64' + <<: *master + <<: *storperf-arm-receivers + - 'yardstick': + project: 'yardstick' + <<: *master + <<: *yardstick-arm-receivers + # projects with jobs for stable/euphrates + - 'functest': + project: 'functest' + <<: *euphrates + <<: *functest-arm-receivers + - 'dovetail': + project: 'dovetail' + <<: *euphrates + <<: *dovetail-arm-receivers + - 'storperf-master': + project: 'storperf' + dockerdir: 'docker/storperf-master' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-master' + arch_tag: 'aarch64' + <<: *euphrates + <<: *storperf-arm-receivers + - 'storperf-graphite': + project: 'storperf' + dockerdir: 'docker/storperf-graphite' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-graphite' + arch_tag: 'aarch64' + <<: *euphrates + <<: *storperf-arm-receivers + - 'storperf-httpfrontend': + project: 'storperf' + dockerdir: 'docker/storperf-httpfrontend' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-httpfrontend' + arch_tag: 'aarch64' + <<: *euphrates + <<: *storperf-arm-receivers + - 'storperf-reporting': + project: 'storperf' + dockerdir: 'docker/storperf-reporting' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-reporting' + arch_tag: 'aarch64' + <<: *euphrates + <<: *storperf-arm-receivers + - 'storperf-swaggerui': + project: 'storperf' + dockerdir: 'docker/storperf-swaggerui' + dockerfile: 'Dockerfile' + docker_repo_name: 'opnfv/storperf-swaggerui' + arch_tag: 'aarch64' + <<: *euphrates + <<: *storperf-arm-receivers + - 'yardstick': + project: 'yardstick' + <<: *euphrates + <<: *yardstick-arm-receivers jobs: - - '{project}-docker-build-arm-push-{stream}' + - '{dockerrepo}-docker-build-arm-push-{stream}' ######################## # job templates ######################## - job-template: - name: '{project}-docker-build-arm-push-{stream}' + name: '{dockerrepo}-docker-build-arm-push-{stream}' disabled: '{obj:disabled}' @@ -58,16 +174,29 @@ description: "To enable/disable pushing the image to Dockerhub." - string: name: DOCKER_REPO_NAME - default: "opnfv/{project}_aarch64" + default: "{docker_repo_name}" 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: DOCKER_DIR + default: "{dockerdir}" + description: "Directory containing files needed by the Dockerfile" + - string: name: DOCKERFILE - default: "Dockerfile.aarch64" + default: "{dockerfile}" description: "Dockerfile to use for creating the image." + - string: + name: ARCH_TAG + default: "{arch_tag}" + description: "If set, this value will be added to the docker image tag" + + properties: + - throttle: + max-per-node: 1 + option: 'project' scm: - git-scm @@ -83,3 +212,4 @@ publishers: - email: recipients: '{receivers}' + - email-jenkins-admins-on-failure diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index ebd0c9f3d..298d2af51 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -18,8 +18,8 @@ echo "--------------------------------------------------------" echo count=30 # docker build jobs might take up to ~30 min -while [[ -n `ps -ef|grep 'docker build'|grep -v grep` ]]; do - echo "Build in progress. Waiting..." +while [[ -n `ps -ef| grep 'docker build' | grep $DOCKER_REPO_NAME | grep -v grep` ]]; do + echo "Build or cleanup of $DOCKER_REPO_NAME in progress. Waiting..." sleep 60 count=$(( $count - 1 )) if [ $count -eq 0 ]; then @@ -54,7 +54,7 @@ if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then done fi -cd $WORKSPACE/docker +cd $WORKSPACE/$DOCKER_DIR HOST_ARCH=$(uname -m) if [ ! -f "${DOCKERFILE}" ]; then # If this is expected to be a Dockerfile for other arch than x86 @@ -89,11 +89,19 @@ if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then BUILD_BRANCH=$COMMIT_ID fi +ARCH_BUILD_ARG="" +ARCH_TAG=${ARCH_TAG:-} +if [[ -n "${ARCH_TAG}" ]]; then + DOCKER_TAG=${ARCH_TAG}-${DOCKER_TAG} + ARCH_BUILD_ARG="--build-arg ARCH=${ARCH_TAG}" +fi + # Start the build echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" echo "--------------------------------------------------------" echo cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH + $ARCH_BUILD_ARG -f $DOCKERFILE ." echo ${cmd} diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 095ba4129..1a3db3a5f 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -14,71 +14,164 @@ stream: danube branch: 'stable/{stream}' disabled: false + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + disabled: false functest-receivers: &functest-receivers receivers: > - jose.lausuch@ericsson.com morgan.richomme@orange.com + jalausuch@suse.com morgan.richomme@orange.com cedric.ollivier@orange.com feng.xiaowei@zte.com.cn - yaohelan@huawei.com helanyao@gmail.com - juha.kosonen@nokia.com + juha.kosonen@nokia.com wangwulin@huawei.com + storperf-receivers: &storperf-receivers + receivers: > + mark.beierl@emc.com other-receivers: &other-receivers receivers: '' - project: + dockerfile: "Dockerfile" + dockerdir: "docker" + arch_tag: "" + + # This is the dockerhub repo the image will be pushed to as + # 'opnfv/{dockerrepo}. See: DOCKER_REPO_NAME parameter. + # 'project' is the OPNFV repo we expect to contain the Dockerfile + dockerrepo: # projects with jobs for master - 'releng-anteater': + project: 'releng-anteater' <<: *master <<: *other-receivers - 'bottlenecks': + project: 'bottlenecks' <<: *master <<: *other-receivers - 'cperf': + project: 'cperf' <<: *master <<: *other-receivers - 'dovetail': + project: 'dovetail' <<: *master <<: *other-receivers - 'functest': + project: 'functest' <<: *master <<: *functest-receivers - - 'qtip': + - 'nfvbench': + project: 'nfvbench' <<: *master <<: *other-receivers - - 'storperf': + - 'qtip': + project: 'qtip' <<: *master <<: *other-receivers + - 'storperf-master': + project: 'storperf' + dockerdir: 'docker/storperf-master' + arch_tag: 'x86_64' + <<: *master + <<: *storperf-receivers + - 'storperf-graphite': + project: 'storperf' + dockerdir: 'docker/storperf-graphite' + arch_tag: 'x86_64' + <<: *master + <<: *storperf-receivers + - 'storperf-httpfrontend': + project: 'storperf' + dockerdir: 'docker/storperf-httpfrontend' + arch_tag: 'x86_64' + <<: *master + <<: *storperf-receivers + - 'storperf-reporting': + project: 'storperf' + dockerdir: 'docker/storperf-reporting' + arch_tag: 'x86_64' + <<: *master + <<: *storperf-receivers + - 'storperf-swaggerui': + project: 'storperf' + dockerdir: 'docker/storperf-swaggerui' + arch_tag: 'x86_64' + <<: *master + <<: *storperf-receivers - 'yardstick': + project: 'yardstick' <<: *master <<: *other-receivers - # projects with jobs for stable + # projects with jobs for Danube + - 'qtip': + project: 'qtip' + <<: *euphrates + <<: *other-receivers + - 'yardstick': + project: 'yardstick' + <<: *euphrates + <<: *other-receivers + # projects with jobs for euphrates - 'bottlenecks': - <<: *danube + project: 'bottlenecks' + <<: *euphrates <<: *other-receivers - 'functest': - <<: *danube + project: 'functest' + <<: *euphrates <<: *functest-receivers - - 'qtip': - <<: *danube - <<: *other-receivers - - 'storperf': - <<: *danube - <<: *other-receivers - - 'yardstick': - <<: *danube + - 'storperf-master': + project: 'storperf' + dockerdir: 'docker/storperf-master' + arch_tag: 'x86_64' + <<: *euphrates + <<: *storperf-receivers + - 'storperf-graphite': + project: 'storperf' + dockerdir: 'docker/storperf-graphite' + arch_tag: 'x86_64' + <<: *euphrates + <<: *storperf-receivers + - 'storperf-httpfrontend': + project: 'storperf' + dockerdir: 'docker/storperf-httpfrontend' + arch_tag: 'x86_64' + <<: *euphrates + <<: *storperf-receivers + - 'storperf-reporting': + project: 'storperf' + dockerdir: 'docker/storperf-reporting' + arch_tag: 'x86_64' + <<: *euphrates + <<: *storperf-receivers + - 'storperf-swaggerui': + project: 'storperf' + dockerdir: 'docker/storperf-swaggerui' + arch_tag: 'x86_64' + <<: *euphrates + <<: *storperf-receivers + - 'nfvbench': + project: 'nfvbench' + <<: *euphrates <<: *other-receivers jobs: - - '{project}-docker-build-push-{stream}' + - "{dockerrepo}-docker-build-push-{stream}" - project: name: opnfv-monitor-docker # projects which only monitor dedicated file or path + dockerfile: "Dockerfile" + dockerdir: "docker" + arch_tag: "" + project: # projects with jobs for master - 'daisy': + dockerrepo: 'daisy' <<: *master - 'escalator': + dockerrepo: 'escalator' <<: *master jobs: @@ -88,7 +181,7 @@ # job templates ######################## - job-template: - name: '{project}-docker-build-push-{stream}' + name: '{dockerrepo}-docker-build-push-{stream}' disabled: '{obj:disabled}' @@ -103,9 +196,13 @@ description: "To enable/disable pushing the image to Dockerhub." - string: name: DOCKER_REPO_NAME - default: "opnfv/{project}" + default: "opnfv/{dockerrepo}" description: "Dockerhub repo to be pushed to." - string: + name: DOCKER_DIR + default: "{dockerdir}" + description: "Directory containing files needed by the Dockerfile" + - string: name: COMMIT_ID default: "" description: "commit id to make a snapshot docker image" @@ -115,8 +212,17 @@ description: "Release version, e.g. 1.0, 2.0, 3.0" - string: name: DOCKERFILE - default: "Dockerfile" + default: "{dockerfile}" description: "Dockerfile to use for creating the image." + - string: + name: ARCH_TAG + default: "{arch_tag}" + description: "If set, this value will be added to the docker image tag as a prefix" + + properties: + - throttle: + max-per-node: 1 + option: 'project' scm: - git-scm @@ -132,6 +238,7 @@ publishers: - email: recipients: '{receivers}' + - email-jenkins-admins-on-failure - job-template: name: '{project}-docker-build-push-monitor-{stream}' diff --git a/jjb/releng/opnfv-repo-archiver.sh b/jjb/releng/opnfv-repo-archiver.sh new file mode 100644 index 000000000..c9fdba379 --- /dev/null +++ b/jjb/releng/opnfv-repo-archiver.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Linux Foundation 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 pipefail +export PATH=$PATH:/usr/local/bin/ + +DATE="$(date +%Y%m%d)" + +declare -a PROJECT_LIST +EXCLUDE_PROJECTS="All-Projects|All-Users|securedlab" +CLONE_PATH="$WORKSPACE/opnfv-repos" + +# Generate project list from gerrit +PROJECT_LIST=($(ssh -p 29418 jenkins-ci@gerrit.opnfv.org gerrit ls-projects | egrep -v $EXCLUDE_PROJECTS)) + +echo "Cloning all OPNFV repositories" +echo "------------------------------" + +for PROJECT in "${PROJECT_LIST[@]}"; do + echo "> Cloning $PROJECT" + if [ ! -d "$CLONE_PATH/$PROJECT" ]; then + git clone "https://gerrit.opnfv.org/gerrit/$PROJECT.git" $CLONE_PATH/$PROJECT + else + pushd "$CLONE_PATH/$PROJECT" &>/dev/null + git pull -f + popd &> /dev/null + fi + + # Don't license scan kernel or qemu in kvmfornfv + if [ "$PROJECT" == "kvmfornfv" ]; then + rm -rf "$CLONE_PATH/$PROJECT/{kernel,qemu}" + fi +done + +echo "Finished cloning OPNFV repositories" +echo "-----------------------------------" + +# Copy repos and clear git data +echo "Copying repos to $WORKSPACE/opnfv-archive and removing .git files" +cp -R $CLONE_PATH $WORKSPACE/opnfv-archive +find $WORKSPACE/opnfv-archive -type d -iname '.git' -exec rm -rf {} + +find $WORKSPACE/opnfv-archive -type f -iname '.git*' -exec rm -rf {} + + +# Create archive +echo "Creating archive: opnfv-archive-$DATE.tar.gz" +echo "--------------------------------------" +cd $WORKSPACE +tar -czf "opnfv-archive-$DATE.tar.gz" opnfv-archive && rm -rf opnfv-archive +echo "Archiving Complete." + +echo "Uploading artifacts" +echo "--------------------------------------" + +gsutil cp "$WORKSPACE/opnfv-archive-$DATE.tar.gz" \ + "gs://opnfv-archive/opnfv-archive-$DATE.tar.gz" 2>&1 + +rm -f opnfv-archive-$DATE.tar.gz + +echo "Finished" diff --git a/jjb/releng/opnfv-utils.yml b/jjb/releng/opnfv-utils.yml index 717bb3cbc..721b5dede 100644 --- a/jjb/releng/opnfv-utils.yml +++ b/jjb/releng/opnfv-utils.yml @@ -4,6 +4,9 @@ jobs: - 'prune-docker-images' + - 'archive-repositories' + - 'check-status-of-slaves' + ######################## # job templates ######################## @@ -37,3 +40,50 @@ triggers: - timed: '@midnight' + +- job-template: + name: 'archive-repositories' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: Where to create the archive + default-slaves: + - master + allowed-multiselect: false + ignore-offline-nodes: true + + triggers: + - timed: '@monthly' + + builders: + - shell: + !include-raw-escape: opnfv-repo-archiver.sh + +- job-template: + name: 'check-status-of-slaves' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: We don't want workspace wiped. so I just threw the script on the master + default-slaves: + - master + allowed-multiselect: false + ignore-offline-nodes: true + + triggers: + - timed: '@midnight' + + builders: + - shell: | + cd /opt/jenkins-ci/slavemonitor + bash slave-monitor-0.1.sh | sort diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index ecc87303f..fd58ef2b8 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -3,6 +3,7 @@ jobs: - 'releng-verify-jjb' - 'releng-merge-jjb' + - 'releng-comment-jjb' - 'releng-generate-artifacts-api' project: 'releng' @@ -52,6 +53,28 @@ publishers: - archive-artifacts: artifacts: 'job_output/*' + - email-jenkins-admins-on-failure + +- job-template: + name: releng-comment-jjb + + parameters: + - project-parameter: + project: '{project}' + branch: 'master' + scm: + - git-scm-gerrit + + triggers: + - experimental: + project: '{project}' + branch: 'master' + files: 'jjb/**' + + builders: + - shell: + !include-raw-escape: generate-job-list.sh + - report-build-result-to-gerrit - job-template: name: 'releng-merge-jjb' diff --git a/jjb/releng/verify-releng.sh b/jjb/releng/verify-releng.sh index 682a8beda..a6eaa0f50 100755 --- a/jjb/releng/verify-releng.sh +++ b/jjb/releng/verify-releng.sh @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## #test for non-ascii characters, these can pass the test and end up breaking things in production -for x in $(find . -name *\.yml -or -name *\.yaml); do +for x in $(find . -name *\.yml -or -name *\.yaml -or -name *\.sh); do if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then echo "file "$x" contains non-ascii characters" diff --git a/jjb/securedlab/check-jinja2.sh b/jjb/securedlab/check-jinja2.sh deleted file mode 100755 index 4c1927d77..000000000 --- a/jjb/securedlab/check-jinja2.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set +x -set -o errexit -for lab_configs in $(find labs/ -name 'pod*.yaml'); do - while IFS= read -r jinja_templates; do - echo "./utils/generate_config.py -y $lab_configs -j $jinja_templates" - ./utils/generate_config.py -y $lab_configs -j $jinja_templates - done < <(find installers/ -name '*.j2') -done diff --git a/jjb/securedlab/check-jinja2.yml b/jjb/securedlab/check-jinja2.yml index 1e85536e7..155be175d 100644 --- a/jjb/securedlab/check-jinja2.yml +++ b/jjb/securedlab/check-jinja2.yml @@ -1,5 +1,6 @@ +--- ######################## -# Job configuration to validate jninja2 files +# Job configuration to validate jinja2 files ######################## - project: @@ -8,15 +9,15 @@ project: 'securedlab' jobs: - - 'validate-jinja2-templates-{stream}' + - 'validate-jinja2-templates-{stream}' stream: - - master: - branch: '{stream}' - disabled: false - - danube: - branch: 'stable/{stream}' - disabled: false + - master: + branch: '{stream}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + disabled: false ######################## # job templates @@ -30,51 +31,55 @@ concurrent: true parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - node: - name: SLAVE_NAME - description: Slave to execute jnija template test - default-slaves: - - lf-build1 - allowed-multiselect: true - ignore-offline-nodes: true + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - node: + name: SLAVE_NAME + description: Slave to execute jnija template test + default-slaves: + - lf-build1 + allowed-multiselect: true + ignore-offline-nodes: true scm: - - git-scm-gerrit + - 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: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'utils/generate_config.yml' - - compare-type: ANT - pattern: '**/*.jinja2' - - compare-type: ANT - pattern: '**/*.yaml' + - 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: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*.yaml' + - compare-type: ANT + pattern: 'check-jinja2.sh' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + builders: - - check-jinja + - check-jinja - builder: name: check-jinja builders: - - shell: - !include-raw-escape: ./check-jinja2.sh + - shell: | + $WORKSPACE/check-jinja2.sh diff --git a/jjb/sfc/sfc-project-jobs.yml b/jjb/sfc/sfc-project-jobs.yml new file mode 100644 index 000000000..82a2cfb5d --- /dev/null +++ b/jjb/sfc/sfc-project-jobs.yml @@ -0,0 +1,73 @@ +--- +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: sfc-project-jobs + + project: 'sfc' + + jobs: + - 'sfc-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +- job-template: + name: 'sfc-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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - sfc-unit-tests + +################################ +# job builders +################################ + +- builder: + name: sfc-unit-tests + builders: + - shell: | + cd $WORKSPACE && yamllint $(git ls-tree -r HEAD --name-only | egrep 'yml$|yaml$' | egrep -v 'scenarios') diff --git a/jjb/snaps/snaps.yml b/jjb/snaps/snaps-verify-jobs.yml index 50b7c3070..01ea3e41e 100644 --- a/jjb/snaps/snaps.yml +++ b/jjb/snaps/snaps-verify-jobs.yml @@ -15,21 +15,27 @@ branch: '{stream}' gs-pathname: '' disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'snaps-verify-{stream}' disabled: '{obj:disabled}' + concurrent: false + parameters: - project-parameter: project: '{project}' branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - string: + name: DEPLOYMENT_HOST_IP + default: 192.168.122.2 + description: 'IP of the deployment node' + - string: + name: CONTROLLER_IP + default: 192.168.122.3 + description: 'IP of the controller node' + - 'intel-virtual10-defaults' scm: - git-scm-gerrit @@ -60,4 +66,7 @@ builders: - shell: | - echo "Nothing to verify!" + #!/bin/bash + + cd $WORKSPACE/ci + ./run_tests.sh $DEPLOYMENT_HOST_IP $CONTROLLER_IP diff --git a/jjb/stor4nfv/stor4nfv-project.yml b/jjb/stor4nfv/stor4nfv-project.yml new file mode 100644 index 000000000..fc479b1a1 --- /dev/null +++ b/jjb/stor4nfv/stor4nfv-project.yml @@ -0,0 +1,64 @@ +--- +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: stor4nfv + + project: '{name}' + + jobs: + - 'stor4nfv-verify-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + +- job-template: + name: 'stor4nfv-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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - shell: | + echo "Nothing to verify!" diff --git a/jjb/storperf/storperf-daily-jobs.yml b/jjb/storperf/storperf-daily-jobs.yml new file mode 100644 index 000000000..bf04712c7 --- /dev/null +++ b/jjb/storperf/storperf-daily-jobs.yml @@ -0,0 +1,185 @@ +################################### +# job configuration for storperf +################################### +- project: + name: storperf-daily + + project: storperf + +#-------------------------------- +# BRANCH ANCHORS +#-------------------------------- + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + docker-tag: 'latest' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + docker-tag: 'stable' +#-------------------------------- +# 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: +## fuel CI PODs +# - baremetal: +# slave-label: fuel-baremetal +# installer: fuel +# <<: *master +# - virtual: +# slave-label: fuel-virtual +# installer: fuel +# <<: *master +## joid CI PODs +# - baremetal: +# slave-label: joid-baremetal +# installer: joid +# <<: *master +# - virtual: +# slave-label: joid-virtual +# installer: joid +# <<: *master +## compass CI PODs +# - baremetal: +# slave-label: compass-baremetal +# installer: compass +# <<: *master +# - virtual: +# slave-label: compass-virtual +# installer: compass +# <<: *master +## apex CI PODs +# - virtual: +# slave-label: apex-virtual-master +# installer: apex +# <<: *master + - baremetal: + slave-label: apex-baremetal-master + installer: apex + <<: *master + - baremetal: + slave-label: apex-baremetal-master + installer: apex + <<: *euphrates +## armband CI PODs +# - armband-baremetal: +# slave-label: armband-baremetal +# installer: fuel +# <<: *master +# - armband-virtual: +# slave-label: armband-virtual +# installer: fuel +# <<: *master +## daisy CI PODs +# - baremetal: +# slave-label: daisy-baremetal +# installer: daisy +# <<: *master +# - virtual: +# slave-label: daisy-virtual +# installer: daisy +# <<: *master + + jobs: + - 'storperf-{installer}-{pod}-daily-{stream}' + +################################ +# job template +################################ +- job-template: + name: 'storperf-{installer}-{pod}-daily-{stream}' + + 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: '30' + abort: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' + - string: + name: CLEAN_DOCKER_IMAGES + default: 'false' + description: 'Remove downloaded docker images (opnfv/storperf*:*)' + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where the opnfv documents will be stored in gs repository" + - string: + name: DISK_TYPE + default: 'HDD' + description: 'The type of hard disk that Cinder uses' + - string: + name: VOLUME_SIZE + default: '2' + description: 'Size of Cinder volume (in GB)' + - string: + name: WORKLOADS + default: 'rw' + description: 'Workloads to run' + - string: + name: BLOCK_SIZES + default: '16384' + description: 'Block sizes for VM I/O operations' + - string: + name: QUEUE_DEPTHS + default: '4' + description: 'Number of simultaneous I/O operations to keep active' + - string: + name: STEADY_STATE_SAMPLES + default: '10' + description: 'Number of samples to use (1 per minute) to measure steady state' + - string: + name: TEST_CASE + choices: + - 'snia_steady_state' + description: 'The test case to run' + + scm: + - git-scm + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'storperf-daily-builder' + +######################## +# builder macros +######################## +- builder: + name: storperf-daily-builder + builders: + - shell: | + #!/bin/bash + + cd $WORKSPACE + ./ci/daily.sh diff --git a/jjb/storperf/storperf-verify-jobs.yml b/jjb/storperf/storperf-verify-jobs.yml new file mode 100644 index 000000000..0b01fd1f3 --- /dev/null +++ b/jjb/storperf/storperf-verify-jobs.yml @@ -0,0 +1,195 @@ +- project: + name: storperf-verify + + project: 'storperf' + +#-------------------------------- +# branches +#-------------------------------- + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + docker-tag: 'latest' + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + docker-tag: 'stable' +#-------------------------------- +# patch verification phases +#-------------------------------- + phase: + - 'unit-test': + slave-label: 'opnfv-build-ubuntu' + - 'build-x86_64': + slave-label: 'opnfv-build-ubuntu' + - 'build-aarch64': + slave-label: 'opnfv-build-ubuntu-arm' +#-------------------------------- +# jobs +#-------------------------------- + jobs: + - 'storperf-verify-{stream}' + - 'storperf-verify-{phase}-{stream}' +#-------------------------------- +# job templates +#-------------------------------- +- job-template: + name: 'storperf-verify-{stream}' + + disabled: '{obj:disabled}' + + project-type: 'multijob' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-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}' + + builders: + - shell: | + #!/bin/bash + + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'storperf-build-and-unittest' + execution-type: PARALLEL + projects: + - name: 'storperf-verify-unit-test-{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 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'storperf-verify-build-x86_64-{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 + ARCH=x86_64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'storperf-verify-build-aarch64-{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 + ARCH=aarch64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'storperf-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 60 + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + + scm: + - git-scm-gerrit + + builders: + - 'storperf-verify-{phase}-builders-macro' + + publishers: + - 'storperf-verify-{phase}-publishers-macro' +#-------------------------------- +# builder macros +#-------------------------------- +- builder: + name: 'storperf-verify-unit-test-builders-macro' + builders: + - shell: | + $WORKSPACE/ci/verify.sh +- builder: + name: 'storperf-verify-build-x86_64-builders-macro' + builders: + - shell: | + $WORKSPACE/ci/verify-build.sh +- builder: + name: 'storperf-verify-build-aarch64-builders-macro' + builders: + - shell: | + $WORKSPACE/ci/verify-build.sh +#-------------------------------- +# publisher macros +#-------------------------------- +- publisher: + name: 'storperf-verify-unit-test-publishers-macro' + publishers: + - junit: + results: nosetests.xml + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "true" + stability-auto-update: "true" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 60 + unhealthy: 50 + failing: 40 + - method: + healthy: 60 + unhealthy: 50 + failing: 40 + - email-jenkins-admins-on-failure +- publisher: + name: 'storperf-verify-build-x86_64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure +- publisher: + name: 'storperf-verify-build-aarch64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index 13186a1ad..caae853a0 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -4,9 +4,7 @@ project: '{name}' jobs: - - 'storperf-verify-{stream}' - 'storperf-merge-{stream}' - - 'storperf-daily-{stream}' stream: - master: @@ -14,75 +12,13 @@ gs-pathname: '' disabled: false docker-tag: 'latest' - - danube: + - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false docker-tag: 'stable' - job-template: - name: 'storperf-verify-{stream}' - - disabled: '{obj:disabled}' - - node: opnfv-build-ubuntu - - parameters: - - 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 Global Jenkins configuration in case if the stuff is done on none-LF HW." - - 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}' - - builders: - - shell: | - $WORKSPACE/ci/verify.sh - - publishers: - - junit: - results: nosetests.xml - - cobertura: - report-file: "coverage.xml" - only-stable: "true" - health-auto-update: "true" - stability-auto-update: "true" - zoom-coverage-chart: "true" - targets: - - files: - healthy: 10 - unhealthy: 20 - failing: 30 - - method: - healthy: 50 - unhealthy: 40 - failing: 30 - -- job-template: name: 'storperf-merge-{stream}' node: opnfv-build-ubuntu @@ -135,75 +71,5 @@ healthy: 50 unhealthy: 40 failing: 30 - -- job-template: - name: 'storperf-daily-{stream}' - - # Job template for daily builders - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'intel-pod9-defaults' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - choice: - name: DISK_TYPE - choices: - - 'SSD' - - 'HDD' - default: 'HDD' - description: 'The type of hard disk that Cinder uses' - - string: - name: AGENT_COUNT - description: 'The number of slave agents to start. Defaults to the cinder node count' - - string: - name: VOLUME_SIZE - default: '4' - description: 'Size of Cinder volume (in GB)' - - string: - name: WORKLOADS - default: 'wr,rr,rw' - description: 'Workloads to run' - - string: - name: BLOCK_SIZES - default: '2048,16384' - description: 'Block sizes for VM I/O operations' - - string: - name: QUEUE_DEPTHS - default: '1,4' - description: 'Number of simultaneous I/O operations to keep active' - - string: - name: STEADY_STATE_SAMPLES - default: '10' - description: 'Number of samples to use (1 per minute) to measure steady state' - - string: - name: DEADLINE - description: 'Maximum run time in minutes if steady state cannot be found. Defaults to 3 times steady state samples' - - choice: - name: TEST_CASE - choices: - - 'snia_steady_state' - description: 'The test case to run' - - scm: - - git-scm - - triggers: - - timed: '0 22 * * *' - - builders: - - shell: | - $WORKSPACE/ci/daily.sh + - email-jenkins-admins-on-failure diff --git a/jjb/test-requirements.txt b/jjb/test-requirements.txt deleted file mode 100644 index 6b700dcfc..000000000 --- a/jjb/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -jenkins-job-builder diff --git a/jjb/ves/ves.yml b/jjb/ves/ves.yml index e6243f32c..d2182cbc3 100644 --- a/jjb/ves/ves.yml +++ b/jjb/ves/ves.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,17 +9,17 @@ project: '{name}' jobs: - - 'ves-verify-{stream}' + - 'ves-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'ves-verify-{stream}' @@ -26,44 +27,44 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail - # shellcheck -f tty tests/*.sh - # shellcheck -f tty utils/*.sh + # shellcheck -f tty tests/*.sh + # shellcheck -f tty utils/*.sh diff --git a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml index 450599eaf..7f21032e2 100644 --- a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml +++ b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml @@ -1,20 +1,21 @@ +--- - project: name: vnf_forwarding_graph project: '{name}' jobs: - - 'vnf_forwarding_graph-verify-{stream}' + - 'vnf_forwarding_graph-verify-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'vnf_forwarding_graph-verify-{stream}' @@ -22,32 +23,32 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' + - project-parameter: + project: '{project}' + branch: '{branch}' scm: - - git-scm-gerrit + - 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}' + - 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}' builders: - - shell: | - echo "Nothing to verify!" + - shell: | + echo "Nothing to verify!" diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index c5c81c898..bab8b24c2 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -1,3 +1,4 @@ +--- - project: name: vswitchperf @@ -5,21 +6,21 @@ project: '{name}' jobs: - - 'vswitchperf-verify-{stream}' - - 'vswitchperf-merge-{stream}' - - 'vswitchperf-daily-{stream}' + - 'vswitchperf-verify-{stream}' + - 'vswitchperf-merge-{stream}' + - 'vswitchperf-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - slave-label: 'opnfv-build-ubuntu' - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - slave-label: 'opnfv-build-ubuntu' + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + slave-label: 'opnfv-build-ubuntu' + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + slave-label: 'opnfv-build-ubuntu' - job-template: @@ -28,28 +29,28 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'intel-pod12-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'intel-pod12-defaults' scm: - - git-scm + - git-scm triggers: - - pollscm: - cron: '@midnight' + - pollscm: + cron: '@midnight' builders: - - shell: | - pwd - cd src - make clobber - make MORE_MAKE_FLAGS="-j 10" - # run basic sanity test - make sanity - cd ../ci - scl enable python33 "source ~/vsperfenv/bin/activate ; ./build-vsperf.sh daily" + - shell: | + pwd + cd src + make clobber + make MORE_MAKE_FLAGS="-j 10" + # run basic sanity test + make sanity + cd ../ci + scl enable python33 "source ~/vsperfenv/bin/activate ; ./build-vsperf.sh daily" - job-template: name: 'vswitchperf-verify-{stream}' @@ -61,57 +62,57 @@ concurrent: true properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'vswitchperf-verify-.*' - - 'vswitchperf-merge-.*' - block-level: 'NODE' + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'vswitchperf-verify-.*' + - 'vswitchperf-merge-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' scm: - - git-scm-gerrit + - 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - shell: | - pwd - cd src - make clobber - make MORE_MAKE_FLAGS="-j 5" - # run basic sanity test - make sanity - cd ../ci - ./build-vsperf.sh verify + - shell: | + pwd + cd src + make clobber + make MORE_MAKE_FLAGS="-j 5" + # run basic sanity test + make sanity + cd ../ci + ./build-vsperf.sh verify - job-template: name: 'vswitchperf-merge-{stream}' @@ -123,46 +124,46 @@ concurrent: true properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'vswitchperf-verify-.*' - - 'vswitchperf-merge-.*' - block-level: 'NODE' + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'vswitchperf-verify-.*' + - 'vswitchperf-merge-.*' + block-level: 'NODE' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' scm: - - git-scm + - git-scm 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}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - shell: | - pwd - cd src - make clobber - make MORE_MAKE_FLAGS="-j 5" - cd ../ci - ./build-vsperf.sh merge + - shell: | + pwd + cd src + make clobber + make MORE_MAKE_FLAGS="-j 5" + cd ../ci + ./build-vsperf.sh merge diff --git a/jjb/xci/bifrost-cleanup-job.yml b/jjb/xci/bifrost-cleanup-job.yml index d5a444d09..d51776173 100644 --- a/jjb/xci/bifrost-cleanup-job.yml +++ b/jjb/xci/bifrost-cleanup-job.yml @@ -1,32 +1,34 @@ +--- - project: name: 'openstack-bifrost-cleanup' -#-------------------------------- -# branches -#-------------------------------- + # ------------------------------- + # branches + # ------------------------------- stream: - - master: - branch: '{stream}' + - master: + branch: '{stream}' -#-------------------------------- -# projects -#-------------------------------- + # ------------------------------- + # projects + # ------------------------------- project: - - 'openstack': - project-repo: 'https://git.openstack.org/openstack/bifrost' - clone-location: '/opt/bifrost' - - 'opnfv': - project-repo: 'https://gerrit.opnfv.org/gerrit/releng' - clone-location: '/opt/releng' - -#-------------------------------- -# jobs -#-------------------------------- + - 'openstack': + project-repo: 'https://git.openstack.org/openstack/bifrost' + clone-location: '/opt/bifrost' + - 'opnfv': + project-repo: 'https://gerrit.opnfv.org/gerrit/releng-xci' + clone-location: '/opt/releng-xci' + + # ------------------------------- + # jobs + # ------------------------------- jobs: - - '{project}-bifrost-cleanup-{stream}' + - '{project}-bifrost-cleanup-{stream}' - job-template: name: '{project}-bifrost-cleanup-{stream}' + disabled: true concurrent: false node: bifrost-verify-virtual @@ -34,108 +36,111 @@ # Make sure no verify job is running on any of the slaves since that would # produce build logs after we wipe the destination directory. properties: - - build-blocker: - blocking-jobs: - - '{project}-bifrost-verify-*' + - build-blocker: + blocking-jobs: + - '{project}-bifrost-verify-*' parameters: - - string: - name: PROJECT - default: '{project}' + - string: + name: PROJECT + default: '{project}' builders: - - shell: | - #!/bin/bash - - set -eu - - # DO NOT change this unless you know what you are doing. - BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/" - - # This should never happen... even 'recheck' uses the last jobs' - # gerrit information. Better exit with error so we can investigate - [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1 - - echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER" - - if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then - echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid" - echo "bifrost location on the Google storage server. Please double-check" - echo "that it's set properly or fix this line if necessary." - echo "gsutil will not be executed until this is fixed!" - exit 1 - fi - try_to_rm=1 - while [[ $try_to_rm -lt 6 ]]; do - gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break - _exitcode=$? - echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)" - let try_to_rm += 1 - # Give it some time... - sleep 10 - done - exit $_exitcode + - shell: | + #!/bin/bash + + set -eu + + # DO NOT change this unless you know what you are doing. + BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/" + + # This should never happen... even 'recheck' uses the last jobs' + # gerrit information. Better exit with error so we can investigate + [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1 + + echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER" + + if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then + echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid" + echo "bifrost location on the Google storage server. Please double-check" + echo "that it's set properly or fix this line if necessary." + echo "gsutil will not be executed until this is fixed!" + exit 1 + fi + try_to_rm=1 + while [[ $try_to_rm -lt 6 ]]; do + gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break + _exitcode=$? + echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)" + let try_to_rm += 1 + # Give it some time... + sleep 10 + done + exit $_exitcode triggers: - - '{project}-gerrit-trigger-cleanup': - branch: '{branch}' + - '{project}-gerrit-trigger-cleanup': + branch: '{branch}' publishers: - - email: - recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn -#-------------------------------- + # yamllint disable rule:line-length + - email: + recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn + # yamllint enable rule:line-length + - email-jenkins-admins-on-failure +# ------------------------------- # trigger macros -#-------------------------------- +# ------------------------------- - trigger: name: 'openstack-gerrit-trigger-cleanup' triggers: - - gerrit: - server-name: 'review.openstack.org' - escape-quotes: true - trigger-on: - # We only run this when the change is merged or - # abandoned since we don't need the logs anymore - - change-merged-event - - change-abandoned-event - # This is an OPNFV maintenance job. We don't want to provide - # feedback on Gerrit - silent: true - silent-start: true - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'openstack/bifrost' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'doc/**' - - compare-type: ANT - pattern: 'releasenotes/**' - disable-strict-forbidden-file-verification: 'true' - readable-message: true + - gerrit: + server-name: 'review.openstack.org' + escape-quotes: true + trigger-on: + # We only run this when the change is merged or + # abandoned since we don't need the logs anymore + - change-merged-event + - change-abandoned-event + # This is an OPNFV maintenance job. We don't want to provide + # feedback on Gerrit + silent: true + silent-start: true + projects: + - project-compare-type: 'PLAIN' + project-pattern: 'openstack/bifrost' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'doc/**' + - compare-type: ANT + pattern: 'releasenotes/**' + readable-message: true + - trigger: name: 'opnfv-gerrit-trigger-cleanup' triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - # We only run this when the change is merged or - # abandoned since we don't need the logs anymore - - change-merged-event - - change-abandoned-event - # This is an OPNFV maintenance job. We don't want to provide - # feedback on Gerrit - silent: true - silent-start: true - projects: - - project-compare-type: 'ANT' - project-pattern: 'releng' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'prototypes/bifrost/**' - readable-message: true + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + # We only run this when the change is merged or + # abandoned since we don't need the logs anymore + - change-merged-event + - change-abandoned-event + # This is an OPNFV maintenance job. We don't want to provide + # feedback on Gerrit + silent: true + silent-start: true + projects: + - project-compare-type: 'ANT' + project-pattern: 'releng-xci' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'bifrost/**' + readable-message: true diff --git a/jjb/xci/bifrost-periodic-jobs.yml b/jjb/xci/bifrost-periodic-jobs.yml index 9773cfd9e..0bca26aa5 100644 --- a/jjb/xci/bifrost-periodic-jobs.yml +++ b/jjb/xci/bifrost-periodic-jobs.yml @@ -1,68 +1,71 @@ +--- - project: - project: 'releng' + project: 'releng-xci' name: 'bifrost-periodic' -#-------------------------------- -# Branch Anchors -#-------------------------------- -# the versions stated here default to branches which then later -# on used for checking out the branches, pulling in head of the branch. + # ------------------------------- + # Branch Anchors + # ------------------------------- + # the versions stated here default to branches which then later + # on used for checking out the branches, pulling in head of the branch. master: &master - stream: master - openstack-bifrost-version: '{stream}' - opnfv-releng-version: 'master' - gs-pathname: '' + stream: master + openstack-bifrost-version: '{stream}' + opnfv-releng-version: 'master' + gs-pathname: '' ocata: &ocata - stream: ocata - openstack-bifrost-version: 'stable/{stream}' - opnfv-releng-version: 'master' - gs-pathname: '/{stream}' -#-------------------------------- -# XCI PODs -#-------------------------------- + stream: ocata + openstack-bifrost-version: 'stable/{stream}' + opnfv-releng-version: 'master' + gs-pathname: '/{stream}' + # ------------------------------- + # XCI PODs + # ------------------------------- pod: - - virtual: - <<: *master - - virtual: - <<: *ocata -#-------------------------------- -# XCI PODs -#-------------------------------- -#-------------------------------- -# Supported Distros -#-------------------------------- + - virtual: + <<: *master + - virtual: + <<: *ocata + # ------------------------------- + # XCI PODs + # ------------------------------- + # ------------------------------- + # Supported Distros + # ------------------------------- distro: - - 'xenial': - disabled: false - slave-label: xci-xenial-virtual - dib-os-release: 'xenial' - dib-os-element: 'ubuntu-minimal' - dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables' - extra-dib-elements: 'openssh-server' - - 'centos7': - disabled: true - slave-label: xci-centos7-virtual - dib-os-release: '7' - dib-os-element: 'centos7' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - - 'suse': - disabled: true - slave-label: xci-suse-virtual - dib-os-release: '42.2' - dib-os-element: 'opensuse-minimal' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' + - 'xenial': + disabled: false + slave-label: xci-xenial-virtual + dib-os-release: 'xenial' + dib-os-element: 'ubuntu-minimal' + # yamllint disable rule:line-length + dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables' + # yamllint enable rule:line-length + extra-dib-elements: 'openssh-server' + - 'centos7': + disabled: true + slave-label: xci-centos7-virtual + dib-os-release: '7' + dib-os-element: 'centos7' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' + - 'suse': + disabled: true + slave-label: xci-suse-virtual + dib-os-release: '42.3' + dib-os-element: 'opensuse-minimal' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' -#-------------------------------- -# jobs -#-------------------------------- + # ------------------------------- + # jobs + # ------------------------------- jobs: - - 'bifrost-provision-{pod}-{distro}-periodic-{stream}' + - 'bifrost-provision-{pod}-{distro}-periodic-{stream}' -#-------------------------------- +# ------------------------------- # job templates -#-------------------------------- +# ------------------------------- - job-template: name: 'bifrost-provision-{pod}-{distro}-periodic-{stream}' @@ -71,82 +74,79 @@ concurrent: false properties: - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '^xci-os.*' - - '^xci-deploy.*' - - '^xci-functest.*' - - '^bifrost-.*periodic.*' - - '^osa-.*periodic.*' - block-level: 'NODE' - - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '^xci-os.*' + - '^xci-deploy.*' + - '^xci-functest.*' + - '^bifrost-.*periodic.*' + - '^osa-.*periodic.*' + block-level: 'NODE' + - logrotate-default parameters: - - project-parameter: - project: '{project}' - branch: '{opnfv-releng-version}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - - string: - name: XCI_FLAVOR - default: 'ha' - - string: - name: OPENSTACK_BIFROST_VERSION - default: '{openstack-bifrost-version}' - - string: - name: OPNFV_RELENG_VERSION - default: '{opnfv-releng-version}' - - string: - name: DISTRO - default: '{distro}' - - string: - name: DIB_OS_RELEASE - default: '{dib-os-release}' - - string: - name: DIB_OS_ELEMENT - default: '{dib-os-element}' - - string: - name: DIB_OS_PACKAGES - default: '{dib-os-packages}' - - string: - name: EXTRA_DIB_ELEMENTS - default: '{extra-dib-elements}' - - string: - name: CLEAN_DIB_IMAGES - default: 'true' - - label: - name: SLAVE_LABEL - default: '{slave-label}' - - string: - name: ANSIBLE_VERBOSITY - default: '' - - string: - name: XCI_LOOP - default: 'periodic' + - project-parameter: + project: '{project}' + branch: '{opnfv-releng-version}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + - string: + name: XCI_FLAVOR + default: 'ha' + - string: + name: OPENSTACK_BIFROST_VERSION + default: '{openstack-bifrost-version}' + - string: + name: OPNFV_RELENG_VERSION + default: '{opnfv-releng-version}' + - string: + name: DISTRO + default: '{distro}' + - string: + name: DIB_OS_RELEASE + default: '{dib-os-release}' + - string: + name: DIB_OS_ELEMENT + default: '{dib-os-element}' + - string: + name: DIB_OS_PACKAGES + default: '{dib-os-packages}' + - string: + name: EXTRA_DIB_ELEMENTS + default: '{extra-dib-elements}' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - label: + name: SLAVE_LABEL + default: '{slave-label}' + - string: + name: XCI_LOOP + default: 'periodic' wrappers: - - fix-workspace-permissions + - fix-workspace-permissions scm: - - git-scm + - git-scm # trigger is disabled until we know which jobs we will have # and adjust stuff accordingly triggers: - - timed: '' # '@midnight' + - timed: '' # '@midnight' builders: - - description-setter: - description: "Built on $NODE_NAME - Flavor: $XCI_FLAVOR" - - 'bifrost-provision-builder' + - description-setter: + description: "Built on $NODE_NAME - Flavor: $XCI_FLAVOR" + - 'bifrost-provision-builder' -#--------------------------- +# -------------------------- # builder macros -#--------------------------- +# -------------------------- - builder: name: bifrost-provision-builder builders: - - shell: - !include-raw: ./bifrost-provision.sh + - shell: + !include-raw: ./bifrost-provision.sh diff --git a/jjb/xci/bifrost-provision.sh b/jjb/xci/bifrost-provision.sh index b37da9059..4d646a676 100755 --- a/jjb/xci/bifrost-provision.sh +++ b/jjb/xci/bifrost-provision.sh @@ -38,7 +38,7 @@ if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then fi # remove previously cloned repos -sudo /bin/rm -rf /opt/bifrost /opt/openstack-ansible /opt/releng /opt/functest +sudo /bin/rm -rf /opt/bifrost /opt/openstack-ansible /opt/releng-xci /opt/functest # Fix up permissions fix_ownership @@ -65,16 +65,16 @@ cd /opt/bifrost && sudo git checkout --quiet $OPENSTACK_BIFROST_VERSION echo "xci: using bifrost commit" git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>' -sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng /opt/releng -cd /opt/releng && sudo git checkout --quiet $OPNFV_RELENG_VERSION +sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci +cd /opt/releng-xci && sudo git checkout --quiet $OPNFV_RELENG_VERSION echo "xci: using releng commit" git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>' # source flavor vars -source "$WORKSPACE/prototypes/xci/config/${XCI_FLAVOR}-vars" +source "$WORKSPACE/xci/config/${XCI_FLAVOR}-vars" # combine opnfv and upstream scripts/playbooks -sudo /bin/cp -rf /opt/releng/prototypes/bifrost/* /opt/bifrost/ +sudo /bin/cp -rf /opt/releng-xci/bifrost/* /opt/bifrost/ # cleanup remnants of previous deployment cd /opt/bifrost diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml index 319f8eb28..5f0b6572a 100644 --- a/jjb/xci/bifrost-verify-jobs.yml +++ b/jjb/xci/bifrost-verify-jobs.yml @@ -1,57 +1,48 @@ +--- - project: name: 'openstack-bifrost-verify' -#-------------------------------- -# branches -#-------------------------------- + # ------------------------------- + # branches + # ------------------------------- stream: - - master: - branch: '{stream}' -#-------------------------------- -# projects -#-------------------------------- - project: - - 'openstack': - project-repo: 'https://git.openstack.org/openstack/bifrost' - clone-location: '$WORKSPACE/bifrost' - - 'opnfv': - project-repo: 'https://gerrit.opnfv.org/gerrit/releng' - clone-location: '$WORKSPACE/releng' -#-------------------------------- -# distros -#-------------------------------- + - master: + branch: '{stream}' + # ------------------------------- + # distros + # ------------------------------- distro: - - 'xenial': - disabled: false - dib-os-release: 'xenial' - dib-os-element: 'ubuntu-minimal' - dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl' - extra-dib-elements: 'openssh-server' - - 'centos7': - disabled: false - dib-os-release: '7' - dib-os-element: 'centos7' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - - 'suse': - disabled: false - dib-os-release: '42.2' - dib-os-element: 'opensuse-minimal' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' -#-------------------------------- -# type -#-------------------------------- + - 'xenial': + disabled: true + dib-os-release: 'xenial' + dib-os-element: 'ubuntu-minimal' + dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl' + extra-dib-elements: 'openssh-server' + - 'centos7': + disabled: true + dib-os-release: '7' + dib-os-element: 'centos-minimal' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' + - 'suse': + disabled: true + dib-os-release: '42.3' + dib-os-element: 'opensuse-minimal' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' + # ------------------------------- + # type + # ------------------------------- type: - - virtual -#-------------------------------- -# jobs -#-------------------------------- + - virtual + # ------------------------------- + # jobs + # ------------------------------- jobs: - - '{project}-bifrost-verify-{distro}-{type}-{stream}' + - 'openstack-bifrost-verify-{distro}-{type}-{stream}' -#-------------------------------- +# ------------------------------- # VM defaults -#-------------------------------- +# ------------------------------- - defaults: name: verify_vm_defaults test-vm-num-nodes: '3' @@ -62,11 +53,11 @@ vm-memory-size: '4096' vm-disk-cache: 'unsafe' -#-------------------------------- +# ------------------------------- # job templates -#-------------------------------- +# ------------------------------- - job-template: - name: '{project}-bifrost-verify-{distro}-{type}-{stream}' + name: 'openstack-bifrost-verify-{distro}-{type}-{stream}' disabled: '{obj:disabled}' @@ -75,170 +66,138 @@ concurrent: false properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '.*-bifrost-verify.*-{type}' - block-level: 'NODE' + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '.*-bifrost-verify.*-{type}' + block-level: 'NODE' parameters: - - string: - name: PROJECT - default: '{project}' - - string: - name: PROJECT_REPO - default: '{project-repo}' - - string: - name: CLONE_LOCATION - default: '{clone-location}' - - string: - name: DISTRO - default: '{distro}' - - string: - name: DIB_OS_RELEASE - default: '{dib-os-release}' - - string: - name: DIB_OS_ELEMENT - default: '{dib-os-element}' - - string: - name: EXTRA_DIB_ELEMENTS - default: '{extra-dib-elements}' - - string: - name: DIB_OS_PACKAGES - default: '{dib-os-packages}' - - string: - name: TEST_VM_NUM_NODES - default: '{test-vm-num-nodes}' - - string: - name: TEST_VM_NODE_NAMES - default: '{test-vm-node-names}' - - string: - name: VM_DOMAIN_TYPE - default: '{vm-domain-type}' - - string: - name: VM_CPU - default: '{vm-cpu}' - - string: - name: VM_DISK - default: '{vm-disk}' - - string: - name: VM_MEMORY_SIZE - default: '{vm-memory-size}' - - string: - name: VM_DISK_CACHE - default: '{vm-disk-cache}' - - string: - name: CLEAN_DIB_IMAGES - default: 'true' - - 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' - - string: - name: ANSIBLE_VERBOSITY - default: '-vvvv' - - string: - name: XCI_LOOP - default: 'verify' + - string: + name: PROJECT_REPO + default: 'https://git.openstack.org/openstack/bifrost' + - string: + name: CLONE_LOCATION + default: '$WORKSPACE/bifrost' + - string: + name: DISTRO + default: '{distro}' + - string: + name: DIB_OS_RELEASE + default: '{dib-os-release}' + - string: + name: DIB_OS_ELEMENT + default: '{dib-os-element}' + - string: + name: EXTRA_DIB_ELEMENTS + default: '{extra-dib-elements}' + - string: + name: DIB_OS_PACKAGES + default: '{dib-os-packages}' + - string: + name: TEST_VM_NUM_NODES + default: '{test-vm-num-nodes}' + - string: + name: TEST_VM_NODE_NAMES + default: '{test-vm-node-names}' + - string: + name: VM_DOMAIN_TYPE + default: '{vm-domain-type}' + - string: + name: VM_CPU + default: '{vm-cpu}' + - string: + name: VM_DISK + default: '{vm-disk}' + - string: + name: VM_MEMORY_SIZE + default: '{vm-memory-size}' + - string: + name: VM_DISK_CACHE + default: '{vm-disk-cache}' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' + - string: + name: XCI_LOOP + default: 'verify' scm: - - git: - url: '$PROJECT_REPO' - refspec: '$GERRIT_REFSPEC' - branches: - - 'origin/$BRANCH' - skip-tag: true - choosing-strategy: 'gerrit' - timeout: 10 - wipe-workspace: true + - git: + url: '$PROJECT_REPO' + refspec: '$GERRIT_REFSPEC' + branches: + - 'origin/$BRANCH' + skip-tag: true + choosing-strategy: 'gerrit' + timeout: 10 + wipe-workspace: true triggers: - - '{project}-gerrit-trigger': - branch: '{branch}' + - 'openstack-gerrit-trigger': + branch: '{branch}' builders: - - bifrost-set-name - - bifrost-build + - bifrost-set-name + - bifrost-build wrappers: - - fix-workspace-permissions + - fix-workspace-permissions + - build-timeout: + timeout: 90 publishers: - - email: - recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com -#-------------------------------- + # yamllint disable rule:line-length + - email: + recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com + # yamllint enable rule:line-length + - email-jenkins-admins-on-failure +# ------------------------------- # trigger macros -#-------------------------------- +# ------------------------------- - trigger: name: 'openstack-gerrit-trigger' triggers: - - gerrit: - server-name: 'review.openstack.org' - 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' - custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' - silent-start: true - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'openstack/bifrost' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'doc/**' - - compare-type: ANT - pattern: 'releasenotes/**' - disable-strict-forbidden-file-verification: 'true' - readable-message: true -- trigger: - name: 'opnfv-gerrit-trigger' - 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' - custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' - projects: - - project-compare-type: 'ANT' - project-pattern: 'releng' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'prototypes/bifrost/**' - readable-message: true + - gerrit: + server-name: 'review.openstack.org' + 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' + silent-start: true + projects: + - project-compare-type: 'PLAIN' + project-pattern: 'openstack/bifrost' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'doc/**' + - compare-type: ANT + pattern: 'releasenotes/**' + readable-message: true -#--------------------------- +# -------------------------- # builder macros -#--------------------------- +# -------------------------- - builder: name: bifrost-set-name builders: - - description-setter: - description: "Built on $NODE_NAME" + - description-setter: + description: "Built on $NODE_NAME" - builder: name: bifrost-build builders: - - shell: - !include-raw: ./bifrost-verify.sh + - shell: + !include-raw: ./bifrost-verify.sh diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index b522b8969..ef0730938 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -11,110 +11,19 @@ set -o errexit set -o nounset set -o pipefail -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 - echo "Not running as part of Jenkins. Handle the logs manually." - else - # Make sure cache exists - [[ ! -d ${HOME}/.cache ]] && mkdir ${HOME}/.cache - - sudo chown -R jenkins:jenkins $WORKSPACE - sudo chown -R jenkins:jenkins ${HOME}/.cache - fi -} - -function cleanup_and_upload() { - original_exit=$? - fix_ownership - upload_logs - exit $original_exit -} - -# check distro to see if we support it -if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then - echo "Distro $DISTRO is not supported!" - exit 1 -fi - -# remove previously cloned repos -/bin/rm -rf $WORKSPACE/bifrost $WORKSPACE/releng - -# Fix up permissions -fix_ownership - -# clone all the repos first and checkout the patch afterwards git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost -git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng +git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci # checkout the patch cd $CLONE_LOCATION git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD # combine opnfv and upstream scripts/playbooks -/bin/cp -rf $WORKSPACE/releng/prototypes/bifrost/* $WORKSPACE/bifrost/ - -# cleanup remnants of previous deployment -cd $WORKSPACE/bifrost -sudo -H -E ./scripts/destroy-env.sh +/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/bifrost/ +cd $WORKSPACE/releng-xci +cat > bifrost_test.sh<<EOF +cd ~/bifrost # provision 3 VMs; xcimaster, controller, and compute cd $WORKSPACE/bifrost ./scripts/bifrost-provision.sh @@ -124,3 +33,11 @@ cd $WORKSPACE/bifrost source env-vars ironic node-list sudo -H -E virsh list +EOF +chmod a+x bifrost_test.sh + +./xci/scripts/vm/start-new-vm.sh $DISTRO + +rsync -a $WORKSPACE/bifrost ${DISTRO,,}_xci_vm:~/bifrost + +ssh ${DISTRO,,}_xci_vm "cd ~/bifrost && ./bifrost_test.sh" diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml index 722b077ac..26c1575f4 100644 --- a/jjb/xci/osa-periodic-jobs.yml +++ b/jjb/xci/osa-periodic-jobs.yml @@ -1,149 +1,230 @@ +--- - project: - project: 'releng' - - name: 'os-periodic' -#-------------------------------- -# Branch Anchors -#-------------------------------- -# the versions stated here default to branches which then later -# on used for checking out the branches, pulling in head of the branch. - master: &master - stream: master - openstack-osa-version: '{stream}' - opnfv-releng-version: 'master' - gs-pathname: '' - ocata: &ocata - stream: ocata - openstack-osa-version: 'stable/{stream}' - opnfv-releng-version: 'master' - gs-pathname: '/{stream}' -#-------------------------------- -# XCI PODs -#-------------------------------- - pod: - - virtual: - <<: *master - - virtual: - <<: *ocata -#-------------------------------- -# Supported Distros -#-------------------------------- + name: 'opnfv-osa-periodic' + + project: 'releng-xci' + # ------------------------------- + # branches + # ------------------------------- + stream: + - master: + branch: '{stream}' + # ------------------------------- + # distros + # ------------------------------- distro: - - 'xenial': - disabled: false - slave-label: xci-xenial-virtual - dib-os-release: 'xenial' - dib-os-element: 'ubuntu-minimal' - dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables' - extra-dib-elements: 'openssh-server' - - 'centos7': - disabled: true - slave-label: xci-centos7-virtual - dib-os-release: '7' - dib-os-element: 'centos7' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - - 'suse': - disabled: true - slave-label: xci-suse-virtual - dib-os-release: '42.2' - dib-os-element: 'opensuse-minimal' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - -#-------------------------------- -# jobs -#-------------------------------- + - 'xenial': + disabled: false + - 'centos7': + disabled: true + - 'suse': + disabled: true + # ------------------------------- + # type + # ------------------------------- + type: + - virtual + # ------------------------------- + # phases + # ------------------------------- + phase: + - 'deploy' + - 'healthcheck' + # ------------------------------- + # jobs + # ------------------------------- jobs: - - 'osa-deploy-{pod}-{distro}-periodic-{stream}' + - 'osa-periodic-{distro}-{type}-{stream}' + - 'osa-periodic-{phase}-{type}-{stream}' -#-------------------------------- +# ------------------------------- # job templates -#-------------------------------- +# ------------------------------- - job-template: - name: 'osa-deploy-{pod}-{distro}-periodic-{stream}' + name: 'osa-periodic-{distro}-{type}-{stream}' + + project-type: multijob disabled: '{obj:disabled}' concurrent: false properties: - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '^xci-os.*' - - '^xci-deploy.*' - - '^xci-functest.*' - - '^bifrost-.*periodic.*' - - '^osa-.*periodic.*' - block-level: 'NODE' - - logrotate-default - - parameters: - - project-parameter: - project: '{project}' - branch: '{opnfv-releng-version}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - - string: - name: XCI_FLAVOR - default: 'ha' - - string: - name: OPENSTACK_OSA_VERSION - default: '{openstack-osa-version}' - - string: - name: OPNFV_RELENG_VERSION - default: '{opnfv-releng-version}' - - string: - name: DISTRO - default: '{distro}' - - string: - name: DIB_OS_RELEASE - default: '{dib-os-release}' - - string: - name: DIB_OS_ELEMENT - default: '{dib-os-element}' - - string: - name: DIB_OS_PACKAGES - default: '{dib-os-packages}' - - string: - name: EXTRA_DIB_ELEMENTS - default: '{extra-dib-elements}' - - string: - name: CLEAN_DIB_IMAGES - default: 'true' - - label: - name: SLAVE_LABEL - default: '{slave-label}' - - string: - name: ANSIBLE_VERBOSITY - default: '' - - string: - name: XCI_LOOP - default: 'periodic' + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'xci-verify-.*' + - 'bifrost-verify-.*' + - 'bifrost-periodic-.*' + - 'osa-verify-.*' + - 'osa-periodic-.*' + block-level: 'NODE' wrappers: - - fix-workspace-permissions + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions scm: - - git-scm + - git-scm-osa - # trigger is disabled until we know which jobs we will have - # and adjust stuff accordingly triggers: - - timed: '' # '@midnight' + - pollscm: + cron: "@midnight" + ignore-post-commit-hooks: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual-{distro}' builders: - - description-setter: - description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - 'osa-deploy-builder' + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'osa-periodic-deploy-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + git-revision: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: healthcheck + condition: SUCCESSFUL + projects: + - name: 'osa-periodic-healthcheck-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + node-parameters: true + kill-phase-on: NEVER + abort-all-job: false + +- job-template: + name: 'osa-periodic-{phase}-{type}-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'xci-verify-deploy-.*' + - 'xci-verify-healthcheck-.*' + - 'bifrost-verify-.*' + - 'bifrost-periodic-.*' + - 'osa-verify-deploy-.*' + - 'osa-verify-halthcheck-.*' + - 'osa-periodic-deploy-.*' + - 'osa-periodic-healthcheck-.*' + block-level: 'NODE' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual-{distro}' + - string: + name: OPENSTACK_OSA_VERSION + default: 'master' + - string: + name: DISTRO + default: 'xenial' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-noha' + - string: + name: XCI_FLAVOR + default: 'mini' + - string: + name: XCI_LOOP + default: 'periodic' + - string: + name: OPNFV_RELENG_DEV_PATH + default: $WORKSPACE/releng-xci + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: FORCE_MASTER + default: 'true' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT -#--------------------------- + scm: + - git-scm-osa + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'osa-periodic-{phase}-macro' + +# ------------------------------- # builder macros -#--------------------------- +# ------------------------------- - builder: - name: osa-deploy-builder + name: 'osa-periodic-deploy-macro' builders: - - shell: - !include-raw: ./xci-deploy.sh + - shell: | + #!/bin/bash + + # here we will + # - clone releng-xci repo as the jobs are running against openstack gerrit + # and we need to clone releng-xci ourselves to $OPNFV_RELENG_DEV_PATH + # - run sources-branch-updater.sh from osa to update/pin the role versions + # at the time this job gets triggered against osa master in case if the + # deployment succeeds and we decide to bump version used by xci + # - copy generated role versions into $OPNFV_RELENG_DEV_PATH/xci/file + # - start the deployment by executing xci-deploy.sh as usual + # + # we might also need to pin versions of openstack services as well. + + echo "Hello World!" + +- builder: + name: 'osa-periodic-healthcheck-macro' + builders: + - shell: | + #!/bin/bash + + echo "Hello World!" +# ------------------------------- +# scm macro +# ------------------------------- +- scm: + name: git-scm-osa + scm: + - git: + url: https://review.openstack.org/p/openstack/openstack-ansible.git + branches: + - master + timeout: 15 diff --git a/jjb/xci/xci-daily-jobs.yml b/jjb/xci/xci-daily-jobs.yml index 64e13d3eb..a95374933 100644 --- a/jjb/xci/xci-daily-jobs.yml +++ b/jjb/xci/xci-daily-jobs.yml @@ -1,85 +1,88 @@ -#-------------------------------- +--- +# ------------------------------- # These jobs run on a daily basis and deploy OpenStack # using the pinned versions of opnfv/releng, openstack/bifrost # and openstack/openstack-ansible. Due to this, there is no # version/branch is set/passed to jobs and instead the versions # are checked out based on what is configured. -#-------------------------------- +# ------------------------------- - project: - project: 'releng' + project: 'releng-xci' name: 'xci-daily' -#-------------------------------- -# Branch Anchors -#-------------------------------- + # ------------------------------- + # Branch Anchors + # ------------------------------- master: &master - stream: master - opnfv-releng-version: master - gs-pathname: '' - ocata: &ocata - stream: ocata - opnfv-releng-version: master - gs-pathname: '/{stream}' -#-------------------------------- -# Scenarios -#-------------------------------- + stream: master + opnfv-releng-version: master + gs-pathname: '' + # ------------------------------- + # Scenarios + # ------------------------------- scenario: - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'daily-trigger-disabled' - xci-flavor: 'ha' - - 'os-nosdn-nofeature-noha': - auto-trigger-name: 'daily-trigger-disabled' - xci-flavor: 'noha' -#-------------------------------- -# XCI PODs -#-------------------------------- + - 'os-nosdn-nofeature-ha': + auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'ha' + - 'os-nosdn-nofeature-noha': + auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'noha' + - 'os-odl-sfc-ha': + auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'ha' + - 'os-odl-sfc-noha': + auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'noha' + # ------------------------------- + # XCI PODs + # ------------------------------- pod: - - virtual: - <<: *master - - virtual: - <<: *ocata -#-------------------------------- -# Supported Distros -#-------------------------------- + - virtual: + <<: *master + # ------------------------------- + # Supported Distros + # ------------------------------- distro: - - 'xenial': - disabled: false - slave-label: xci-xenial-virtual - dib-os-release: 'xenial' - dib-os-element: 'ubuntu-minimal' - dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptabls' - extra-dib-elements: 'openssh-server' - - 'centos7': - disabled: true - slave-label: xci-centos7-virtual - dib-os-release: '7' - dib-os-element: 'centos7' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - - 'suse': - disabled: true - slave-label: xci-suse-virtual - dib-os-release: '42.2' - dib-os-element: 'opensuse-minimal' - dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' - extra-dib-elements: 'openssh-server' - -#-------------------------------- -# Phases -#-------------------------------- + - 'xenial': + disabled: false + slave-label: xci-xenial-virtual + dib-os-release: 'xenial' + dib-os-element: 'ubuntu-minimal' + # yamllint disable rule:line-length + dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptabls' + # yamllint enable rule:line-length + extra-dib-elements: 'openssh-server' + - 'centos7': + disabled: true + slave-label: xci-centos7-virtual + dib-os-release: '7' + dib-os-element: 'centos7' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' + - 'suse': + disabled: true + slave-label: xci-suse-virtual + dib-os-release: '42.3' + dib-os-element: 'opensuse-minimal' + dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' + extra-dib-elements: 'openssh-server' + + # ------------------------------- + # Phases + # ------------------------------- phase: - - 'deploy' - - 'functest' -#-------------------------------- -# jobs -#-------------------------------- + - 'deploy' + - 'functest' + # ------------------------------- + # jobs + # ------------------------------- jobs: - - 'xci-{scenario}-{pod}-{distro}-daily-{stream}' - - 'xci-{phase}-{pod}-{distro}-daily-{stream}' + - 'xci-{scenario}-{pod}-{distro}-daily-{stream}' + - 'xci-{phase}-{pod}-{distro}-daily-{stream}' -#-------------------------------- +# ------------------------------- # job templates -#-------------------------------- +# ------------------------------- - job-template: name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}' @@ -88,66 +91,69 @@ concurrent: false properties: - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '^xci-os.*' - - '^xci-deploy.*' - - '^xci-functest.*' - - '^bifrost-.*periodic.*' - - '^osa-.*periodic.*' - block-level: 'NODE' - - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '^xci-os.*' + - '^xci-deploy.*' + - '^xci-functest.*' + - '^bifrost-.*periodic.*' + - '^osa-.*periodic.*' + block-level: 'NODE' + - logrotate-default parameters: - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - string: - name: XCI_FLAVOR - default: '{xci-flavor}' - - label: - name: SLAVE_LABEL - default: '{slave-label}' - - string: - name: XCI_LOOP - default: 'daily' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + - string: + name: XCI_FLAVOR + default: '{xci-flavor}' + - label: + name: SLAVE_LABEL + default: '{slave-label}' + - string: + name: XCI_LOOP + default: 'daily' triggers: - - '{auto-trigger-name}' + - '{auto-trigger-name}' wrappers: - - fix-workspace-permissions + - fix-workspace-permissions builders: - - description-setter: - description: "Built on $NODE_NAME" - - trigger-builds: - - project: 'xci-deploy-{pod}-{distro}-daily-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - XCI_FLAVOR=$XCI_FLAVOR - XCI_LOOP=$XCI_LOOP - same-node: true - block: true - - trigger-builds: - - project: 'xci-functest-{pod}-{distro}-daily-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - XCI_FLAVOR=$XCI_FLAVOR - XCI_LOOP=$XCI_LOOP - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - description-setter: + description: "Built on $NODE_NAME" + - trigger-builds: + - project: 'xci-deploy-{pod}-{distro}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + XCI_FLAVOR=$XCI_FLAVOR + XCI_LOOP=$XCI_LOOP + same-node: true + block: true + - trigger-builds: + - project: 'xci-functest-{pod}-{distro}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + XCI_FLAVOR=$XCI_FLAVOR + XCI_LOOP=$XCI_LOOP + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' publishers: - - email: - recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com + # yamllint disable rule:line-length + - email: + recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com + # yamllint enable rule:line-length + - email-jenkins-admins-on-failure - job-template: name: 'xci-{phase}-{pod}-{distro}-daily-{stream}' @@ -157,79 +163,97 @@ concurrent: false properties: - - build-blocker: - use-build-blocker: true - blocking-jobs: - - '^xci-deploy.*' - - '^xci-functest.*' - - '^bifrost-.*periodic.*' - - '^osa-.*periodic.*' - block-level: 'NODE' - - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '^xci-deploy.*' + - '^xci-functest.*' + - '^bifrost-.*periodic.*' + - '^osa-.*periodic.*' + block-level: 'NODE' + - logrotate-default wrappers: - - fix-workspace-permissions + - fix-workspace-permissions scm: - - git-scm + - git-scm parameters: - - project-parameter: - project: '{project}' - branch: '{opnfv-releng-version}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' - - string: - name: XCI_FLAVOR - default: 'ha' - - string: - name: DISTRO - default: '{distro}' - - string: - name: DIB_OS_RELEASE - default: '{dib-os-release}' - - string: - name: DIB_OS_ELEMENT - default: '{dib-os-element}' - - string: - name: DIB_OS_PACKAGES - default: '{dib-os-packages}' - - string: - name: EXTRA_DIB_ELEMENTS - default: '{extra-dib-elements}' - - string: - name: CLEAN_DIB_IMAGES - default: 'true' - - label: - name: SLAVE_LABEL - default: '{slave-label}' - - string: - name: ANSIBLE_VERBOSITY - default: '' - - string: - name: XCI_LOOP - default: 'daily' + - project-parameter: + project: '{project}' + branch: '{opnfv-releng-version}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + - string: + name: XCI_FLAVOR + default: 'ha' + - string: + name: DISTRO + default: '{distro}' + - string: + name: DIB_OS_RELEASE + default: '{dib-os-release}' + - string: + name: DIB_OS_ELEMENT + default: '{dib-os-element}' + - string: + name: DIB_OS_PACKAGES + default: '{dib-os-packages}' + - string: + name: EXTRA_DIB_ELEMENTS + default: '{extra-dib-elements}' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - label: + name: SLAVE_LABEL + default: '{slave-label}' + - string: + name: XCI_LOOP + default: 'daily' + - string: + name: INSTALLER_TYPE + default: 'osa' + - string: + name: FUNCTEST_MODE + default: 'daily' + - string: + name: FUNCTEST_SUITE_NAME + default: 'daily' + description: "Daily suite name to run" builders: - - description-setter: - description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - 'xci-{phase}-builder' + - description-setter: + description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'xci-{phase}-builder' -#--------------------------- +# -------------------------- # builder macros -#--------------------------- +# -------------------------- - builder: name: xci-deploy-builder builders: - - shell: - !include-raw: ./xci-deploy.sh + - shell: + !include-raw: ./xci-deploy.sh - builder: name: xci-functest-builder builders: - - shell: - !include-raw: ./xci-functest.sh + - shell: | + #!/bin/bash + + echo "Hello World!" + +# this will be enabled once the xci is prepared +# - builder: +# name: xci-functest-builder +# builders: +# - shell: +# !include-raw: +# - ../../utils/fetch_os_creds.sh +# - ../functest/functest-alpine.sh diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh index 8ad637805..211d282d3 100755 --- a/jjb/xci/xci-deploy.sh +++ b/jjb/xci/xci-deploy.sh @@ -11,7 +11,7 @@ set -o errexit set -o nounset set -o pipefail -cd $WORKSPACE/prototypes/xci +cd $WORKSPACE/xci # for daily jobs, we want to use working versions # for periodic jobs, we will use whatever is set in the job, probably master @@ -53,7 +53,7 @@ if [[ "$XCI_LOOP" == "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then fi # proceed with the deployment -cd $WORKSPACE/prototypes/xci +cd $WORKSPACE/xci ./xci-deploy.sh if [[ "$JOB_NAME" =~ "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then diff --git a/jjb/xci/xci-functest.sh b/jjb/xci/xci-functest.sh deleted file mode 100755 index 0f58dfefc..000000000 --- a/jjb/xci/xci-functest.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Functional testing with functest" diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml new file mode 100644 index 000000000..62b69fe74 --- /dev/null +++ b/jjb/xci/xci-verify-jobs.yml @@ -0,0 +1,338 @@ +--- +- project: + name: 'opnfv-xci-verify' + + project: releng-xci + # ------------------------------- + # branches + # ------------------------------- + stream: + - master: + branch: '{stream}' + # ------------------------------- + # distros + # ------------------------------- + distro: + - ubuntu: + disabled: false + successful: false + failed: false + unstable: false + notbuilt: false + - centos: + disabled: false + successful: true + failed: true + unstable: true + notbuilt: true + - opensuse: + disabled: false + successful: false + failed: false + unstable: false + notbuilt: false + # ------------------------------- + # type + # ------------------------------- + type: + - virtual + # ------------------------------- + # patch verification phases + # ------------------------------- + phase: + - 'deploy' + - 'healthcheck' + # ------------------------------- + # jobs + # ------------------------------- + jobs: + - 'xci-verify-{distro}-{type}-{stream}' + - 'xci-verify-{distro}-{phase}-{type}-{stream}' +# ------------------------------- +# job templates +# ------------------------------- +- job-template: + name: 'xci-verify-{distro}-{type}-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'xci-verify-{distro}-.*' + - 'bifrost-verify-{distro}-.*' + - 'bifrost-periodic-{distro}-.*' + - 'osa-verify-{distro}-.*' + - 'osa-periodic-{distro}-.*' + block-level: 'NODE' + - throttle: + max-per-node: 2 + max-total: 10 + categories: + - xci-verify-virtual + option: category + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + 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: 'true' + - 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}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: 'bifrost/**' + - compare-type: ANT + pattern: 'xci/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'prototypes/**' + - compare-type: ANT + pattern: 'upstream/**' + - compare-type: ANT + pattern: '**/README.rst' + - compare-type: ANT + pattern: 'docs/**' + readable-message: true + skip-vote: + successful: '{obj:successful}' + failed: '{obj:failed}' + unstable: '{obj:unstable}' + notbuilt: '{obj:notbuilt}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'xci-verify-{distro}-deploy-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: healthcheck + condition: SUCCESSFUL + projects: + - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + +- job-template: + name: 'xci-verify-{distro}-{phase}-{type}-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'bifrost-verify-.*' + - 'bifrost-periodic-.*' + - 'osa-verify-.*' + - 'osa-periodic-.*' + block-level: 'NODE' + + parameters: + - string: + name: PROJECT + default: 'releng-xci' + - string: + name: DISTRO + default: 'ubuntu' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-noha' + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: XCI_FLAVOR + default: 'mini' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: OPNFV_RELENG_DEV_PATH + default: $WORKSPACE/ + - string: + name: INSTALLER_TYPE + default: 'osa' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git-scm-gerrit + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'xci-verify-{phase}-macro' + +# ------------------------------- +# builder macros +# ------------------------------- +- builder: + name: 'xci-verify-deploy-macro' + builders: + - shell: | + #!/bin/bash + + # skip the deployment if the patch doesn't impact the deployment + if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then + echo "Skipping the deployment!" + exit 0 + fi + + cd $WORKSPACE + + # The start-new-vm.sh script will copy the entire releng-xci directory + # so lets prepare the test script now so it can be copied by the script. + # Please do not move it elsewhere or you would have to move it to the VM + # yourself. + cat > xci_test.sh<<EOF + #!/bin/bash + export DISTRO=$DISTRO + export DEPLOY_SCENARIO=$DEPLOY_SCENARIO + export FUNCTEST_MODE=$FUNCTEST_MODE + export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + export XCI_FLAVOR=$XCI_FLAVOR + export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ + export INSTALLER_TYPE=$INSTALLER_TYPE + export GIT_BASE=$GIT_BASE + export JENKINS_HOME=$JENKINS_HOME + + cd xci + ./xci-deploy.sh + EOF + chmod a+x xci_test.sh + + export XCI_BUILD_CLEAN_VM_OS=false + export XCI_UPDATE_CLEAN_VM_OS=true + + ./xci/scripts/vm/start-new-vm.sh $DISTRO + - shell: | + #!/bin/bash + + # skip the deployment if the patch doesn't impact the deployment + if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the deployment!" + exit 0 + fi + + ssh ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh" + + +- builder: + name: 'xci-verify-healthcheck-macro' + builders: + - shell: | + #!/bin/bash + + # skip the healthcheck if the patch doesn't impact the deployment + if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the healthcheck!" + exit 0 + fi + + echo "Hello World!" + - shell: | + #!/bin/bash + + # skip the deployment if the patch doesn't impact the deployment + if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then + echo "Skipping the deployment!" + exit 0 + fi + + sudo virsh destroy ${DISTRO}_xci_vm + sudo virsh undefine ${DISTRO}_xci_vm + +# this will be enabled once the xci is prepared +# - builder: +# name: 'xci-verify-healthcheck-macro' +# builders: +# - shell: +# !include-raw: ../../utils/fetch_os_creds.sh +# - shell: +# !include-raw: ../functest/functest-alpine.sh diff --git a/jjb/yardstick/yardstick-cleanup.sh b/jjb/yardstick/yardstick-cleanup.sh index 51455b593..47bf9bd10 100755 --- a/jjb/yardstick/yardstick-cleanup.sh +++ b/jjb/yardstick/yardstick-cleanup.sh @@ -1,36 +1,36 @@ #!/bin/bash -[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +[[ ${CI_DEBUG} == true ]] && redirect="/dev/stdout" || redirect="/dev/null" # Remove containers along with image opnfv/yardstick*:<none> -dangling_images=($(docker images -f "dangling=true" | grep opnfv/yardstick | awk '{print $3}')) -if [[ -n ${dangling_images} ]]; then +dangling_images=($(docker images -f "dangling=true" | awk '/opnfv[/]yardstick/ {print $3}')) +if [[ ${#dangling_images[@]} -eq 0 ]] ; then echo "Removing opnfv/yardstick:<none> images and their containers..." for image_id in "${dangling_images[@]}"; do echo " Removing image_id: $image_id and its containers" - containers=$(docker ps -a | grep $image_id | awk '{print $1}') + containers=$(docker ps -a | awk "/${image_id}/ {print \$1}") if [[ -n "$containers" ]];then - docker rm -f $containers >${redirect} + docker rm -f "${containers}" >${redirect} fi - docker rmi $image_id >${redirect} + docker rmi "${image_id}" >${redirect} done fi echo "Cleaning up docker containers/images..." # Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then +if docker ps -a | grep -q opnfv/yardstick; then echo "Removing existing opnfv/yardstick containers..." - docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect + docker ps -a | awk "/${image_id}/ {print \$1}" | xargs docker rm -f >${redirect} fi # Remove existing images if exist -if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then +if docker images | grep -q opnfv/yardstick; then echo "Docker images to remove:" docker images | head -1 && docker images | grep opnfv/yardstick - image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image opnfv/yardstick:$tag..." - docker rmi opnfv/yardstick:$tag >$redirect + image_ids=($(docker images | awk '/opnfv[/]yardstick/ {print $3}')) + for id in "${image_ids[@]}"; do + echo "Removing docker image id $id..." + docker rmi "${id}" >${redirect} done fi diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index 4dcface59..4c54b735a 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -14,8 +14,8 @@ branch: '{stream}' gs-pathname: '' docker-tag: 'latest' - danube: &danube - stream: danube + euphrates: &euphrates + stream: euphrates branch: 'stable/{stream}' gs-pathname: '{stream}' docker-tag: 'stable' @@ -40,15 +40,15 @@ auto-trigger-name: 'daily-trigger-disabled' <<: *master - virtual: - slave-label: apex-virtual-danube + slave-label: apex-virtual-euphrates installer: apex auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - baremetal: - slave-label: apex-baremetal-danube + slave-label: apex-baremetal-euphrates installer: apex auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates # fuel CI PODs - baremetal: slave-label: fuel-baremetal @@ -64,12 +64,12 @@ slave-label: fuel-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - virtual: slave-label: fuel-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates # armband CI PODs - armband-baremetal: slave-label: armband-baremetal @@ -85,12 +85,12 @@ slave-label: armband-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - armband-virtual: slave-label: armband-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates # joid CI PODs - baremetal: slave-label: joid-baremetal @@ -106,12 +106,12 @@ slave-label: joid-baremetal installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - virtual: slave-label: joid-virtual installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates # compass CI PODs - baremetal: slave-label: compass-baremetal @@ -127,12 +127,12 @@ slave-label: compass-baremetal installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - virtual: slave-label: compass-virtual installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates #-------------------------------- # None-CI PODs #-------------------------------- @@ -150,7 +150,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - zte-pod2: slave-label: '{pod}' installer: fuel @@ -165,37 +165,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - arm-pod2: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-pod2: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - arm-pod3: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-pod3: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube - - arm-virtual1: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *master - - arm-virtual1: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *danube + <<: *euphrates - orange-pod2: slave-label: '{pod}' installer: joid @@ -216,6 +186,11 @@ installer: compass auto-trigger-name: 'daily-trigger-disabled' <<: *master + - flex-pod1: + slave-label: '{pod}' + installer: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *master #-------------------------------- testsuite: - 'daily' @@ -281,12 +256,14 @@ description: "POD: $NODE_NAME" - 'yardstick-cleanup' - 'yardstick-fetch-os-creds' + - 'yardstick-fetch-k8s-conf' - 'yardstick-{testsuite}' - 'yardstick-store-results' publishers: - email: recipients: jean.gaoliang@huawei.com limingjiang@huawei.com ross.b.brattain@intel.com + - email-jenkins-admins-on-failure ######################## # builder macros @@ -310,6 +287,12 @@ !include-raw: ../../utils/fetch_os_creds.sh - builder: + name: yardstick-fetch-k8s-conf + builders: + - shell: + !include-raw: ./yardstick-get-k8s-conf.sh + +- builder: name: yardstick-store-results builders: - shell: @@ -338,14 +321,14 @@ default: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-apex-virtual-danube' + name: 'yardstick-params-apex-virtual-euphrates' 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-apex-baremetal-danube' + name: 'yardstick-params-apex-baremetal-euphrates' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -380,13 +363,6 @@ default: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-arm-virtual1' - 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-joid-baremetal' parameters: - string: @@ -455,15 +431,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-arm-pod2' - 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-arm-pod3' + name: 'yardstick-params-virtual' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -471,7 +439,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-virtual' + name: 'yardstick-params-compass-virtual' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -479,7 +447,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-compass-virtual' + name: 'yardstick-params-huawei-pod3' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -487,7 +455,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-huawei-pod3' + name: 'yardstick-params-huawei-pod4' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -495,7 +463,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-huawei-pod4' + name: 'yardstick-params-flex-pod1' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -514,4 +482,4 @@ - trigger: name: 'yardstick-daily-huawei-pod4-trigger' triggers: - - timed: '0 1 * * *' + - timed: '' diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index cf37ac262..4b8c5d240 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -3,8 +3,11 @@ set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" rc_file_vol="" +cacert_file_vol="" sshkey="" +rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/etc/yardstick/openstack.creds" + if [[ ${INSTALLER_TYPE} == 'apex' ]]; then instack_mac=$(sudo virsh domiflist undercloud | grep default | \ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") @@ -18,15 +21,22 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then fi if [[ ${INSTALLER_TYPE} == 'joid' ]]; then - # If production lab then creds may be retrieved dynamically - # creds are on the jumphost, always in the same folder - rc_file_vol="-v $LAB_CONFIG/admin-openrc:/etc/yardstick/openstack.creds" - # If dev lab, credentials may not be the default ones, just provide a path to put them into docker - # replace the default one by the customized one provided by jenkins config -else - rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/etc/yardstick/openstack.creds" + if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + rc_file_vol="-v /home/ubuntu/config:/etc/yardstick/admin.conf" + else + # If production lab then creds may be retrieved dynamically + # creds are on the jumphost, always in the same folder + rc_file_vol="-v $LAB_CONFIG/admin-openrc:/etc/yardstick/openstack.creds" + # If dev lab, credentials may not be the default ones, just provide a path to put them into docker + # replace the default one by the customized one provided by jenkins config + fi +elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then + cacert_file_vol="-v ${HOME}/os_cacert:/etc/yardstick/os_cacert" + echo "export OS_CACERT=/etc/yardstick/os_cacert" >> ${HOME}/opnfv-openrc.sh +elif [[ ${INSTALLER_TYPE} == 'fuel' ]]; then + cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" + sshkey="-v ${SSH_KEY}:/root/.ssh/mcp.rsa" fi - # Set iptables rule to allow forwarding return traffic for container if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then sudo iptables -I FORWARD -j RETURN @@ -38,9 +48,17 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e YARDSTICK_BRANCH=${BRANCH} -e BRANCH=${BRANCH} \ -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" +if [[ "${INSTALLER_TYPE}" == 'fuel' ]]; then + envs+=" -e SSH_KEY=/root/.ssh/mcp.rsa" +fi + # Pull the image with correct tag -echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}" -docker pull opnfv/yardstick:$DOCKER_TAG >$redirect +DOCKER_REPO='opnfv/yardstick' +if [ "$(uname -m)" = 'aarch64' ]; then + DOCKER_REPO="${DOCKER_REPO}_$(uname -m)" +fi +echo "Yardstick: Pulling image ${DOCKER_REPO}:${DOCKER_TAG}" +docker pull ${DOCKER_REPO}:$DOCKER_TAG >$redirect # map log directory branch=${BRANCH##*/} @@ -50,8 +68,14 @@ sudo rm -rf ${dir_result}/* map_log_dir="-v ${dir_result}:/tmp/yardstick" # Run docker -cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \ +if [[ ${INSTALLER_TYPE} == "joid" && "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + juju ssh kubernetes-master/0 sudo apt-get install -y docker.io + cmd="juju ssh kubernetes-master/0 sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" +else + cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} \ exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" +fi + echo "Yardstick: Running docker cmd: ${cmd}" ${cmd} diff --git a/jjb/yardstick/yardstick-get-k8s-conf.sh b/jjb/yardstick/yardstick-get-k8s-conf.sh new file mode 100755 index 000000000..e93367f9a --- /dev/null +++ b/jjb/yardstick/yardstick-get-k8s-conf.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +dest_path="$HOME/admin.conf" + +if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + juju scp kubernetes-master/0:config "${dest_path}" +fi diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml index 643c1f932..7738aeda5 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 - - danube: + - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false |