Merge "Switch the csit-1node-periodic to use job prefix"
authorLuis Gomez <ecelgp@gmail.com>
Thu, 25 Jan 2018 17:08:08 +0000 (17:08 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 25 Jan 2018 17:08:08 +0000 (17:08 +0000)
19 files changed:
jjb/aaa/aaa-patch-test.yaml
jjb/bgpcep/bgpcep-patch-test.yaml
jjb/genius/genius-patch-test.yaml
jjb/infrautils/infrautils-patch-test.yaml
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/integration/integration-templates.yaml
jjb/l2switch/l2switch-patch-test.yaml
jjb/lf-infra/lf-infra-jobs.yaml
jjb/netconf/netconf-patch-test.yaml
jjb/netvirt/netvirt-patch-test.yaml
jjb/openflowplugin/openflowplugin-patch-test.yaml
jjb/ovsdb/ovsdb-patch-test.yaml
jjb/packaging/build-rpm.sh
jjb/packaging/install-rpm.sh
jjb/packaging/packaging-macros.yaml [new file with mode: 0644]
jjb/packaging/packaging.yaml
jjb/packaging/test-rpm-deps.sh
jjb/sfc/sfc-patch-test.yaml
jjb/vtn/vtn-patch-test.yaml

index b826a5e39021bd60d235668d67217e58d974ba1b..48a261785e6919b0da0ad39a09ff0992bf602789 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: aaa-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'aaa'
index 1670dcd91b2abb3aedaf23c65d300ee1dfc4b49a..3c1f84b94a3f4176e2a2ea85fa01c93cf1ce5e10 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: bgpcep-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'bgpcep'
index 0bd622eb465c490a7703425921e94ccbf60cdd8c..50f22777a9443f6f9589a053042da81eb0bc586f 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: genius-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'genius'
index 2a819d4f1b53cfee05c0ee71e3ed5f196d170ebd..69eda5471b15bdf6ac3625153aab8efaca1926fa 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: infrautils-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     project: 'infrautils'
 
index 4076e47de796da36c7005e63b83ef7cf694a70b9..d413310a92be2adef584261d91668d2d73b2aca2 100644 (file)
@@ -894,7 +894,7 @@ done
 
 for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
     CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
-    echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}"
+    echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${!CONTROLIP}"
     scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp
     ${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh"
     create_etc_hosts ${!CONTROLIP}
@@ -944,7 +944,7 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
     SITE_INDEX=$((((i - 1) / NUM_COMPUTES_PER_SITE) + 1)) # We need the site index to infer the control node IP for this compute
     COMPUTEIP=OPENSTACK_COMPUTE_NODE_${i}_IP
     CONTROLIP=OPENSTACK_CONTROL_NODE_${SITE_INDEX}_IP
-    echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}"
+    echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${!COMPUTEIP}"
     scp ${WORKSPACE}/disable_firewall.sh "${!COMPUTEIP}:/tmp"
     ${SSH} "${!COMPUTEIP}" "sudo bash /tmp/disable_firewall.sh"
     create_etc_hosts ${!COMPUTEIP} ${!CONTROLIP}
index 0ea3eaa645a9ef778152bd062fc6328ba23db02b..80f2abea3ef07eea8a1abd91179982675dce4ceb 100644 (file)
 # triggers the project system test defined in {csit-list} when gerrit receives test-{project} keyword
 
 - job-template:
-    name: '{project}-patch-test-{feature}-{stream}'
+    name: '{prefix}{project}-patch-test-{feature}-{stream}'
+    id: inttest-patch-test
 
     project-type: freestyle
     node: centos7-builder-2c-8g
index bee9bf7a379df57f8da75b0957888bf675795860..70beefc48c22f0ce220e987935cf36bd50f799db 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: l2switch-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'l2switch'
index 01e71c93d49c6cf1bf288a6bf5ee2191a2a62b3f..c94f79b3e9fab177ee9e8e54f652fe56a7df57b8 100644 (file)
@@ -36,7 +36,7 @@
     project-name: lf-infra-docs
     project: releng/docs
     project-pattern: releng/docs
-    build-node: centos7-builder-2c-8g
+    build-node: centos7-builder-2c-1g
     rtd-project: lf-releng-docs
     stream: any
     branch: '*'
 - project:
     name: lf-infra-docs-conf
     jobs:
+      - '{project-name}-rtd-jobs'
       - gerrit-tox-verify
 
     project-name: lf-infra-docs-conf
     project: releng/docs-conf
     project-pattern: releng/docs-conf
-    build-node: centos7-builder-2c-8g
+    build-node: centos7-builder-2c-1g
+    rtd-project: lfdocs-conf
     stream: any
     branch: '*'
 
