Merge "AAA: New job for Keystone Realm"
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 15 Mar 2017 19:09:37 +0000 (19:09 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 15 Mar 2017 19:09:37 +0000 (19:09 +0000)
74 files changed:
.coafile
docs/cloud-images.rst
jenkins-scripts/create_jenkins_user.sh
jenkins-scripts/disable_firewall.sh
jenkins-scripts/docker.sh
jenkins-scripts/jenkins-init-script.sh
jjb/autorelease/autorelease-macros.yaml
jjb/autorelease/autorelease-projects.yaml
jjb/autorelease/autorelease-templates.yaml
jjb/autorelease/include-raw-autorelease-get-integration-test-variables.sh
jjb/autorelease/include-raw-autorelease-maven-deploy.sh
jjb/autorelease/include-raw-autorelease-release-versions.sh
jjb/autorelease/include-raw-generate-project-report.sh [deleted file]
jjb/docs/docs-post-rtd.sh
jjb/include-raw-check-poms.sh
jjb/include-raw-deploy-archives.sh
jjb/include-raw-generate-p2pom.sh
jjb/include-raw-stack-delete.sh
jjb/include-raw-stage-release.sh
jjb/include-raw-update-p2composite-metadata.sh
jjb/include-raw-verify-gpg-signatures.sh
jjb/integration-distribution-delete-snaphot-artifacts.sh
jjb/integration/include-raw-integration-cleanup-tmp.sh
jjb/integration/include-raw-integration-cleanup-workspace.sh
jjb/integration/include-raw-integration-deploy-controller-verify.sh
jjb/integration/include-raw-integration-install-robotframework.sh
jjb/netvirt/include-raw-cleanup-docker.sh
jjb/netvirt/include-raw-openstack-ci.sh
jjb/netvirt/include-raw-setup-docker.sh
jjb/netvirt/include-setup-hwvtep-docker.sh
jjb/netvirt/include-setup-misc.sh
jjb/neutron/include-raw-openstack-ci.sh
jjb/opendaylight-infra-cleanup-stale-stacks.sh
jjb/opendaylight-infra-copy-ssh-keys.sh
jjb/opendaylight-infra-push-gerrit-patch.sh
jjb/opendaylight-infra-stack.sh
jjb/opendaylight-infra-update-image-list.sh
jjb/opflex/include-raw-opflex-build.sh
jjb/ovsdb/include-raw-cleanup-docker.sh
jjb/ovsdb/include-raw-setup-docker.sh
jjb/ovsdb/include-setup-hwvtep-docker.sh
jjb/ovsdb/ovsdb-csit-clustering.yaml
jjb/ovsdb/ovsdb-csit-southbound.yaml
jjb/ovsdb/ovsdb-patch-test.yaml
jjb/packaging/include-raw-build-deb.sh
jjb/packaging/include-raw-build-rpm-snap.sh
jjb/packaging/include-raw-build-rpm.sh
jjb/packaging/include-raw-test-ansible-deb.sh [new file with mode: 0644]
jjb/packaging/include-raw-test-ansible-rpm.sh [new file with mode: 0644]
jjb/packaging/include-raw-test-karaf.expect [moved from jjb/packaging/include-raw-test-karaf.sh with 100% similarity]
jjb/packaging/include-raw-test-puppet.sh
jjb/packaging/packaging.yaml
jjb/releng-defaults.yaml
jjb/releng-macros.yaml
jjb/requirements.txt
packer/provision/baseline.sh
packer/provision/devstack-pre-pip.sh
packer/provision/java-builder.sh
packer/templates/baseline.json
packer/templates/devstack-pre-pip-mitaka.json
packer/templates/devstack-pre-pip-newton.json
packer/templates/devstack.json
packer/templates/docker.json
packer/templates/gbp.json
packer/templates/java-builder.json
packer/templates/mininet-ovs-2.3.json
packer/templates/mininet-ovs-2.5.json
packer/templates/mininet.json
packer/templates/robot.json
packer/vars/centos.json
packer/vars/cloud-env.json.example
packer/vars/ubuntu-14.04.json
packer/vars/ubuntu-16.04.json
yamllint.conf

index 37ed70d66ba7ded2c34a35d9a0224c45c43eeb93..8d32fd0851d96ac72c4d30720210daff815f18d8 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -1,13 +1,30 @@
-[default]
-bears = SpaceConsistencyBear,GitCommitBear
-files = scripts/*
-allow_trailing_whitespace = False
-enforce_newline_at_EOF = True
-indent_size = 4
-use_spaces = yeah
+[GitCommit]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
+    http://,
+    https://
+
+[JSON]
+bears = JSONFormatBear
+files = **/*.json
+ignore = .*/**
+indent_size = 2
 
 [YAML]
 bears = YAMLLintBear
 files = jjb/**/*.yaml,openstack-hot/**/*.yaml
 document_start = True
 yamllint_config = yamllint.conf
+
+[ShellCheck]
+bears = ShellCheckBear,SpaceConsistencyBear
+files = jenkins-scripts/**/*.sh,
+    jjb/**/*.sh,
+    scripts/**/*.sh
+ignore = jenkins-scripts/*-local-env.sh,
+    jjb/integration/*.sh
+shell = bash
+indent_size = 4
+use_spaces = yeah
index 6eb9583e22a005681b831b32910d8bb4ce33a807..781d8a17f76268e0465a019a7a8b77efc04df54c 100644 (file)
@@ -13,6 +13,8 @@ Following are the list of published images available to be used with Jenkins job
 * CentOS 7 - docker - 20170120-1434
 * CentOS 7 - java-builder - 20170117-0004
 * CentOS 7 - java-builder - 20170126-0058
+* CentOS 7 - java-builder - 20170309-2355
+* CentOS 7 - java-builder - 20170311-0517
 * CentOS 7 - robot - 20170117-0004
 * CentOS 7 - robot - 20170210-1803
 * Fedora 23 (20151030 cloud)
@@ -33,4 +35,6 @@ Following are the list of published images available to be used with Jenkins job
 * Ubuntu 14.04 - mininet-ovs-25 - 20170130-0425
 * Ubuntu 14.04 - mininet-ovs-25 - 20170210-0300
 * Ubuntu 14.04 LTS Trusty Tahr (cloudimg)
+* Ubuntu 16.04 - gbp - 20170308-0321
+* Ubuntu 16.04 - mininet-ovs-25 - 20170308-0230
 * Ubuntu 16.04 LTS (2016-05-03 cloudimg)
index b9b7a9f774ecd0af25019250b9b91057ea1904d1..89ffd2da62b8fa3da8f76e8357249e6f92397ec3 100755 (executable)
@@ -9,24 +9,22 @@ OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
 useradd -m -s /bin/bash jenkins
 
 # Check if docker group exists
-grep -q docker /etc/group
-if [ "$?" == '0' ]
+if grep -q docker /etc/group
 then
-  # Add jenkins user to docker group
-  usermod -a -G docker jenkins
+    # Add jenkins user to docker group
+    usermod -a -G docker jenkins
 fi
 
 # Check if mock group exists
-grep -q mock /etc/group
-if [ "$?" == '0' ]
+if grep -q mock /etc/group
 then
-  # Add jenkins user to mock group so they can build Int/Pack's RPMs
-  usermod -a -G mock jenkins
+    # Add jenkins user to mock group so they can build Int/Pack's RPMs
+    usermod -a -G mock jenkins
 fi
 
 mkdir /home/jenkins/.ssh
 mkdir /w
-cp -r /home/${OS}/.ssh/authorized_keys /home/jenkins/.ssh/authorized_keys
+cp -r "/home/${OS}/.ssh/authorized_keys" /home/jenkins/.ssh/authorized_keys
 # Generate ssh key for use by Robot jobs
 echo -e 'y\n' | ssh-keygen -N "" -f /home/jenkins/.ssh/id_rsa -t rsa
 chown -R jenkins:jenkins /home/jenkins/.ssh /w
index 032c63d93643372fb33952587c6fa8a108aabeeb..f7791227db983e1983ef81d81c820fe9cc8cdb39 100755 (executable)
@@ -1,13 +1,13 @@
 #!/bin/bash
 
-OS=`facter operatingsystem`
+OS=$(facter operatingsystem)
 
 case "$OS" in
     Fedora)
         systemctl stop firewalld
     ;;
     CentOS|RedHat)
-        if [ `facter operatingsystemrelease | cut -d '.' -f1` -lt "7" ]; then
+        if [ "$(facter operatingsystemrelease | cut -d '.' -f1)" -lt "7" ]; then
             service iptables stop
         else
             systemctl stop firewalld
index d8a2ed5bef50d79b5bf714e31e8f538991e26257..d8963184cb5017fc49366cdeb0968e4f6bfa821c 100755 (executable)
@@ -8,8 +8,8 @@ EOF
 
 # make sure jenkins is part of the docker only if jenkins has already been
 # created
-grep -q jenkins /etc/passwd
-if [ "$?" == '0' ]
+
+if grep -q jenkins /etc/passwd
 then
   /usr/sbin/usermod -a -G docker jenkins
 fi
index efb8b1a79733a57fb878c801b71d453e9ddc6053..fe327e3f544fbcfe28e9bcefcde7364521a3dd50 100755 (executable)
@@ -9,13 +9,14 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-cd /builder/jenkins-scripts
-chmod +x *.sh
+cd /builder/jenkins-scripts || exit 1
+chmod +x -- *.sh
 ./system_type.sh
 
+# shellcheck disable=SC1091
 source /tmp/system_type.sh
 ./basic_settings.sh
-./${SYSTEM_TYPE}.sh
+"./${SYSTEM_TYPE}.sh"
 
 # Create the jenkins user last so that hopefully we don't have to deal with
 # guard files
index 3e3008d310533ec737f64c44e2422b56b153ba1e..94ded8d499e2e961b0603eea89de1ba64909452d 100644 (file)
       - inject:
           properties-file: variables.prop
 
-- builder:
-    name: autorelease-generate-project-report
-    builders:
-      - shell: !include-raw: include-raw-generate-project-report.sh
-
 - builder:
     name: autorelease-fix-relative-paths
     builders:
index 6eddc0dbf3fb22becec736ed014d721bf6b572e1..36e385a6c0621a7265eea6bcff7d87116a92c43a 100644 (file)
@@ -3,7 +3,6 @@
     name: autorelease-projects
     jobs:
       - 'autorelease-release-{stream}'
-      - 'autorelease-project-report-{stream}'
 
     stream:
       - carbon:
           jdk: 'openjdk8'
           integration-test: boron
       - beryllium:
+          # Only run once a week since Beryllium is in maintenance mode
+          cron: 'H H * * 0'
           next-release-tag: Beryllium-SR5
           branch: 'stable/beryllium'
           jdk: 'openjdk7'
           integration-test: beryllium
 
     project: 'releng/autorelease'
-    archive-artifacts: '**/*.prop **/*.log **/patches/*.bundle **/patches/*.patch all-bundles.tar.gz'
+    archive-artifacts: >
+        **/*.prop
+        **/*.log
+        **/patches/*.bundle
+        **/patches/*.patch
+        patches.tar.gz
 
 ###
 # TODO: Remove this job once guava21 testing is complete
index 1261ac9e5a29d9265139fdcb3b95c486abfd2477..847b479a6eb5ecb87ea4f004ad440f0b4f2a8a25 100644 (file)
@@ -6,6 +6,7 @@
     project-type: freestyle
     node: centos7-autorelease-4c-16g
     jdk: '{jdk}'
+    cron: 'H 0 * * *'
 
     properties:
       - opendaylight-infra-properties:
@@ -42,7 +43,7 @@
           build-timeout: '1440'
 
     triggers:
-      - timed: 'H 0 * * *'
+      - timed: '{cron}'
 
     builders:
       # force jenkins install of maven version before any shell scripts use it
       - opendaylight-infra-shiplogs:
           maven-version: 'mvn33'
 
-
-- job-template:
-    name: 'autorelease-project-report-{stream}'
-
-    project-type: freestyle
-    node: centos7-java-builder-2c-8g
-
-    properties:
-      - opendaylight-infra-properties:
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - opendaylight-infra-parameters:
-          project: '{project}'
-          branch: '{branch}'
-          refspec: 'refs/heads/{branch}'
-          artifacts: '{archive-artifacts}'
-      - string:
-          name: REPORT_DIR
-          default: '$WORKSPACE/project-reports'
-          description: "The directory containing project reports"
-
-    scm:
-      - git:
-          credentials-id: 'opendaylight-jenkins-ssh'
-          url: '$GIT_BASE'
-          refspec: '$GERRIT_REFSPEC'
-          branches:
-            - '$GERRIT_BRANCH'
-          choosing-strategy: 'gerrit'
-          skip-tag: true
-          submodule:
-            recursive: true
-
-    wrappers:
-      - opendaylight-infra-wrappers:
-          build-timeout: '30'
-
-    triggers:
-      - timed: '0 0 * * 0'
-
-    builders:
-      - shell: 'echo "DATE=`date +%Y-%m-%d`" > $WORKSPACE/variables.prop'
-      - inject:
-          properties-file: variables.prop
-      - autorelease-generate-project-report
-      - shell: "./scripts/list-project-dependencies.sh"
-      - autorelease-determine-merge-order
-      - autorelease-sys-stats
-
-    publishers:
-      - email-ext:
-          attachments: 'project-reports/*.log'
-          recipients: 'skitt@redhat.com thanh.ha@linuxfoundation.org'
-          reply-to: dev@lists.opendaylight.org
-          content-type: default
-          subject: '[releng] ODL {stream} project report for ${{ENV, var="DATE"}}'
-          body: |
-              This is a project report generated on $DATE listing the commit
-              history of ODL projects for the past week. See attached
-              git-report.log
-              Archive also available on Jenkins at $BUILD_URL
-          always: true
-      - opendaylight-infra-shiplogs:
-          maven-version: 'mvn33'
index b50f56b20de4f8051dd25d5f00bc0b8cb933353d..c948eb48ad5d0676a15ef16ad0ec202c1ba42f33 100644 (file)
 NEXUS_STAGING_URL=${ODLNEXUS_STAGING_URL:-$ODLNEXUSPROXY}
 
 NEXUSURL=${NEXUS_STAGING_URL}/content/repositories/
-VERSION=`grep -m2 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }'`
+VERSION=$(grep -m2 '<version>' "${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml" | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }')
 echo "VERSION: ${VERSION}"
-STAGING_REPO_ID=`grep "Created staging repository with ID" $WORKSPACE/deploy-staged-repository.log | cut -d '"' -f2`
-BUNDLEURL=${NEXUSURL}/${STAGING_REPO_ID}/org/opendaylight/integration/distribution-karaf/${VERSION}/distribution-karaf-${VERSION}.zip
-echo STAGING_REPO_ID=$STAGING_REPO_ID >> $WORKSPACE/variables.prop
-echo BUNDLEURL=$BUNDLEURL >> $WORKSPACE/variables.prop
+STAGING_REPO_ID=$(grep "Created staging repository with ID" "$WORKSPACE/deploy-staged-repository.log" | cut -d '"' -f2)
+BUNDLEURL="${NEXUSURL}/${STAGING_REPO_ID}/org/opendaylight/integration/distribution-karaf/${VERSION}/distribution-karaf-${VERSION}.zip"
+echo STAGING_REPO_ID="$STAGING_REPO_ID" >> "$WORKSPACE/variables.prop"
+echo BUNDLEURL="$BUNDLEURL" >> "$WORKSPACE/variables.prop"
 echo "BUNDLEURL: ${BUNDLEURL}"
 
 # Copy variables.prop to variables.jenkins-trigger so that the end of build
index 4264fc30649f0c75dbfb400df279b4b59191a874..3efacf878afb88f311de94852a22d46651eb8944 100644 (file)
@@ -10,7 +10,7 @@
 ##############################################################################
 
 # Assuming that mvn deploy created the hide/from/pom/files/stage directory.
-cd hide/from/pom/files
+cd hide/from/pom/files || exit 1
 mkdir -p m2repo/org/opendaylight/
 
 # ODLNEXUSPROXY is used to define the location of the Nexus server used by the CI system.
@@ -29,9 +29,9 @@ rsync -avz --remove-source-files \
            "stage/org/opendaylight" m2repo/org/
 
 "$MVN" -V -B org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
-    -DrepositoryDirectory="`pwd`/m2repo" \
-    -DnexusUrl=$NEXUS_STAGING_URL \
+    -DrepositoryDirectory="$(pwd)/m2repo" \
+    -DnexusUrl="$NEXUS_STAGING_URL" \
     -DstagingProfileId="$NEXUS_STAGING_PROFILE" \
     -DserverId="$NEXUS_STAGING_SERVER_ID" \
-    -s $SETTINGS_FILE \
-    -gs $GLOBAL_SETTINGS_FILE | tee $WORKSPACE/deploy-staged-repository.log
+    -s "$SETTINGS_FILE" \
+    -gs "$GLOBAL_SETTINGS_FILE" | tee "$WORKSPACE/deploy-staged-repository.log"
index 94880a56dfdd68bed559872ce6681e2f0f817401..0b38f0ee081549f07041083a0cdd8644b1b80c1d 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
 ##############################################################################
-# Copyright (c) 2015 The Linux Foundation and others.
+# Copyright (c) 2015, 2017 The Linux Foundation and others.
 #
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 LFTOOLS_DIR="$WORKSPACE/.venv-lftools"
 if [ ! -d "$LFTOOLS_DIR" ]
 then
-    virtualenv $LFTOOLS_DIR
-    source $LFTOOLS_DIR/bin/activate
+    virtualenv "$LFTOOLS_DIR"
+    # shellcheck disable=SC1090
+    source "$LFTOOLS_DIR/bin/activate"
     pip install --upgrade pip
     pip freeze
     pip install lftools
 fi
+# shellcheck disable=SC1090
 source "$LFTOOLS_DIR/bin/activate"
 
 # Directory to put git format-patches
-PATCH_DIR=`pwd`/patches
+PATCH_DIR="$WORKSPACE/patches"
 
-echo $RELEASE_TAG
-lftools version release $RELEASE_TAG
+echo "$RELEASE_TAG"
+lftools version release "$RELEASE_TAG"
 git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true"
 git commit -am "Release $RELEASE_TAG"
 
 mkdir patches
-mv taglist.log $PATCH_DIR
-modules=`xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' pom.xml`
+mv taglist.log "$PATCH_DIR"
+modules=$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' pom.xml)
 for module in $modules; do
-    pushd $module
-    git format-patch --stdout origin/$RELEASE_BRANCH > $PATCH_DIR/${module//\//-}.patch
-    git bundle create $PATCH_DIR/${module//\//-}.bundle "origin/master..HEAD"
+    pushd "$module"
+    git format-patch --stdout "origin/$RELEASE_BRANCH" > "$PATCH_DIR/${module//\//-}.patch"
+    git bundle create "$PATCH_DIR/${module//\//-}.bundle" "origin/master..HEAD"
     popd
 done
 
-tar cvzf all-bundles.tar.gz `find $PATCH_DIR -type f -print0 \
-                                | xargs -0r file             \
-                                | egrep -e ':.*Git bundle.*' \
-                                | cut -d: -f1`
-rm $PATCH_DIR/*.bundle
+tar cvzf patches.tar.gz -C "$WORKSPACE" patches
+rm "$PATCH_DIR"/*.bundle
diff --git a/jjb/autorelease/include-raw-generate-project-report.sh b/jjb/autorelease/include-raw-generate-project-report.sh
deleted file mode 100644 (file)
index e78f64a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
-##############################################################################
-# Copyright (c) 2015 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
-
-GIT_REPORT_FILE=$REPORT_DIR/git-report.log
-
-mkdir $REPORT_DIR
-touch $GIT_REPORT_FILE
-
-projects=`grep path .gitmodules | sed 's/.*= //' | sort`
-for p in $projects; do
-    echo "" >> $GIT_REPORT_FILE
-    echo "========" >> $GIT_REPORT_FILE
-    echo "$p" >> $GIT_REPORT_FILE
-    echo "========" >> $GIT_REPORT_FILE
-    echo "" >> $GIT_REPORT_FILE
-
-    cd $WORKSPACE/$p
-    git log --after="1 week ago" | sed 'sX^    Change-Id: X    -> https://git.opendaylight.org/gerrit/r/X' >> $GIT_REPORT_FILE
-    cd $WORKSPACE
-done
index 7faa26f38bfed138bd457c3ce2e67c1b260f143d..5c8d8c52f516feac6581b2dde1f72f2248fe62d3 100644 (file)
@@ -1,7 +1,9 @@
 #!/bin/bash
-if [ $GERRIT_BRANCH == "master" ]; then
+if [ "$GERRIT_BRANCH" == "master" ]; then
     RTD_BUILD_VERSION=latest
 else
-    RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}}
+    RTD_BUILD_VERSION="${{GERRIT_BRANCH/\//-}}"
 fi
+
+# shellcheck disable=SC1083
 curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/{rtdproject}
index 7410548ef1f740afbac652a60150fe0ec9be5e43..ed72f650c08b85551231a5a936008aed1940e89f 100644 (file)
 ##############################################################################
 
 # Clear workspace
-rm -rf *
+rm -rf -- "${WORKSPACE:?}"/*
 
 # Create python script to parse json
-cat > ${WORKSPACE}/parse_json.py << EOF
+cat > "${WORKSPACE}/parse_json.py" << EOF
 import json
 import sys
 
@@ -30,8 +30,8 @@ EOF
 # Clone all ODL projects
 curl -s --header "Accept: application/json" \
     https://git.opendaylight.org/gerrit/projects/ | \
-    tail -n +2 > ${WORKSPACE}/projects.json
-for p in `cat ${WORKSPACE}/projects.json | python ${WORKSPACE}/parse_json.py`
+    tail -n +2 > "${WORKSPACE}/projects.json"
+for p in $(python "${WORKSPACE}/parse_json.py" < "${WORKSPACE}/projects.json")
 do
     # Ignore non-projects and archived projects
     if [ "$p" == "All-Users" ] || \
@@ -45,14 +45,14 @@ do
     then
         continue
     fi
-    mkdir -p `dirname "$p"`
+    mkdir -p "$(dirname "$p")"
     git clone "https://git.opendaylight.org/gerrit/$p.git" "$p"
 done
 
 # Check pom.xml for <repositories> and <pluginRepositories>
 FILE=repos.txt
 
-find . -name pom.xml | xargs grep -i '<repositories>\|<pluginRepositories>' > $FILE
+find . -name pom.xml -print0 | xargs -0 grep -i '<repositories>\|<pluginRepositories>' > "$FILE"
 [[ $(tr -d "\r\n" < $FILE|wc -c) -eq 0 ]] && rm $FILE
 
 if [ -a $FILE ]
index 8fedd1ccd72b1b62ddefcd9d43c43b0ff5568012..b0351d1e6b9d230460a5cc94906e3127ada6fa7d 100644 (file)
@@ -25,7 +25,7 @@ ARCHIVES_DIR="$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER"
 echo "Build logs: <a href=\"$LOGS_SERVER/$SILO/$ARCHIVES_DIR\">$LOGS_SERVER/$SILO/$ARCHIVES_DIR</a>"
 
 mkdir .archives
-cd .archives/ || exit 404
+cd .archives/ || exit 1
 
 cat > deploy-archives.xml <<EOF
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
index 8a9731703dab10264537d6e0fe213ed85568d045..85ae3a66025fcd2c459156e9427fb31b1a4c40f4 100644 (file)
@@ -9,25 +9,25 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-if [[ $P2ZIP_URL == "" ]]; then
+if [[ "$P2ZIP_URL" == "" ]]; then
     P2ZIP_URL=opendaylight.snapshot/$(find . -name "*.zip" -type f -exec ls "{}" + | head -1)
-    FILE_NAME=`echo $P2ZIP_URL | awk -F'/' '{ print $NF }'`
+    FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }')
     RELEASE_PATH="snapshot"
 else
-    FILE_NAME=`echo $P2ZIP_URL | awk -F'/' '{ print $NF }'`
-    VERSION=`echo $P2ZIP_URL | awk -F'/' '{ print $(NF-1) }'`
+    FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }')
+    VERSION=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $(NF-1) }')
     RELEASE_PATH="release/$VERSION"
-    wget --quiet $P2ZIP_URL -O $FILE_NAME
+    wget --quiet "$P2ZIP_URL" -O "$FILE_NAME"
 fi
 
 # If we detect a snapshot build then release to a snapshot repo
 # YangIDE has indicated that the only want the latest snapshot released to
 # the snapshot directory.
-if echo $P2ZIP_URL | grep opendaylight.snapshot; then
+if echo "$P2ZIP_URL" | grep opendaylight.snapshot; then
     RELEASE_PATH="snapshot"
 fi
 
-cat > ${WORKSPACE}/pom.xml <<EOF
+cat > "${WORKSPACE}/pom.xml" <<EOF
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.$PROJECT</groupId>
index 2f3d42bcba0cc7c93f401321781fd2f00ec5b1da..4f03d062b818143bff37b9b4287c38b667661961 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 if [ -d "$WORKSPACE/.venv-openstack" ]; then
-    source $WORKSPACE/.venv-openstack/bin/activate
-    OS_STATUS=`openstack --os-cloud rackspace stack show -f json -c stack_status $STACK_NAME | jq -r '.stack_status'`
+    # shellcheck disable=SC1090
+    source "$WORKSPACE/.venv-openstack/bin/activate"
+    OS_STATUS=$(openstack --os-cloud rackspace stack show -f json -c stack_status "$STACK_NAME" | jq -r '.stack_status')
     if [ "$OS_STATUS" == "CREATE_COMPLETE" ] || [ "$OS_STATUS" == "CREATE_FAILED" ]; then
         echo "Deleting $STACK_NAME"
-        openstack --os-cloud rackspace stack delete --yes $STACK_NAME
+        openstack --os-cloud rackspace stack delete --yes "$STACK_NAME"
     fi
 fi
index bf45078ce90fd1c8be489052225a71e898def442..2a224c670025e2ea5fe62daac47f0a52c7dbf90e 100644 (file)
 ##############################################################################
 
 # Assuming that mvn deploy created the hide/from/pom/files/stage directory.
-cd hide/from/pom/files
+cd hide/from/pom/files || exit 1
 mkdir -p m2repo/org/opendaylight/
 
 rsync -avz --exclude 'maven-metadata*' \
            --exclude '_remote.repositories' \
            --exclude 'resolver-status.properties' \
-           "stage/org/opendaylight/$m" m2repo/org/opendaylight/
+           "stage/org/opendaylight/$PROJECT" m2repo/org/opendaylight/
 
 mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
-    -DrepositoryDirectory="`pwd`/m2repo" \
+    -DrepositoryDirectory="$(pwd)/m2repo" \
     -DnexusUrl=https://nexus.opendaylight.org/ \
     -DstagingProfileId="$STAGING_PROFILE_ID" \
     -DserverId="opendaylight-staging" \
-    -s $SETTINGS_FILE \
-    -gs $GLOBAL_SETTINGS_FILE | tee $WORKSPACE/deploy-staged-repository.log
+    -s "$SETTINGS_FILE" \
+    -gs "$GLOBAL_SETTINGS_FILE" | tee "$WORKSPACE/deploy-staged-repository.log"
index 353689b8602093e386469ea1bae3b11e3a6611cc..5e11e3af9ce2f0380729f030eb74dc101e3ac6dc 100644 (file)
 # If we detect a snapshot build then there is no need to run this script.
 # YangIDE has indicated that the only want the latest snapshot released to
 # the snapshot directory.
-if echo $P2ZIP_URL | grep opendaylight.snapshot; then
+if echo "$P2ZIP_URL" | grep opendaylight.snapshot; then
     exit 0
 fi
 if [[ "$P2ZIP_URL" == "" ]]; then
     exit 0
 fi
 
-EPOCH_DATE=`date +%s%3N`
-MVN_METADATA=`echo $P2ZIP_URL | sed 's,/*[^/]\+/*$,,' | sed 's,/*[^/]\+/*$,,'`/maven-metadata.xml
+EPOCH_DATE=$(date +%s%3N)
+MVN_METADATA=$(echo "$P2ZIP_URL" | sed 's,/*[^/]\+/*$,,' | sed 's,/*[^/]\+/*$,,')/maven-metadata.xml
 P2_COMPOSITE_ARTIFACTS=compositeArtifacts.xml
 P2_COMPOSITE_CONTENT=compositeContent.xml
 
-wget $MVN_METADATA -O maven-metadata.xml
+wget "$MVN_METADATA" -O maven-metadata.xml
 
-VERSIONS=`xmlstarlet sel -t -m "/metadata/versioning/versions" -v "version" maven-metadata.xml`
-NUM_VERSIONS=`echo $VERSIONS | wc -w`
+VERSIONS=$(xmlstarlet sel -t -m "/metadata/versioning/versions" -v "version" maven-metadata.xml)
+NUM_VERSIONS=$(echo "$VERSIONS" | wc -w)
 
 
 ##
index 4e1b294b7c96480e8398a8db604cdf6ffc1d604a..5975b744fc25edc7d520655e9767e384ccb44110 100644 (file)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
-git log --show-signature -1 | egrep -q 'gpg: Signature made.*key ID'
-if [ $? -eq 0 ]; then
+if git log --show-signature -1 | egrep -q 'gpg: Signature made.*key ID'; then
    echo "git commit is gpg signed"
 else
    echo "WARNING: gpg signature missing for the commit"
index 42ba838562241df024228935b211380580d08871..d9781894001ffdd521bdd81c97c56043021cdd62 100644 (file)
@@ -1,9 +1,9 @@
 #!/bin/bash -x
 
 set +e  # To avoid failures in projects which generate zero snapshot artifacts.
-find /tmp/r/org/opendaylight/$GERRIT_PROJECT/ -path *-SNAPSHOT* -delete
+find "/tmp/r/org/opendaylight/$GERRIT_PROJECT/" -path "*-SNAPSHOT*" -delete
 find /tmp/r/ -regex '.*/_remote.repositories\|.*/maven-metadata-local\.xml\|.*/maven-metadata-fake-nexus\.xml\|.*/resolver-status\.properties' -delete
 find /tmp/r/ -type d -empty -delete
 echo "INFO: A listing of project related files left in local repository follows."
-find /tmp/r/org/opendaylight/$GERRIT_PROJECT/
+find "/tmp/r/org/opendaylight/$GERRIT_PROJECT/"
 true  # To prevent the possibly non-zero return code from failing the job.
index f1e8255f95ea607a1c2c7754e363f8b4d2ecd4c4..f7c12b2fa7236f63b17cc42ebc013751ef863d02 100644 (file)
@@ -1,6 +1,7 @@
+#!/bin/bash
 echo "Cleaning up Robot installation..."
 
 # ${ROBOT_VENV} comes from the include-raw-integration-install-robotframework.sh
 # script.
 # TODO: Is this still needed when we have integration-cleanup-workspace?
-rm -rf ${ROBOT_VENV}
+rm -rf "${ROBOT_VENV}"
index 32c90305bd6169a240363f1f4e0d98f4afa34209..f824262aeb025c56f7692f171b486425bfe25d74 100644 (file)
@@ -1,9 +1,12 @@
+#!/bin/bash
 echo "Cleaning up the workspace..."
 
 # Leftover files from previous runs could be wrongly copied as results.
 # Keep the cloned integration/test repository!
-for file_or_dir in `ls -A -1 -I "test"`
+for file_or_dir in *
 # FIXME: Make this compatible with multipatch and other possible build&run jobs.
 do
-  rm -vrf "$file_or_dir"
+    if [ "$file_or_dir" != "test" ]; then
+        rm -vrf "$file_or_dir"
+    fi
 done
index 28f41133235946ffa9eb185308fedad1bd8eed93..c8611484412f0f06c2b79ea3d70a33b680add8fa 100644 (file)
@@ -32,9 +32,6 @@ cat ${MEMCONF}
 echo "Listing all open ports on controller system"
 netstat -pnatu
 
-echo "redirected karaf console output to karaf_console.log"
-export KARAF_REDIRECT=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log
-
 if [ ${JDKVERSION} == 'openjdk8' ]; then
     echo "Setting the JRE Version to 8"
     # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
index 5dc7556cc4e5a39b4a0fb2f335afeb88f124a1f0..bbeef9a2decaff41f021d55c4a0e072d191c771c 100644 (file)
@@ -26,6 +26,7 @@ pip install --upgrade pip
 
 pip install --upgrade docker-py importlib requests scapy netifaces netaddr ipaddr pyhocon
 pip install --upgrade robotframework{,-{httplibrary,requests,sshlibrary,selenium2library}}
+pip install --upgrade robotframework-pycurllibrary
 
 # Module jsonpath is needed by current AAA idmlite suite.
 pip install --upgrade jsonpath-rw
index 014178cc43808d6e3e3c5c51082fe5693972a9af..9aff8ed0eb3857c3d7db2ccfde5e071b3b38250b 100644 (file)
@@ -3,9 +3,9 @@
 set -e
 
 echo "---> Cleaning up OVS $OVS_VERSION"
-docker logs $CID > $WORKSPACE/docker-ovs-${OVS_VERSION}.log
-docker stop $CID
-docker rm $CID
+docker logs "$CID" > "$WORKSPACE/docker-ovs-${OVS_VERSION}.log"
+docker stop "$CID"
+docker rm "$CID"
 rm env.properties
 
 docker images
index 9f5f2ac7ae5df414a44d4b32619ac68288804f17..46067683360527a3f7a9fdef3e266b71cdaa3d43 100644 (file)
@@ -5,7 +5,7 @@
 #
 # https://github.com/openstack-infra/project-config/blob/master/jenkins/jobs/networking-odl.yaml
 
-export PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
+export PATH="$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin"
 
 # *SIGH*. This is required to get lsb_release
 sudo yum -y install redhat-lsb-core indent python-testrepository
@@ -17,18 +17,18 @@ sudo chown -R jenkins:jenkins /opt/stack/new
 sudo bash -c 'echo "stack ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers'
 
 # We need to install some scripts from openstack/os-testr project
-cd ~
+cd ~ || exit 1
 echo "Setting up infra scripts"
 sudo mkdir -p /usr/local/jenkins/slave_scripts
 git clone https://github.com/openstack/os-testr.git
-cd os-testr/os_testr
+cd os-testr/os_testr || exit 1
 sudo cp subunit2html.py /usr/local/jenkins/slave_scripts
 
 # Save existing WORKSPACE
-SAVED_WORKSPACE=$WORKSPACE
+SAVED_WORKSPACE="$WORKSPACE"
 export WORKSPACE=~/workspace
-mkdir -p $WORKSPACE
-cd $WORKSPACE
+mkdir -p "$WORKSPACE"
+cd "$WORKSPACE" || exit 1
 
 # This is the job which checks out devstack-gate
 if [[ ! -e devstack-gate ]]; then
@@ -36,7 +36,7 @@ if [[ ! -e devstack-gate ]]; then
     git clone https://git.openstack.org/openstack-infra/devstack-gate
 else
     echo "Fixing devstack-gate git remotes"
-    cd devstack-gate
+    cd devstack-gate || exit 1
     git remote set-url origin https://git.openstack.org/openstack-infra/devstack-gate
     git remote update
     git reset --hard
@@ -55,11 +55,11 @@ fi
 
 # Set the pieces we want to test
 if [ "$GERRIT_PROJECT" == "openstack/neutron" ]; then
-    ZUUL_PROJECT=$GERRIT_PROJECT
-    ZUUL_BRANCH=$GERRIT_REFSPEC
+    export ZUUL_PROJECT=$GERRIT_PROJECT
+    export ZUUL_BRANCH=$GERRIT_REFSPEC
 elif [ "$GERRIT_PROJECT" == "openstack-dev/devstack" ]; then
-    ZUUL_PROJECT=$GERRIT_PROJECT
-    ZUUL_BRANCH=$GERRIT_REFSPEC
+    export ZUUL_PROJECT=$GERRIT_PROJECT
+    export ZUUL_BRANCH=$GERRIT_REFSPEC
 fi
 
 echo "Setting environment variables"
@@ -72,7 +72,7 @@ DEVSTACK_LOCAL_CONFIG+="ODL_JAVA_MAX_MEM=784m;"
 DEVSTACK_LOCAL_CONFIG+="ODL_JAVA_MAX_PERM_MEM=784m;"
 
 # Set ODL_URL_PREFIX if "nexus proxy" is provided
-URL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
+export URL_PREFIX="${ODLNEXUSPROXY:-https://nexus.opendaylight.org}"
 if [ -n "$ODLNEXUSPROXY" ] ; then
     DEVSTACK_LOCAL_CONFIG+="ODL_URL_PREFIX=$ODLNEXUSPROXY;"
 fi
@@ -128,17 +128,17 @@ echo "Running safe-devstack-vm-gate-wrap.sh"
 DGRET=$?
 
 # Restore WORKSPACE
-OS_WORKSPACE=$WORKSPACE
-export WORKSPACE=$SAVED_WORKSPACE
+OS_WORKSPACE="$WORKSPACE"
+export WORKSPACE="$SAVED_WORKSPACE"
 
 # Copy and display all the logs
 cat /opt/stack/new/devstacklog*
 ls /opt/stack/; ls /opt/stack/new; ls /opt/stack/new/opendaylight;
-cp -r $OS_WORKSPACE/logs $WORKSPACE
-cp -a /opt/stack/new/logs/screen-odl-karaf* $WORKSPACE/logs
-mkdir -p $WORKSPACE/logs/opendaylight
-cp -a /opt/stack/new/opendaylight/distribution*/etc $WORKSPACE/logs/opendaylight
+cp -r "$OS_WORKSPACE/logs" "$WORKSPACE"
+cp -a /opt/stack/new/logs/screen-odl-karaf* "$WORKSPACE/logs"
+mkdir -p "$WORKSPACE/logs/opendaylight"
+cp -a /opt/stack/new/opendaylight/distribution*/etc "$WORKSPACE/logs/opendaylight"
 # Unzip the logs to make them easier to view
-gunzip $WORKSPACE/logs/*.gz
+gunzip "$WORKSPACE"/logs/*.gz
 
-exit $DGRET
+exit "$DGRET"
index 2aa2842cfa92716860e1242e7946a90c5e311a12..2c98e9e36aa3ed1650246a69b14f5a2fbb36df8e 100644 (file)
@@ -2,7 +2,7 @@
 
 set -e
 
-OVS_VERSION=${OVS_VERSION:-2.5.0}
+OVS_VERSION="${OVS_VERSION:-2.5.0}"
 
 echo "---> Cleaning up existing Docker processes and images"
 for x in $(docker ps -a -q)
@@ -19,12 +19,12 @@ done
 
 
 echo "---> Starting OVS $OVS_VERSION"
-/usr/bin/docker pull vpickard/openvswitch:$OVS_VERSION
-CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t vpickard/openvswitch:$OVS_VERSION /usr/bin/supervisord)
-REALCID=`echo $CID | rev | cut -d ' ' -f 1 | rev`
+/usr/bin/docker pull "vpickard/openvswitch:$OVS_VERSION"
+CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t "vpickard/openvswitch:$OVS_VERSION" /usr/bin/supervisord)
+REALCID=$(echo "$CID" | rev | cut -d ' ' -f 1 | rev)
 echo "CID=$REALCID" > env.properties
 echo "OVS_VERSION=${OVS_VERSION}" >> env.properties
-CONTROLLER_IP=`facter ipaddress`
+CONTROLLER_IP=$(facter ipaddress)
 echo "CONTROLLER_IP=${CONTROLLER_IP}" >> env.properties
 
 echo "---> Waiting..."
index ed0f9c4f0d92bd9e6fb3bd9affbedb684615b775..7860c4b72721a80c5ffdf6020d510e759f549b5c 100644 (file)
@@ -3,15 +3,15 @@
 set -e
 
 echo "---> Configuring OVS for HW VTEP Emulator"
-/usr/bin/docker exec $CID supervisorctl stop ovsdb-server
-/usr/bin/docker exec $CID supervisorctl start ovsdb-server-vtep
-/usr/bin/docker exec $CID ovs-vsctl add-br br-vtep
-/usr/bin/docker exec $CID ovs-vsctl add-port br-vtep eth0
-/usr/bin/docker exec $CID vtep-ctl add-ps br-vtep
-/usr/bin/docker exec $CID vtep-ctl add-port br-vtep eth0
-/usr/bin/docker exec $CID vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.254.20
-/usr/bin/docker exec $CID vtep-ctl set-manager ptcp:6640
+/usr/bin/docker exec "$CID" supervisorctl stop ovsdb-server
+/usr/bin/docker exec "$CID" supervisorctl start ovsdb-server-vtep
+/usr/bin/docker exec "$CID" ovs-vsctl add-br br-vtep
+/usr/bin/docker exec "$CID" ovs-vsctl add-port br-vtep eth0
+/usr/bin/docker exec "$CID" vtep-ctl add-ps br-vtep
+/usr/bin/docker exec "$CID" vtep-ctl add-port br-vtep eth0
+/usr/bin/docker exec "$CID" vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.254.20
+/usr/bin/docker exec "$CID" vtep-ctl set-manager ptcp:6640
 sleep 5
 echo "---> Starting OVS HW VTEP Emulator"
-/usr/bin/docker exec $CID supervisorctl start ovs-vtep
+/usr/bin/docker exec "$CID" supervisorctl start ovs-vtep
 sleep 5
index b11ff7321e3f2ad4e43c728f488d37b221a8c4bf..93e1b8defb74eb5cb1045933c0c4ea82cc118843 100644 (file)
@@ -3,7 +3,7 @@
 set -e
 
 echo "---> Setting up controller IP"
-CONTROLLER_IP=`facter ipaddress`
+CONTROLLER_IP=$(facter ipaddress)
 echo "CONTROLLER_IP=${CONTROLLER_IP}" > env.properties
 
 echo "---> Loading OVS kernel module"
@@ -11,4 +11,3 @@ sudo /usr/sbin/modprobe openvswitch
 
 echo "---> Verifying OVS kernel module loaded"
 /usr/sbin/lsmod | /usr/bin/grep openvswitch
-
index 46ff626fe3db9491f8b70feff12fa398c35ca579..24d43322e7b47ec523be182017ef064b1ed5ae54 100644 (file)
@@ -17,18 +17,18 @@ sudo chown -R jenkins:jenkins /opt/stack/new
 sudo bash -c 'echo "stack ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers'
 
 # We need to install some scripts from openstack-infra/project-config
-cd ~
+cd ~ || exit 1
 echo "Setting up infra scripts"
 sudo mkdir -p /usr/local/jenkins/slave_scripts
 git clone https://git.openstack.org/openstack-infra/project-config
-cd project-config
+cd project-config || exit 1
 sudo cp jenkins/scripts/subunit2html.py /usr/local/jenkins/slave_scripts
 
 # Save existing WORKSPACE
 SAVED_WORKSPACE=$WORKSPACE
 export WORKSPACE=~/workspace
 mkdir -p $WORKSPACE
-cd $WORKSPACE
+cd $WORKSPACE || exit 1
 
 # This is the job which checks out devstack-gate
 if [[ ! -e devstack-gate ]]; then
@@ -36,7 +36,7 @@ if [[ ! -e devstack-gate ]]; then
     git clone https://git.openstack.org/openstack-infra/devstack-gate
 else
     echo "Fixing devstack-gate git remotes"
-    cd devstack-gate
+    cd devstack-gate || exit 1
     git remote set-url origin https://git.openstack.org/openstack-infra/devstack-gate
     git remote update
     git reset --hard
@@ -55,11 +55,11 @@ fi
 
 # Set the pieces we want to test
 if [ "$GERRIT_PROJECT" == "openstack/neutron" ]; then
-    ZUUL_PROJECT=$GERRIT_PROJECT
-    ZUUL_BRANCH=$GERRIT_REFSPEC
+    export ZUUL_PROJECT=$GERRIT_PROJECT
+    export ZUUL_BRANCH=$GERRIT_REFSPEC
 elif [ "$GERRIT_PROJECT" == "openstack-dev/devstack" ]; then
-    ZUUL_PROJECT=$GERRIT_PROJECT
-    ZUUL_BRANCH=$GERRIT_REFSPEC
+    export ZUUL_PROJECT=$GERRIT_PROJECT
+    export ZUUL_BRANCH=$GERRIT_REFSPEC
 fi
 
 echo "Setting environment variables"
@@ -72,7 +72,7 @@ DEVSTACK_LOCAL_CONFIG+="ODL_JAVA_MAX_MEM=784m;"
 DEVSTACK_LOCAL_CONFIG+="ODL_JAVA_MAX_PERM_MEM=784m;"
 
 # Set ODL_URL_PREFIX if "nexus proxy" is provided
-URL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
+export URL_PREFIX="${ODLNEXUSPROXY:-https://nexus.opendaylight.org}"
 if [ -n "$ODLNEXUSPROXY" ] ; then
     DEVSTACK_LOCAL_CONFIG+="ODL_URL_PREFIX=$ODLNEXUSPROXY;"
 fi
@@ -138,11 +138,11 @@ OS_WORKSPACE=$WORKSPACE
 export WORKSPACE=$SAVED_WORKSPACE
 
 # Copy all the logs
-cp -r $OS_WORKSPACE/logs $WORKSPACE
-cp -a /opt/stack/new/logs/q-odl-karaf* $WORKSPACE/logs
-mkdir -p $WORKSPACE/logs/opendaylight
-cp -a /opt/stack/new/opendaylight/distribution*/etc $WORKSPACE/logs/opendaylight
+cp -r "$OS_WORKSPACE/logs" "$WORKSPACE"
+cp -a /opt/stack/new/logs/q-odl-karaf* "$WORKSPACE/logs"
+mkdir -p "$WORKSPACE/logs/opendaylight"
+cp -a /opt/stack/new/opendaylight/distribution*/etc "$WORKSPACE/logs/opendaylight"
 # Unzip the logs to make them easier to view
-gunzip $WORKSPACE/logs/*.gz
+gunzip "$WORKSPACE"/logs/*.gz
 
 exit $DGRET
index 4c59d8c61bb27bf8a82696e0b3bf1c9cd43ef628..7cd4b5887a84f642d9370eb3312aca2b9b32b152 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/bash
-virtualenv $WORKSPACE/.venv
-source $WORKSPACE/.venv/bin/activate
+virtualenv "$WORKSPACE/.venv"
+# shellcheck disable=SC1090
+source "$WORKSPACE/.venv/bin/activate"
 pip install --upgrade pip
 pip install --upgrade python-openstackclient python-heatclient
 pip freeze
@@ -10,22 +11,22 @@ pip freeze
 #########################
 # Fetch stack list before fetching active builds to minimize race condition
 # where we might be try to delete stacks while jobs are trying to start
-OS_STACKS=(`openstack --os-cloud rackspace stack list \
+OS_STACKS=($(openstack --os-cloud rackspace stack list \
             -f json -c "Stack Name" -c "Stack Status" \
             --property "stack_status=CREATE_COMPLETE" \
             --property "stack_status=DELETE_FAILED" \
             --property "stack_status=CREATE_FAILED" \
-            | jq -r '.[] | ."Stack Name"'`)
+            | jq -r '.[] | ."Stack Name"'))
 
 # Make sure we fetch active builds on both the releng and sandbox silos
 ACTIVE_BUILDS=()
 for silo in releng sandbox; do
     JENKINS_URL="https://jenkins.opendaylight.org/$silo//computer/api/json?tree=computer[executors[currentExecutable[url]],oneOffExecutors[currentExecutable[url]]]&xpath=//url&wrapper=builds"
-    wget --no-verbose -O $silo_builds.json $JENKINS_URL
+    wget --no-verbose -O "${silo}_builds.json" "$JENKINS_URL"
     sleep 1  # Need to sleep for 1 second otherwise next line causes script to stall
-    ACTIVE_BUILDS=(${ACTIVE_BUILDS[@]} ` \
-        jq -r '.computer[].executors[].currentExecutable.url' $silo_builds.json \
-        | grep -v null | awk -F'/' '{print $6 "-" $7}'`)
+    ACTIVE_BUILDS=(${ACTIVE_BUILDS[@]} $( \
+        jq -r '.computer[].executors[].currentExecutable.url' "${silo}_builds.json" \
+        | grep -v null | awk -F'/' '{print $6 "-" $7}'))
 done
 
 ##########################
@@ -33,12 +34,12 @@ done
 ##########################
 # Search for stacks taht are not in use by either releng or sandbox silos and
 # delete them.
-for stack in ${OS_STACKS[@]}; do
+for stack in "${OS_STACKS[@]}"; do
     if [[ "${ACTIVE_BUILDS[@]}" =~ $stack ]]; then
         # No need to delete stacks if there exists an active build for them
         continue
     else
         echo "Deleting orphaned stack: $stack"
-        openstack --os-cloud rackspace stack delete --yes $stack
+        openstack --os-cloud rackspace stack delete --yes "$stack"
     fi
 done
index 2b2267786d357a08ba0843c8b1b6d9d822b1ac6d..99e9dc7e57591f227685fae47efcd70a1d93c99d 100644 (file)
@@ -1,16 +1,18 @@
 #!/bin/bash
 echo "----------> Copy ssh public keys to csit lab"
 
-source $WORKSPACE/.venv-openstack/bin/activate
+# shellcheck disable=SC1090
+source "$WORKSPACE/.venv-openstack/bin/activate"
 
 function copy-ssh-keys-to-slave() {
     RETRIES=60
     for j in $(seq 1 $RETRIES); do
+        # shellcheck disable=SC2092
         if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
-            ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
+            ssh "jenkins@${i}" 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
             echo "Successfully copied public keys to slave ${i}"
             break
-        elif [ $j -eq $RETRIES ]; then
+        elif [ "$j" -eq $RETRIES ]; then
             echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
             exit 1
         else
@@ -19,7 +21,7 @@ function copy-ssh-keys-to-slave() {
         fi
 
         # ping test to see if connectivity is available
-        if ping -c1 ${i} &> /dev/null; then
+        if ping -c1 "${i}" &> /dev/null; then
             echo "Ping to ${i} successful."
         else
             echo "Ping to ${i} failed."
@@ -29,9 +31,10 @@ function copy-ssh-keys-to-slave() {
 
 # Print the Stack outputs parameters so that we can identify which IPs belong
 # to which VM types.
-openstack --os-cloud rackspace stack show -c outputs $STACK_NAME
+openstack --os-cloud rackspace stack show -c outputs "$STACK_NAME"
 
-ADDR=(`openstack --os-cloud rackspace stack show -f json -c outputs $STACK_NAME | \
+# shellcheck disable=SC2006
+ADDR=(`openstack --os-cloud rackspace stack show -f json -c outputs "$STACK_NAME" | \
        jq -r '.outputs[] | \
               select(.output_key | match("^vm_[0-9]+_ips\$")) | \
               .output_value | .[]'`)
@@ -44,7 +47,7 @@ done
 
 # Detect when a process failed to copy ssh keys and fail build
 for p in $pids; do
-    if wait $p; then
+    if wait "$p"; then
         echo "Process $p successfully copied ssh keys."
     else
         echo "Process $p failed to copy ssh keys."
index 6679d271ce1af0037d3cf3718a68bd04280b2450..9d49887547e572786b2a1630f122963cde9303ab 100644 (file)
@@ -1,10 +1,11 @@
 #!/bin/bash
-CHANGE_ID=`ssh -p 29418 jenkins-$SILO@git.opendaylight.org gerrit query \
+# shellcheck disable=SC1083
+CHANGE_ID=$(ssh -p 29418 "jenkins-$SILO@git.opendaylight.org" gerrit query \
                limit:1 owner:self is:open project:{project} \
                message:'{gerrit-commit-message}' \
                topic:{gerrit-topic} | \
                grep 'Change-Id:' | \
-               awk '{{ print $2 }}'`
+               awk '{{ print $2 }}')
 
 if [ -z "$CHANGE_ID" ]; then
     git commit -sm "{gerrit-commit-message}"
@@ -13,8 +14,9 @@ else
 fi
 
 git status
-git remote add gerrit ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/builder.git
+git remote add gerrit "ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/builder.git"
 
 # Don't fail the build if this command fails because it's possible that there
 # is no changes since last update.
+# shellcheck disable=SC1083
 git review --yes -t {gerrit-topic} || true
index 2317067a3460fcbeab33431ab9164b68de5e95de..3a105144081b831bc6587ef23aa1de7e75a804e9 100644 (file)
@@ -1,13 +1,14 @@
 #!/bin/bash
-virtualenv $WORKSPACE/.venv-openstack
-source $WORKSPACE/.venv-openstack/bin/activate
+virtualenv "$WORKSPACE/.venv-openstack"
+# shellcheck disable=SC1090
+source "$WORKSPACE/.venv-openstack/bin/activate"
 pip install --upgrade pip
 pip install --upgrade python-openstackclient python-heatclient
 pip freeze
 
-cd /builder/openstack-hot
+cd /builder/openstack-hot || exit 1
 
-JOB_SUM=`echo $JOB_NAME | sum | awk '{{ print $1 }}'`
+JOB_SUM=$(echo "$JOB_NAME" | sum | awk '{{ print $1 }}')
 VM_NAME="$JOB_SUM-$BUILD_NUMBER"
 
 OS_TIMEOUT=10  # Minutes to wait for OpenStack VM to come online
@@ -18,13 +19,15 @@ STACK_SUCCESSFUL=false
 openstack --os-cloud rackspace limits show --absolute
 openstack --os-cloud rackspace limits show --rate
 echo "Trying up to $STACK_RETRIES times to create $STACK_NAME."
-for try in `seq $STACK_RETRIES`; do
-    openstack --os-cloud rackspace stack create --timeout $OS_TIMEOUT -t {stack-template} -e $WORKSPACE/opendaylight-infra-environment.yaml --parameter "job_name=$VM_NAME" --parameter "silo=$SILO" $STACK_NAME
+for try in $(seq $STACK_RETRIES); do
+    # shellcheck disable=SC1083
+    openstack --os-cloud rackspace stack create --timeout "$OS_TIMEOUT" -t {stack-template} -e "$WORKSPACE/opendaylight-infra-environment.yaml" --parameter "job_name=$VM_NAME" --parameter "silo=$SILO" "$STACK_NAME"
     openstack --os-cloud rackspace stack list
-    echo "Waiting for $OS_TIMEOUT minutes to create $STACK_NAME."
-    for i in `seq $OS_TIMEOUT`; do
+    echo "$try: Waiting for $OS_TIMEOUT minutes to create $STACK_NAME."
+    for i in $(seq $OS_TIMEOUT); do
         sleep 60
-        OS_STATUS=`openstack --os-cloud rackspace stack show -f json -c stack_status $STACK_NAME | jq -r '.stack_status'`
+        OS_STATUS=$(openstack --os-cloud rackspace stack show -f json -c stack_status "$STACK_NAME" | jq -r '.stack_status')
+        echo "$i: $OS_STATUS"
 
         case "$OS_STATUS" in
             CREATE_COMPLETE)
@@ -35,20 +38,20 @@ for try in `seq $STACK_RETRIES`; do
             CREATE_FAILED)
                 echo "ERROR: Failed to initialize infrastructure. Deleting stack and possibly retrying to create..."
                 openstack --os-cloud rackspace stack list
-                openstack --os-cloud rackspace stack delete --yes $STACK_NAME
-                openstack --os-cloud rackspace stack show $STACK_NAME
+                openstack --os-cloud rackspace stack delete --yes "$STACK_NAME"
+                openstack --os-cloud rackspace stack show "$STACK_NAME"
                 # after stack delete, poll for 10m to know when stack is fully removed
                 # the logic here is that when "stack show $STACK_NAME" does not contain $STACK_NAME
                 # we assume it's successfully deleted and we can break to retry
-                for i in `seq 20`; do
+                for j in $(seq 20); do
                     sleep 30;
-                    STACK_SHOW=$(openstack --os-cloud rackspace stack show $STACK_NAME)
-                    echo $STACK_SHOW
+                    STACK_SHOW=$(openstack --os-cloud rackspace stack show "$STACK_NAME")
+                    echo "$j: $STACK_SHOW"
                     if [[ $STACK_SHOW == *"DELETE_FAILED"* ]]; then
                         echo "stack delete failed. trying to stack abandon now"
-                        openstack --os-cloud rackspace stack abandon $STACK_NAME
-                        STACK_SHOW=$(openstack --os-cloud rackspace stack show $STACK_NAME)
-                        echo $STACK_SHOW
+                        openstack --os-cloud rackspace stack abandon "$STACK_NAME"
+                        STACK_SHOW=$(openstack --os-cloud rackspace stack show "$STACK_NAME")
+                        echo "$STACK_SHOW"
                     fi
                     if [[ $STACK_SHOW != *"$STACK_NAME"* ]]; then
                         echo "stack show on $STACK_NAME came back empty. Assuming successful delete"
@@ -79,7 +82,7 @@ for try in `seq $STACK_RETRIES`; do
 done
 
 # capture stack info in console logs
-openstack --os-cloud rackspace stack show $STACK_NAME
+openstack --os-cloud rackspace stack show "$STACK_NAME"
 
 if ! $STACK_SUCCESSFUL; then
     exit 1
index 7c7e3c93eb779f38e6c317fecd6dccfb3ad7e186..33aba011f00850d4d1088be0e9bcdafe65b5361e 100644 (file)
@@ -1,20 +1,21 @@
 #!/bin/bash
-virtualenv $WORKSPACE/.venv
-source $WORKSPACE/.venv/bin/activate
+virtualenv "$WORKSPACE/.venv"
+# shellcheck disable=SC1090
+source "$WORKSPACE/.venv/bin/activate"
 pip install --upgrade --quiet pip
 pip install --upgrade --quiet python-openstackclient python-heatclient
 pip freeze
 
-cat > $WORKSPACE/docs/cloud-images.rst << EOF
+cat > "$WORKSPACE/docs/cloud-images.rst" << EOF
 Following are the list of published images available to be used with Jenkins jobs.
 
 EOF
 # Blank line before EOF is on purpose to ensure there is spacing.
 
 IFS=$'\n'
-IMAGES=(`openstack --os-cloud odlpriv image list --public -f value -c Name`)
-for i in ${IMAGES[@]}; do
-    echo "* $i" >> $WORKSPACE/docs/cloud-images.rst
+IMAGES=($(openstack --os-cloud odlpriv image list --public -f value -c Name))
+for i in "${IMAGES[@]}"; do
+    echo "* $i" >> "$WORKSPACE/docs/cloud-images.rst"
 done
 
 git add docs/cloud-images.rst
index 12253566c4ed7f4c95b61d9a662f1c41cb47acb5..bacd747fbf0e41bae9963979c266214426e63c72 100644 (file)
@@ -28,7 +28,7 @@ pushd libopflex
 ./autogen.sh
 ./configure --prefix="$ROOT" \
     --with-buildversion=$BUILD_NUMBER \
-    CPPFLAGS="-isystem $ROOT/include"
+    CPPFLAGS="-isystem $ROOT/include" \
     CXXFLAGS="-Wall"
 make -j8
 if ! make check; then find . -name test-suite.log -exec cat {} \; && false; fi
index 014178cc43808d6e3e3c5c51082fe5693972a9af..9aff8ed0eb3857c3d7db2ccfde5e071b3b38250b 100644 (file)
@@ -3,9 +3,9 @@
 set -e
 
 echo "---> Cleaning up OVS $OVS_VERSION"
-docker logs $CID > $WORKSPACE/docker-ovs-${OVS_VERSION}.log
-docker stop $CID
-docker rm $CID
+docker logs "$CID" > "$WORKSPACE/docker-ovs-${OVS_VERSION}.log"
+docker stop "$CID"
+docker rm "$CID"
 rm env.properties
 
 docker images
index 2aa2842cfa92716860e1242e7946a90c5e311a12..23f457545e9804933d570e0686142b2d70817566 100644 (file)
@@ -19,12 +19,12 @@ done
 
 
 echo "---> Starting OVS $OVS_VERSION"
-/usr/bin/docker pull vpickard/openvswitch:$OVS_VERSION
-CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t vpickard/openvswitch:$OVS_VERSION /usr/bin/supervisord)
-REALCID=`echo $CID | rev | cut -d ' ' -f 1 | rev`
+/usr/bin/docker pull "vpickard/openvswitch:$OVS_VERSION"
+CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t "vpickard/openvswitch:$OVS_VERSION" /usr/bin/supervisord)
+REALCID=$(echo "$CID" | rev | cut -d ' ' -f 1 | rev)
 echo "CID=$REALCID" > env.properties
 echo "OVS_VERSION=${OVS_VERSION}" >> env.properties
-CONTROLLER_IP=`facter ipaddress`
+CONTROLLER_IP=$(facter ipaddress)
 echo "CONTROLLER_IP=${CONTROLLER_IP}" >> env.properties
 
 echo "---> Waiting..."
index ed0f9c4f0d92bd9e6fb3bd9affbedb684615b775..7860c4b72721a80c5ffdf6020d510e759f549b5c 100644 (file)
@@ -3,15 +3,15 @@
 set -e
 
 echo "---> Configuring OVS for HW VTEP Emulator"
-/usr/bin/docker exec $CID supervisorctl stop ovsdb-server
-/usr/bin/docker exec $CID supervisorctl start ovsdb-server-vtep
-/usr/bin/docker exec $CID ovs-vsctl add-br br-vtep
-/usr/bin/docker exec $CID ovs-vsctl add-port br-vtep eth0
-/usr/bin/docker exec $CID vtep-ctl add-ps br-vtep
-/usr/bin/docker exec $CID vtep-ctl add-port br-vtep eth0
-/usr/bin/docker exec $CID vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.254.20
-/usr/bin/docker exec $CID vtep-ctl set-manager ptcp:6640
+/usr/bin/docker exec "$CID" supervisorctl stop ovsdb-server
+/usr/bin/docker exec "$CID" supervisorctl start ovsdb-server-vtep
+/usr/bin/docker exec "$CID" ovs-vsctl add-br br-vtep
+/usr/bin/docker exec "$CID" ovs-vsctl add-port br-vtep eth0
+/usr/bin/docker exec "$CID" vtep-ctl add-ps br-vtep
+/usr/bin/docker exec "$CID" vtep-ctl add-port br-vtep eth0
+/usr/bin/docker exec "$CID" vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.254.20
+/usr/bin/docker exec "$CID" vtep-ctl set-manager ptcp:6640
 sleep 5
 echo "---> Starting OVS HW VTEP Emulator"
-/usr/bin/docker exec $CID supervisorctl start ovs-vtep
+/usr/bin/docker exec "$CID" supervisorctl start ovs-vtep
 sleep 5
index abdf3ea5f365e3a16e8509aee2c81f98a634beaf..1608c00b6cf7076ad561cb852e9fc0a9da4c4d6d 100644 (file)
@@ -8,7 +8,9 @@
     project: 'ovsdb'
 
     # The functionality under test
-    functionality: 'clustering'
+    functionality:
+      - 'upstream-clustering'
+      - 'gate-clustering'
 
     # Project branches
     stream:
index 7c4484bca0510dbb975da57597b9cd318d60b79f..142e5e28d92cae773d3f22d8ae13fe7bd0c4da0b 100644 (file)
@@ -8,7 +8,9 @@
     project: 'ovsdb'
 
     # The functionality under test
-    functionality: 'southbound'
+    functionality:
+      - 'upstream-southbound'
+      - 'gate-southbound'
 
     # Project branches
     stream:
index a61d874bd7bb8c749acbbf82527c292e00004e2f..53fca673095ae8b55679f7cb98598cde1616074b 100644 (file)
@@ -25,6 +25,6 @@
 
       - core:
           csit-list: >
-              ovsdb-csit-1node-southbound-only-{stream},
-              ovsdb-csit-1node-southbound-all-{stream},
-              ovsdb-csit-3node-clustering-only-{stream}
+              ovsdb-csit-1node-gate-southbound-only-{stream},
+              ovsdb-csit-1node-gate-southbound-all-{stream},
+              ovsdb-csit-3node-gate-clustering-only-{stream}
index adb3c3ae0b42d2635b0f58d4c73fcfc50255faa1..1aad638df6e75d7f4164baa96ccc26cb2efab127 100644 (file)
@@ -17,7 +17,7 @@ sudo apt-get install -y --force-yes \
                     gdebi
 
 # Build release specified by build params
-$WORKSPACE/packaging/deb/build.py --major "$VERSION_MAJOR" \
+"$WORKSPACE/packaging/deb/build.py" --major "$VERSION_MAJOR" \
                                   --minor "$VERSION_MINOR" \
                                   --patch "$VERSION_PATCH" \
                                   --deb "$PKG_VERSION" \
index 0a2a6ddf69bf03cb6479f5267b4e5065133f3ea5..67ccc8eeedc729675427daed4e6d27f95aed6853 100644 (file)
@@ -8,12 +8,13 @@ set -ex -o pipefail
 
 # Install required packages
 virtualenv rpm_build
+# shellcheck disable=SC1091
 source rpm_build/bin/activate
 pip install --upgrade pip
-pip install -r $WORKSPACE/packaging/rpm/requirements.txt
+pip install -r "$WORKSPACE/packaging/rpm/requirements.txt"
 
 # Build the latest snapshot matching the given major minor version
-$WORKSPACE/packaging/rpm/build.py --build-latest-snap \
+"$WORKSPACE/packaging/rpm/build.py" --build-latest-snap \
                                   --major "$VERSION_MAJOR" \
                                   --minor "$VERSION_MINOR" \
                                   --sysd_commit "$SYSD_COMMIT" \
index ab788d91baad9b67e0f9440e34a12bff2738a7a1..74a75213825e22f018caa612944c59777fcfab96 100644 (file)
@@ -8,15 +8,17 @@ set -ex -o pipefail
 
 # Install required packages
 virtualenv rpm_build
+# shellcheck disable=SC1091
 source rpm_build/bin/activate
 pip install --upgrade pip
-pip install -r $WORKSPACE/packaging/rpm/requirements.txt
+pip install -r "$WORKSPACE/packaging/rpm/requirements.txt"
 
 # Make a URL for the tarball artifact from DOWNLOAD_URL (a zip)
+# shellcheck disable=SC2154
 download_url="${{DOWNLOAD_URL//zip/tar.gz}}"
 
 # Build release specified by build params
-$WORKSPACE/packaging/rpm/build.py --download_url "$download_url" \
+"$WORKSPACE/packaging/rpm/build.py" --download_url "$download_url" \
                                   --sysd_commit "$SYSD_COMMIT" \
                                   --changelog_date "$CHANGELOG_DATE" \
                                   --changelog_name "$CHANGELOG_NAME" \
diff --git a/jjb/packaging/include-raw-test-ansible-deb.sh b/jjb/packaging/include-raw-test-ansible-deb.sh
new file mode 100644 (file)
index 0000000..f77e780
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Install required packages
+virtualenv deb_build
+source deb_build/bin/activate
+pip install --upgrade pip
+
+# Install latest ansible
+sudo apt-add-repository ppa:ansible/ansible
+sudo apt-get update
+sudo apt-get install -y ansible
+
+git clone https://github.com/dfarrell07/ansible-opendaylight.git
+cd ansible-opendaylight
+sudo ansible-galaxy install -r requirements.yml
+sudo ansible-playbook -i "localhost," -c local examples/deb_repo_install_playbook.yml
+
+# Add more tests
diff --git a/jjb/packaging/include-raw-test-ansible-rpm.sh b/jjb/packaging/include-raw-test-ansible-rpm.sh
new file mode 100644 (file)
index 0000000..32ee5cd
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Install required packages
+virtualenv rpm_build
+source rpm_build/bin/activate
+pip install --upgrade pip
+sudo yum install -y ansible
+
+git clone https://github.com/dfarrell07/ansible-opendaylight.git
+cd ansible-opendaylight
+sudo ansible-galaxy install -r requirements.yml
+sudo ansible-playbook -i "localhost," -c local examples/odl_6_testing_playbook.yml
+
+# Add more tests
index d79bd1c19e2f1180e26a5445cb0b0dc4493cde73..cb015679bb539f54699ed6963cbb1ce00e2ac30c 100644 (file)
@@ -10,7 +10,7 @@ set -ex -o pipefail
 # https://github.com/dfarrell07/puppet-opendaylight/blob/master/Vagrantfile
 
 # Update Int/Pack's puppet-opendaylight submodule to latest master
-pushd $WORKSPACE/packaging
+pushd "$WORKSPACE/packaging"
 git submodule init
 git submodule update --remote
 
@@ -22,7 +22,8 @@ sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make r
 gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
 curl -L get.rvm.io | bash -s stable
 # Expected by RVM, seems required to make RVM functions (`rvm use`) available
-source $HOME/.rvm/scripts/rvm
+# shellcheck disable=SC1090
+source "$HOME/.rvm/scripts/rvm"
 rvm install 2.4.0
 ruby --version
 # This has to be done as a login shell to get rvm fns
@@ -33,8 +34,8 @@ ruby --version
 
 # Install gems dependencies of puppet-opendaylight via Bundler
 gem install bundler
-echo export PATH=\\$PATH:/usr/local/bin >> $HOME/.bashrc
-pushd $WORKSPACE/packaging/puppet/puppet-opendaylight
+echo export PATH="\\$PATH:/usr/local/bin" >> "$HOME/.bashrc"
+pushd "$WORKSPACE/packaging/puppet/puppet-opendaylight"
 bundle install
 bundle update
 
index 934ff471214327b65fdc5589187b6772f3b541b4..e67731271b6d3c7bcfe0c6ebf1f71942b9aaedfd 100644 (file)
@@ -10,6 +10,8 @@
       - 'packaging-build-deb-{stream}'
       - 'packaging-test-rpm-{stream}'
       - 'packaging-test-puppet-{stream}'
+      - 'packaging-test-ansible-rpm-{stream}'
+      - 'packaging-test-ansible-deb-{stream}'
 
     project: 'integration/packaging'
 
@@ -71,7 +73,7 @@
       - string:
           name: DOWNLOAD_URL
           # yamllint disable-line rule:line-length
-          default: 'https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz'
+          default: 'https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.2-Boron/distribution-karaf-0.5.2-Boron.tar.gz'
           description: 'URL to ODL tarball artifact to repackage into RPM'
       - string:
           name: SYSD_COMMIT
           artifacts: '{archive-artifacts}'
       - string:
           name: VERSION_MAJOR
-          default: '5'
+          default: '6'
           description: 'OpenDaylight major (element) version number to build'
       - string:
           name: VERSION_MINOR
-          default: '2'
+          default: '0'
           description: 'OpenDaylight minor (SR) version number to build'
       - string:
           name: SYSD_COMMIT
       - string:
           name: URL
           # yamllint disable-line rule:line-length
-          default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/rpm/example_repo_configs/opendaylight-51-release.repo'
+          default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/rpm/example_repo_configs/opendaylight-52-release.repo'
           description: 'Link to .repo or .rpm file'
       - string:
           name: REPO_FILE
-          default: '/etc/yum.repos.d/opendaylight-51-release.repo'
+          default: '/etc/yum.repos.d/opendaylight-52-release.repo'
           description: 'Name of the .repo file'
 
     scm:
 
     builders:
       - shell: !include-raw: include-raw-test-rpm.sh
-      - shell: !include-raw: include-raw-test-karaf.sh
+      - shell: !include-raw: include-raw-test-karaf.expect
 
     publishers:
       - archive-artifacts:
           artifacts: '**'
 
+- job-template:
+    name: 'packaging-test-ansible-rpm-{stream}'
+
+    node: centos7-java-builder-2c-4g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: 'packaging'
+          refspec: '$GERRIT_REFSPEC'
+          branch: 'master'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-ansible-rpm.sh
+
+    triggers:
+      - timed: '@daily'
+
+
 - job-template:
     name: 'packaging-build-deb-{stream}'
 
           description: 'OpenDaylight major (element) version number to build'
       - string:
           name: VERSION_MINOR
-          default: '0'
+          default: '2'
           description: 'OpenDaylight minor (SR) version number to build'
       - string:
           name: VERSION_PATCH
           description: 'Version of ODL systemd unitfile to download and package in ODL .deb'
       - string:
           name: CODENAME
-          default: 'Boron'
+          default: 'Boron-SR2'
           description: 'Elemental codename for the ODL release, including SR if applicable'
       - string:
           name: DOWNLOAD_URL
           # yamllint disable-line rule:line-length
-          default: 'https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz'
+          default: 'https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.2-Boron/distribution-karaf-0.5.2-Boron.tar.gz'
           description: 'URL to ODL tarball artifact to repackage into .deb'
       - string:
           name: JAVA_VERSION
     publishers:
       - archive-artifacts:
           artifacts: 'packaging/deb/opendaylight/*.deb'
+
+
+- job-template:
+    name: 'packaging-test-ansible-deb-{stream}'
+
+    node: ubuntu-xenial-mininet-ovs-25-2c-4g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: 'packaging'
+          refspec: '$GERRIT_REFSPEC'
+          branch: 'master'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-ansible-deb.sh
+
+    triggers:
+      - timed: '@daily'
index 43cdedce7fba9e0b56f5d6149f094b1e16b4f7ee..597930b22972daf30240d721f0f697f382d31a89 100644 (file)
         openflowplugin-csit-3node-periodic-bulkomatic-clustering-perf-daily-only-carbon,
         openflowplugin-csit-3node-periodic-restconf-clustering-perf-daily-only-carbon,
         ovsdb-csit-1node-periodic-scalability-daily-only-carbon,
-        ovsdb-csit-1node-southbound-all-carbon,
-        ovsdb-csit-1node-southbound-only-carbon,
-        ovsdb-csit-3node-clustering-only-carbon,
+        ovsdb-csit-1node-upstream-southbound-all-carbon,
+        ovsdb-csit-1node-upstream-southbound-only-carbon,
+        ovsdb-csit-3node-upstream-clustering-only-carbon,
         packetcable-csit-1node-pcmm-all-carbon,
         packetcable-csit-1node-pcmm-only-carbon,
         sdninterfaceapp-csit-1node-basic-only-carbon,
         openflowplugin-csit-3node-periodic-bulkomatic-clustering-perf-daily-only-boron,
         openflowplugin-csit-3node-periodic-restconf-clustering-perf-daily-only-boron,
         ovsdb-csit-1node-periodic-scalability-daily-only-boron,
-        ovsdb-csit-1node-southbound-all-boron,
-        ovsdb-csit-1node-southbound-only-boron,
-        ovsdb-csit-3node-clustering-only-boron,
+        ovsdb-csit-1node-upstream-southbound-all-boron,
+        ovsdb-csit-1node-upstream-southbound-only-boron,
+        ovsdb-csit-3node-upstream-clustering-only-boron,
         packetcable-csit-1node-pcmm-all-boron,
         packetcable-csit-1node-pcmm-only-boron,
         sdninterfaceapp-csit-1node-basic-only-boron,
         openflowplugin-csit-3node-periodic-bulkomatic-clustering-perf-daily-only-beryllium,
         openflowplugin-csit-3node-periodic-restconf-clustering-perf-daily-only-beryllium,
         ovsdb-csit-1node-periodic-scalability-daily-only-beryllium,
-        ovsdb-csit-1node-southbound-all-beryllium,
-        ovsdb-csit-1node-southbound-only-beryllium,
-        ovsdb-csit-3node-clustering-only-beryllium,
+        ovsdb-csit-1node-upstream-southbound-all-beryllium,
+        ovsdb-csit-1node-upstream-southbound-only-beryllium,
+        ovsdb-csit-3node-upstream-clustering-only-beryllium,
         packetcable-csit-1node-pcmm-all-beryllium,
         packetcable-csit-1node-pcmm-only-beryllium,
         sdninterfaceapp-csit-1node-basic-only-beryllium,
index f565c115fa2bc7f5c50652fbca1e54a1bc9c1f14..b8a62a0a5351ea4d18d31d7a6e3df74bd07eda25 100644 (file)
@@ -5,6 +5,9 @@
     properties:
       - build-discarder:
           days-to-keep: '{build-days-to-keep}'
+          num-to-keep: 40
+          artifact-days-to-keep: -1
+          artifact-num-to-keep: 5
 
 - parameter:
     name: opendaylight-infra-parameters
           description: 'Parameter to identify an ODL Gerrit project'
       - string:
           name: ARCHIVE_ARTIFACTS
-          default: '{artifacts} **/target/surefire-reports/*-output.txt **/hs_err_*.log **/target/feature/feature.xml'
+          default: >
+              {artifacts}
+              **/target/surefire-reports/*-output.txt
+              **/hs_err_*.log
+              **/target/feature/feature.xml
+              **/*.hprof
           description: 'Space separated glob patterns for artifacts to archive into logs.opendaylight.org'
       - string:
           name: GERRIT_PROJECT
           cd packer
           export PACKER_LOG="yes" && \
           export PACKER_LOG_PATH="packer-build.log" && \
-                      packer.io build -var-file=$CLOUDENV \
+                      packer.io build -color=false -var-file=$CLOUDENV \
                        -var-file=../packer/vars/{platform}.json \
                        ../packer/templates/{template}.json
 
index 8f8e84ce5c01eb48bda9820e31b4f9a3fb37a198..c6ee1eab24d31ca84ce8100b3ef918dddb610941 100644 (file)
@@ -1 +1 @@
-jenkins-job-builder==1.6.1
+jenkins-job-builder==1.6.2
index b019631912c1ca24b98830cebdf8b4ac938ed30a..8a9971f78ec93db84515067a0603d175c89b33ad 100644 (file)
@@ -5,6 +5,33 @@
 # force any errors to cause the script and job to end in failure
 set -xeu -o pipefail
 
+ensure_kernel_install() {
+    # Workaround for mkinitrd failing on occassion.
+    # On CentOS 7 it seems like the kernel install can fail it's mkinitrd
+    # run quietly, so we may not notice the failure. This script retries for a
+    # few times before giving up.
+    initramfs_ver=$(rpm -q kernel | tail -1 | sed "s/kernel-/initramfs-/")
+    grub_conf="/boot/grub/grub.conf"
+    # Public cloud does not use /boot/grub/grub.conf and uses grub2 instead.
+    if [ ! -e "$grub_conf" ]; then
+        echo "$grub_conf not found. Using Grub 2 conf instead."
+        grub_conf="/boot/grub2/grub.cfg"
+    fi
+
+    for i in $(seq 3); do
+        if grep "$initramfs_ver" "$grub_conf"; then
+            break
+        fi
+        echo "Kernel initrd missing. Retrying to install kernel..."
+        yum reinstall -y kernel
+    done
+    if ! grep "$initramfs_ver" "$grub_conf"; then
+        cat /boot/grub/grub.conf
+        echo "ERROR: Failed to install kernel."
+        exit 1
+    fi
+}
+
 rh_systems() {
     # Handle the occurance where SELINUX is actually disabled
     SELINUX=$(grep -E '^SELINUX=(disabled|permissive|enforcing)$' /etc/selinux/config)
@@ -50,12 +77,9 @@ EOF
     echo "---> Updating operating system"
     yum clean all
     yum install -y deltarpm
-
-    # Workaround for kernel panic issue that appears sometimes after kernel update
-    #     https://www.centos.org/forums/viewtopic.php?t=22425
-    yum remove -y kernel
     yum update -y
-    yum install -y kernel
+
+    ensure_kernel_install
 
     # add in components we need or want on systems
     echo "---> Installing base packages"
@@ -85,7 +109,7 @@ EOF
             fi
         ;;
         RedHat|CentOS)
-            if [ "$(echo $FACTER_OSVER | cut -d'.' -f1)" -ge "7" ]
+            if [ "$(echo "$FACTER_OSVER" | cut -d'.' -f1)" -ge "7" ]
             then
                 echo "---> not modifying java alternatives as OpenJDK 1.7.0 does not exist"
             else
@@ -138,7 +162,7 @@ Dpkg::Options {
 EOF
 
     # Add hostname to /etc/hosts to fix 'unable to resolve host' issue with sudo
-    sed -i "/127.0.0.1/s/$/ `hostname`/" /etc/hosts
+    sed -i "/127.0.0.1/s/$/ $(hostname)/" /etc/hosts
 
     echo "---> Updating operating system"
 
@@ -149,6 +173,7 @@ EOF
     # Use retry loop to install packages for failing mirrors
     for i in {0..5}
     do
+        echo "Attempt $i of installing base packages..."
         apt-get clean
         apt-get update -m
         apt-get upgrade -m
@@ -156,8 +181,9 @@ EOF
 
         for pkg in unzip xz-utils puppet git git-review libxml-xpath-perl
         do
+            # shellcheck disable=SC2046
             if [ $(dpkg-query -W -f='${Status}' $pkg 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
-              apt-get install $pkg;
+                apt-get install $pkg
             fi
         done
     done
index 15827864a096dbc28478d527ddfc78c78a3ca0df..a91d7619d68d843467b6a73d0153f402bf5189e9 100644 (file)
@@ -43,9 +43,16 @@ do
     pip install -c requirements/upper-constraints.txt -r ${proj}/test-requirements.txt
 done
 
-echo '---> Installing openvswitch from openstack repo'
-# the newton release has ovs 2.5.0
-yum install -y http://rdoproject.org/repos/openstack-newton/rdo-release-newton.rpm
+if [ "$branch" == "stable/mitaka" ] || [ "$branch" == "stable/liberty" ]; then
+    # the newton release has ovs 2.5.0
+    echo '---> Installing openvswitch from openstack Newton repo (2.5.0)'
+    yum install -y http://rdoproject.org/repos/openstack-newton/rdo-release-newton.rpm
+else
+    # the ocata release has ovs 2.6.1
+    echo '---> Installing openvswitch from openstack Ocata repo (2.6.1)'
+    yum install -y http://rdoproject.org/repos/openstack-ocata/rdo-release-ocata.rpm
+fi
+
 yum install -y --nogpgcheck openvswitch
 
 cd $OLDPWD
index 8188e601d41aa8ab31120bf1b3df22b4b3f43c88..a379eb19190d8af43e71d1284e59ac8fc7847cc5 100644 (file)
@@ -22,6 +22,9 @@ yum install -y python-{devel,virtualenv,setuptools,pip}
 # Needed by autorelease scripts
 yum install -y xmlstarlet
 
+# Needed by docs project
+yum install -y graphviz
+
 # sshpass for the current deploy test to be runable immediatelly after
 # build
 yum install -y sshpass
index f042b0836d026babfadaf8ef9c78f698461e7adf..e3e0d0fc170b7a8f67c34299a9dcda3b6d479976 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 25b0244cf2a01b622ca0e772bcf5268b34c62de4..9c2ac20fdbc300cb6a6fd60b0a85eebb06b7b6b8 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index d166632ce695a4268fc080273263da5e7b8dad99..74f89faa9e105d5869d13323a91d568b0bec9fa1 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index e3fe2b4ac294dd5d4bd88722025371d90d6e1572..dc38a548161e94a697b0782e89b644d30d303538 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 5c19c97b60879650d3b0598d6a1ad97dfea1d2ff..5fccb455aa46d95c0c5f1b2a37c32aca63d380ae 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index d3816b6ba57edc7e1ea25cd98cefcec8efef82b5..b82f468dafdbbcc90df6776e05a00ab90176ab2b 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
@@ -57,7 +55,9 @@
   "provisioners": [
     {
       "type": "shell",
-      "inline": ["mkdir -p /tmp/packer"]
+      "inline": [
+        "mkdir -p /tmp/packer"
+      ]
     },
     {
       "type": "file",
index 30c38b4d6603ef713bba5787a6cd32327620f903..ef5f42e0453e3340c13f34d243b58b8d76583eca 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 49f29527a243f526256063d97841eb1d0a03dcf2..ea2882086495292bff6897cfb4ef183741dd3e36 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 02f83807d251e49470b9fb55ae7042efadc65e42..204ec4773d422e9628d4241ce560126dacbca60c 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 1bb33619b2d5552f0e61952bee3a4b8b9b5ebf07..702f5be15b6206791927f0832cee935e0c9a4c22 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 790a482a9ebe13d0a09a75c429b1ad196a63f7d3..d79322dc390ce544198122b1fa1fcf5b2641f428 100644 (file)
@@ -7,7 +7,6 @@
     "public_tenant": null,
     "public_user": null,
     "public_pass": null,
-
     "private_base_image": null,
     "private_network": null,
     "private_cloud_user": null,
@@ -15,7 +14,6 @@
     "private_tenant": null,
     "private_user": null,
     "private_pass": null,
-
     "distro": null,
     "cloud_user_data": null
   },
index 5602797b11bae85c63de2b0f24243b96c16b9396..30c0d4a1a2628158289ac6b08ea96eb41a27182e 100644 (file)
@@ -1,10 +1,8 @@
 {
   "public_base_image": "CentOS 7 (PVHVM)",
   "public_cloud_user": "root",
-
   "private_base_image": "CentOS 7 (cloudimg 1510)",
   "private_cloud_user": "centos",
-
   "distro": "CentOS 7",
   "cloud_user_data": "provision/rh-user_data.sh"
 }
index fbdb0750f29115e595f6ccf260260d4ac0fe5912..efd33d900c38bc79a28a36d98e6793470fdf46b5 100644 (file)
@@ -1,13 +1,10 @@
 {
   "public_auth_url": "https://identity.api.rackspacecloud.com/v2.0/",
-
   "public_tenant": "TENNANTID",
   "public_user": "USERID",
   "public_pass": "USERPASS",
   "public_network": "cac67a72-aefc-48f8-ae55-9affa3540dd0",
-
   "private_auth_url": "https://privapi.opendaylight.org:5000/v2.0",
-
   "private_tenant": "TENNANTID",
   "private_user": "USERID",
   "private_pass": "USERPASS",
index 846ab9b229c429f4d58fdddf6d529a64ae09a61a..699fef59e8ff7e7fcf5591c7b3bc0818724f1d78 100644 (file)
@@ -1,10 +1,8 @@
 {
   "public_base_image": "Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)",
   "public_cloud_user": "root",
-
   "private_base_image": "Ubuntu 14.04 LTS Trusty Tahr (cloudimg)",
   "private_cloud_user": "ubuntu",
-
   "distro": "Ubuntu 14.04",
   "cloud_user_data": "provision/null_data.sh"
 }
index ae1154b44af6b7c15114106655a4afb6347cac68..760cd6475226bc481407a77c2ea27cf0a7facf0a 100644 (file)
@@ -1,10 +1,8 @@
 {
   "public_base_image": "Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)",
   "public_cloud_user": "root",
-
   "private_base_image": "Ubuntu 16.04 LTS (2016-05-03 cloudimg)",
   "private_cloud_user": "ubuntu",
-
   "distro": "Ubuntu 16.04",
   "cloud_user_data": "provision/null_data.sh"
 }
index 4484cd820d598252c12f0e2a05a484f063fe9a47..32d76ab6ea39853b71b2bffaf3208dbabd1326b7 100644 (file)
@@ -1,6 +1,8 @@
 extends: default
 
 rules:
+  empty-lines:
+    max-end: 1
   line-length:
     max: 120