Merge "Add packer jobs to build Ubuntu 18.04 images"
authorSam Hague <shague@redhat.com>
Tue, 18 Sep 2018 12:57:52 +0000 (12:57 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 18 Sep 2018 12:57:52 +0000 (12:57 +0000)
17 files changed:
jjb/autorelease/autorelease-macros.yaml
jjb/autorelease/autorelease-templates.yaml
jjb/autorelease/prepare-release.sh
jjb/controller/controller.yaml
jjb/global-jjb
jjb/integration/common-functions.sh
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/integration/integration-templates.yaml
jjb/netvirt/netvirt-csit-multi-openstack.yaml
jjb/odl-openstack-check-image-protection.sh
jjb/odl-openstack-cleanup-old-images.sh
jjb/odl-openstack-cleanup-orphaned-nodes.sh
jjb/odl-openstack-cleanup-stale-nodes.sh
jjb/odl-openstack-cleanup-stale-stacks.sh
jjb/odl-openstack-cleanup-stale-volumes.sh
jjb/releng-jobs.yaml
jjb/yangtools/yangtools.yaml

index e6bf110b6c3e1a3a3fc09929e84bfb4f878135af..5ade7e8bafb6151449007e575f32c9f5705bebc8 100644 (file)
     name: autorelease-generate-release-patches
     builders:
       - shell: !include-raw:
-          - ../global-jjb/shell/lftools-install.sh
           - prepare-release.sh
 
 - builder:
index 5280e00a3292df4bae64ee20acab2f547f783029..dc03923f230cbc714184664edffa9458826b24da 100644 (file)
           forbidden-files: ''
 
     builders:
+      - lf-infra-pre-build
       - autorelease-checkout-gerrit-patch
       - autorelease-compare-projects
       - jacoco-nojava-workaround
index d60364ee06588904401f62f7ff3de09fa324fb0b..59c0a94eeacf5b5492d44aa9994e84749d0f37c7 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2015, 2017 The Linux Foundation and others.
index 3d9a339fe8173ac0fc44b1d6e2a73d07fd491616..0fe1d192014eac704d6256aa237525f86aef9b4e 100644 (file)
@@ -4,6 +4,11 @@
     jobs:
       - '{project-name}-distribution-check-{stream}'
       - '{project-name}-maven-javadoc-jobs'
+      - '{project-name}-rtd-jobs':
+          build-node: centos7-builder-2c-2g
+          project-pattern: controller
+          rtd-build-url: https://readthedocs.org/api/v2/webhook/odl-controller/48288/
+          rtd-token: b8440116c823a80c0fb0479eb7448a9196e6932f
       - odl-maven-jobs
 
     stream: neon
     jobs:
       - '{project-name}-distribution-check-{stream}'
       - '{project-name}-maven-javadoc-jobs'
+      - '{project-name}-rtd-jobs':
+          build-node: centos7-builder-2c-2g
+          project-pattern: controller
+          rtd-build-url: https://readthedocs.org/api/v2/webhook/odl-controller/48288/
+          rtd-token: b8440116c823a80c0fb0479eb7448a9196e6932f
       - odl-maven-jobs
 
     stream: fluorine
index edeb841d4bdfe240fa88b52a8d78caeffbab50f6..c61d85ac2a8d2aa6bacfa4719c5ec89e3c5de88c 160000 (submodule)
@@ -1 +1 @@
-Subproject commit edeb841d4bdfe240fa88b52a8d78caeffbab50f6
+Subproject commit c61d85ac2a8d2aa6bacfa4719c5ec89e3c5de88c
index 48280d1cd994eadf9bc5ec47882d36e4c676cc70..e3499828b727d2529474efdb9f8cb55fa7c74627 100644 (file)
@@ -419,6 +419,7 @@ EOF
 
     mv /tmp/changes.txt ${WORKSPACE}/archives
     mv ${WORKSPACE}/rabbit.txt ${WORKSPACE}/archives
+    mv ${WORKSPACE}/haproxy.cfg ${WORKSPACE}/archives
 
     sleep 5
     # FIXME: Do not create .tar and gzip before copying.
index 7b7c12360c9e1e15c036ce824d650b6df42a02bb..1eef8c16efd216f39b011506e09812fe7ed86d9c 100644 (file)
@@ -450,16 +450,16 @@ EOF
 } # create_compute_node_local_conf()
 
 function configure_haproxy_for_neutron_requests() {
-    MGRIP=$1
+    local -r haproxy_ip=$1
     # shellcheck disable=SC2206
-    ODL_IPS=(${2//,/ })
+    local -r odl_ips=(${2//,/ })
 
     cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF
 sudo systemctl stop firewalld
 sudo yum -y install policycoreutils-python haproxy
 EOF
 
-cat > ${WORKSPACE}/haproxy.cfg << EOF
+    cat > ${WORKSPACE}/haproxy.cfg << EOF
 global
   daemon
   group  haproxy
@@ -481,28 +481,39 @@ defaults
   timeout  check 10s
 
 listen opendaylight
-  bind ${MGRIP}:8080
+  bind ${haproxy_ip}:8181 transparent
+  mode http
+  http-request set-header X-Forwarded-Proto https if { ssl_fc }
+  http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
+  option httpchk GET /diagstatus
+  option httplog
   balance source
+EOF
 
-listen opendaylight_rest
-  bind ${MGRIP}:8181
-  balance source
+    odlindex=1
+    for odlip in ${odl_ips[*]}; do
+        echo "  server opendaylight-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
+        odlindex=$((odlindex+1))
+    done
 
-listen opendaylight_websocket
-  bind ${MGRIP}:8185
-  balance source
+    cat >> ${WORKSPACE}/haproxy.cfg << EOF
 
+listen opendaylight_ws
+  bind ${haproxy_ip}:8185 transparent
+  mode http
+  timeout connect 5s
+  timeout client 25s
+  timeout server 25s
+  timeout tunnel 3600s
+  balance source
 EOF
 
     odlindex=1
-    for odlip in ${ODL_IPS[*]}; do
-        sed -i "/listen opendaylight$/a server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
-        sed -i "/listen opendaylight_rest$/a server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
-        sed -i "/listen opendaylight_websocket$/a server controller-websocket-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
+    for odlip in ${odl_ips[*]}; do
+        echo "  server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
         odlindex=$((odlindex+1))
     done
 
-
     echo "Dump haproxy.cfg"
     cat ${WORKSPACE}/haproxy.cfg
 
@@ -517,11 +528,11 @@ sudo systemctl status haproxy
 true
 EOF
 
-    scp ${WORKSPACE}/install_ha_proxy.sh ${MGRIP}:/tmp
-    ${SSH} ${MGRIP} "sudo bash /tmp/install_ha_proxy.sh"
-    scp ${WORKSPACE}/haproxy.cfg ${MGRIP}:/tmp
-    scp ${WORKSPACE}/deploy_ha_proxy.sh ${MGRIP}:/tmp
-    ${SSH} ${MGRIP} "sudo bash /tmp/deploy_ha_proxy.sh"
+    scp ${WORKSPACE}/install_ha_proxy.sh ${haproxy_ip}:/tmp
+    ${SSH} ${haproxy_ip} "sudo bash /tmp/install_ha_proxy.sh"
+    scp ${WORKSPACE}/haproxy.cfg ${haproxy_ip}:/tmp
+    scp ${WORKSPACE}/deploy_ha_proxy.sh ${haproxy_ip}:/tmp
+    ${SSH} ${haproxy_ip} "sudo bash /tmp/deploy_ha_proxy.sh"
 } # configure_haproxy_for_neutron_requests()
 
 # Following three functions are debugging helpers when debugging devstack changes.
@@ -719,6 +730,8 @@ if [ -n "${DEVSTACK_HASH}" ]; then
     echo "git checkout ${DEVSTACK_HASH}"
     git checkout ${DEVSTACK_HASH}
 fi
+wget https://raw.githubusercontent.com/shague/odl_tools/master/fix-logging.patch.txt -O /tmp/fix-logging.patch.txt
+patch --verbose -p1 -i /tmp/fix-logging.patch.txt
 git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s%b' -n20
 echo
 
index 1defd548879d536d64ace7f2d4d112aeb4f0a554..4eaf1be1080a45ff5c54a7e8ba7b693041e9b3b4 100644 (file)
           refspec: '$PATCHREFSPEC'
           branch: 'master'
 
+    triggers:
+      # we need this for not SR projects
+      - integration-csit-trigger:
+          jobs: '{trigger-jobs}'
+
     wrappers:
       - opendaylight-infra-wrappers:
           build-timeout: '{build-timeout}'
index 4e603fb23fdb8785636378070e1e8bb8857c021f..76c36daae5813c34315b1b062a025aff15e1f270 100644 (file)
           openstack_system2_image: '{openstack_system_image_queens}'
 
 - project:
-    name: netvirt-csit-1cmb-0ctl-0cmp-openstack-integration-fluorine
+    name: netvirt-csit-1cmb-0ctl-0cmp-openstack-integration
     jobs:
       - inttest-csit-openstack
 
     project: 'netvirt'
-    stream: 'fluorine'
-    branch: 'master'
     testplan: '{project}-{topology}-openstack.txt'
     odl-ml2-driver-version: 'v2'
     enable-openstack-services: 'n-cpu,placement-api,tempest'
     os-ctl-cnt: 0
     os-cmp-cnt: 0
 
+    stream:
+      - neon:
+          branch: 'master'
+      - fluorine:
+          branch: 'stable/fluorine'
+      - oxygen:
+          branch: 'stable/oxygen'
+
     topology:
       - 1node:
           openstack_system2_count: 0
index 77a669e0bbbe6a59628228f4c87284677ce35f8e..76a68e5bc040f3acf7f17a0c469ab6d98d669499 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -17,9 +17,6 @@
 # by the cleanup old images job.
 echo "---> Check image protection"
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 declare -a yaml_images
 readarray -t yaml_images <<< "$(grep -r _system_image: --include \*.yaml \
     | awk -F": " -e '{print $3}' | sed "s:'::;s:'$::;/^$/d" | sort -u)"
index 01e420dde66d9d30d6a91fa87ed01ffa8fc4891a..9cc82cd823d518d47e9702d620eda20018f33c9d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 - 2018 The Linux Foundation and others.
@@ -11,6 +11,4 @@
 # Removes openstack images older than 30 days in the cloud
 echo "---> Cleanup old images"
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
 lftools openstack --os-cloud vex image cleanup --days=30
index c3c6b35a24e23c25b85e77ff60dd2851ee8d2dc1..df598b473d83eba76ae30b3803f28df1afadfe3d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 - 2018 The Linux Foundation and others.
@@ -43,9 +43,6 @@ minion_in_jenkins() {
 # Fetch server list before fetching active minions to minimize race condition
 # where we might be trying to delete servers while jobs are trying to start
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 # We purposely need word splitting here to create the OS_SERVERS array.
 # shellcheck disable=SC2207
 mapfile -t OS_SERVERS < <(openstack server list -f value -c "Name" | grep -E 'prd|snd')
@@ -69,5 +66,3 @@ for server in "${OS_SERVERS[@]}"; do
             server remove --minutes 15 "$server"
     fi
 done
-
-deactivate
index f9af3c8e168918ceec06153f9bc65551ec6ca2a4..25cf88c70f2c33b5b63404719e81d898b60344c6 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 - 2018 The Linux Foundation and others.
@@ -10,9 +10,6 @@
 ##############################################################################
 echo "---> Cleanup stale nodes"
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 # Todo: As a safe check we could obtain the list of active jobs from Jenkins and
 # compute the checksum from $JOB_NAME to check if any active nodes exist and
 # skip deleting those nodes. This step may not be required since there is already
index 16559c9feb8c5a3079a0415a579808b071899f1a..6d5e553c1a0fb6baa3a325607110dd1d145d71da 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -13,9 +13,6 @@
 # list of Jenkins instances to check for active builds.
 echo "---> Cleanup stale stacks"
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 stack_in_jenkins() {
     # Usage: check_stack_in_jenkins STACK_NAME JENKINS_URL [JENKINS_URL...]
     # Returns: 0 If stack is in Jenkins and 1 if stack is not in Jenkins.
index 433aecf2cc45aeb33d47e2005160d2f1544b1f83..3745eb25349b2974d1f0f65e05d044da6a46d19d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2018 The Linux Foundation and others.
@@ -10,8 +10,6 @@
 ##############################################################################
 # Scans OpenStack for orphaned volumes
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
 mapfile -t os_volumes < <(openstack volume list -f value -c ID --status Available)
 
 echo "---> Orphaned volumes"
@@ -23,5 +21,3 @@ else
         lftools openstack --os-cloud vex volume remove --minutes 15 "$volume"
     done
 fi
-
-deactivate
index 7cbd88e5d30e16825f8c547324b3641518d08ef4..0768c5858fc41194dbf2a508bc62189484a336da 100644 (file)
       - timed: '0,30 * * * *'
 
     builders:
-      - odl-openstack-install
+      - lf-infra-pre-build
       # Servers
       - odl-openstack-cleanup-stale-stacks
       - odl-openstack-cleanup-stale-nodes
index d7f28aaf1dde2ede1dc2e1719aea7b59b288acfc..4b0776a5bdfc2d1fe3f2354583528dd894131ca2 100644 (file)
@@ -86,7 +86,7 @@
       - gerrit-maven-sonar:
           mvn-params: >
             -Dodl.jacoco.aggregateFile=$WORKSPACE/target/jacoco.exec
-            -Dsonar.jacoco.reportPaths=$WORKSPACE/target/jacoco.exec
+            -Dsonar.jacoco.reportPath=$WORKSPACE/target/jacoco.exec
 
     project: 'yangtools'
     project-name: 'yangtools'