index 74fcde32aba979042bc8b7b7a57e50e9d8f5c593..bd4263fe90b8640053de570a0837ee6d3274855b 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: netconf-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'netconf'
index e4b323e677a3ae41ac8b4641646b0bd550b40b80..e06bfba5440f347a193839e2fdbff46af576bf33 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: netvirt-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'netvirt'
index 184a2ae1272c04fa3746a2ec759294b22d58ba81..bbf752fb894aba4a8b092a732e6511e8c3f119cf 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: openflowplugin-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'openflowplugin'
index ae1f2b693faa44d7b633d0a78805c55e7907d2e2..108fe5c431c2754f8a5dc0d7a7e19e85df777557 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: ovsdb-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'ovsdb'
index 9218d5a5fba25473e9554206c554ddfe5524354f..7613e521916e3843a471217ba52e5a48c59be033 100644 (file)
@@ -20,10 +20,10 @@ $PYTHON -m pip install -r "$WORKSPACE/packaging/packages/requirements.txt"
 # If URL is to zip, check if there's a tar.gz available to avoid repackaging.
 if [[ $DOWNLOAD_URL = *.zip ]]; then
   # shellcheck disable=SC2154
-  candidate_tarball_url="${{DOWNLOAD_URL//zip/tar.gz}}"
+  candidate_tarball_url="${DOWNLOAD_URL//zip/tar.gz}"
   # shellcheck disable=SC2154
   url_status=$(curl --silent --head --location --output /dev/null --write-out \
-    '%{{http_code}}' "$candidate_tarball_url")
+    '%{http_code}' "$candidate_tarball_url")
   if [[ $url_status = 2* ]]; then
     DOWNLOAD_URL="$candidate_tarball_url"
   fi
index 2ccc50078f18452dfe42bc5aabf50aa3d3c1d9a7..2816c4a7865ba11949c1de41aca7c33938eca5ca 100644 (file)
@@ -19,7 +19,7 @@ elif [[ $URL == *.rpm ]]; then
   sudo yum install -y "$URL"
 elif [[ $URL == *.repo ]]; then
   # shellcheck disable=SC2154
-  repo_file="${{URL##*/}}"
+  repo_file="${URL##*/}"
   sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
   sudo yum install -y opendaylight
 else
diff --git a/jjb/packaging/packaging-macros.yaml b/jjb/packaging/packaging-macros.yaml
new file mode 100644 (file)
index 0000000..57830ea
--- /dev/null
@@ -0,0 +1,22 @@
+# Integration/Packaging macros
+---
+- builder:
+    name: install-test-uninstall-rpm
+    builders:
+      - inject:
+          properties-content: 'URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm'
+      # Use *-escape to make double brace expansion work. JJB strangeness.
+      - shell: !include-raw: test-rpm-deps.sh
+      - shell: !include-raw-escape: install-rpm.sh
+      - shell: !include-raw: start-odl.sh
+      # Install deps needed interactive Karaf shell tests
+      - shell: |
+          # Install expect to interact with Karaf shell
+          # Install nmap to check status of ODL's SSH port
+          sudo yum install -y expect nmap
+      - shell: !include-raw: test-karaf.expect
+      - shell: !include-raw: stop-odl.sh
+      - shell: !include-raw: uninstall-rpm.sh
+      - shell: |
+          # Remove old host key so future installs don't fail to SSH
+          rm /home/jenkins/.ssh/known_hosts
index 664380505825896c1537d22a25cde0bbcc647ff4..ea80567dbce8ecaecacb5fef2f028598e028e2c3 100644 (file)
           build-timeout: '{build-timeout}'
 
     builders:
-      - shell: !include-raw: build-rpm.sh
-      - shell: !include-raw: test-rpm-deps.sh
-      - inject:
-          properties-content: 'URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm'
-      - shell: !include-raw: install-rpm.sh
-      - shell: !include-raw: start-odl.sh
-      - shell: |
-          # Install expect to interact with Karaf shell
-          sudo yum install -y expect
-          # Install nmap to check status of ODL's SSH port
-          sudo yum install -y nmap
-      - shell: !include-raw: test-karaf.expect
-      - shell: !include-raw: stop-odl.sh
-      - shell: !include-raw: uninstall-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
       - inject:
           properties-content: 'STREAM={stream}'
       - shell: !include-raw: build-rpm-snap.sh
-      - shell: !include-raw: test-rpm-deps.sh
+      - install-test-uninstall-rpm
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.0/karaf-0.7.0.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
 
       # Test Oxygen pre-release autorelease tarball
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
 
       # Test Oxygen multipatch zip (no parallel tarball available)
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20171128.175421-68.zip'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
 
       # Test latest Oxygen snapshot
       - inject:
           build-timeout: '{build-timeout}'
 
     builders:
-      # TODO: Install/test each RPM. Will require builder script changes.
       # Test Carbon SR2 tarball
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.2-Carbon/distribution-karaf-0.6.2-Carbon.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test Carbon multipatch zip (no parallel tarball available)
       # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.3-SNAPSHOT/distribution-karaf-0.6.3-20180115.181738-1.zip'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test latest Carbon snapshot
       - inject:
           properties-content: 'STREAM=carbon'
       - shell: !include-raw: build-rpm-snap.sh
+      - install-test-uninstall-rpm
 
       # Test Nitrogen tarball
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.0/karaf-0.7.0.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test Nitrogen SR1 tarball
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.1/karaf-0.7.1.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test Nitrogen multipatch zip (no parallel tarball available)
       # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.2-SNAPSHOT/karaf-0.7.2-20180115.183312-2.zip'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test latest Nitrogen snapshot
       - inject:
           properties-content: 'STREAM=nitrogen'
       - shell: !include-raw: build-rpm-snap.sh
+      - install-test-uninstall-rpm
 
       # Test Oxygen pre-release autorelease tarball
       # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
-      - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw-escape: build-rpm.sh
+      - install-test-uninstall-rpm
 
       # Test Oxygen multipatch zip (no parallel tarball available)
+      # FIXME: Something is wrong with current Oxygen multipatch builds
       # NB: This will need to be updated as old builds expire
-      - inject:
-          # yamllint disable-line rule:line-length
-          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180111.030942-90.zip'
-      - shell: !include-raw: build-rpm.sh
+      # - inject:
+      # yamllint disable-line rule:line-length
+      #     properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180111.030942-90.zip'
+      # - shell: !include-raw: build-rpm.sh
+      # - install-test-uninstall-rpm
 
       # Test latest Oxygen snapshot
       - inject:
           properties-content: 'STREAM=oxygen'
       - shell: !include-raw: build-rpm-snap.sh
+      - install-test-uninstall-rpm
 
     triggers:
       - timed: '@daily'
           build-timeout: '{build-timeout}'
 
     builders:
-      - shell: !include-raw: install-rpm.sh
+      - shell: !include-raw-escape: install-rpm.sh
       - shell: !include-raw: start-odl.sh
       - shell: |
           # Install expect to interact with Karaf shell
-          sudo yum install -y expect
           # Install nmap to check status of ODL's SSH port
-          sudo yum install -y nmap
+          sudo yum install -y expect nmap
       - shell: !include-raw: test-karaf.expect
       - shell: !include-raw: stop-odl.sh
       - shell: !include-raw: uninstall-rpm.sh
           build-timeout: '{build-timeout}'
 
     builders:
-      - shell: !include-raw: install-rpm.sh
+      - shell: !include-raw-escape: install-rpm.sh
       - shell: !include-raw: start-odl.sh
       - shell: |
           # Install expect to interact with Karaf shell
index 460bdaeed14f7d78e72aeacfa5871cf0816057d2..2bb0db6dbda972cc7368a4dfee44ae40dd9e008d 100644 (file)
@@ -45,16 +45,16 @@ fi
 # shellcheck disable=SC2034
 mapfile -t actual_deps < <( rpm -qp /home/$USER/rpmbuild/RPMS/noarch/*.rpm --requires )
 # shellcheck disable=SC2154 disable=SC2145
-printf 'Dependency found: %s\n' "${{actual_deps[@]}}"
+printf 'Dependency found: %s\n' "${actual_deps[@]}"
 
 # shellcheck disable=SC2154,SC2145,SC2034,SC2207
-diff_deps=(`echo "${{expected_deps[@]}}" "${{actual_deps[@]}}" | tr ' ' '\n' | sort | uniq -u`)
+diff_deps=(`echo "${expected_deps[@]}" "${actual_deps[@]}" | tr ' ' '\n' | sort | uniq -u`)
 # shellcheck disable=SC2154 disable=SC2145 disable=SC2068 disable=SC2170 disable=SC1083
-if [ ${{#diff_deps[*]}} -eq 0 ]; then
+if [ ${#diff_deps[*]} -eq 0 ]; then
     echo "RPM requirements are as expected"
 else
     echo "RPM requirements don't match the expected requirements"
     # shellcheck disable=SC2154 disable=SC2145
-    printf 'Dependency mismatch: %s\n' ${{diff_deps[@]}}
+    printf 'Dependency mismatch: %s\n' ${diff_deps[@]}
     exit 1
 fi
index df1ae61b57e7fa808f577cb88f03499ed4e0e253..dc9cf856a5d5c7f02a5780f1a9cbc721f810706d 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: sfc-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'sfc'
index 6e378e4a5eab445b43f146cf1dc2f310e515aa06..f1719f93bc8fb315412339133c211a5657773a9e 100644 (file)
@@ -2,7 +2,7 @@
 - project:
     name: vtn-patch-test
     jobs:
-      - '{project}-patch-test-{feature}-{stream}'
+      - inttest-patch-test
 
     # The project name
     project: 'vtn'