Merge "Revert "Temporarily disable installs from archive.apache.org""
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Mon, 11 Apr 2016 16:59:00 +0000 (16:59 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 11 Apr 2016 16:59:00 +0000 (16:59 +0000)
jjb/lispflowmapping/lispflowmapping-csit-performance.yaml
jjb/netvirt/include-raw-cleanup-docker.sh [new file with mode: 0644]
jjb/netvirt/include-raw-setup-docker.sh [new file with mode: 0644]
jjb/netvirt/netvirt-full-integration.yaml [new file with mode: 0644]
jjb/spectrometer/spectrometer-jobs.yaml [moved from jjb/spectrometer/spectrometer-python.yaml with 74% similarity]
scripts/odlrelease
scripts/odlsign-bulk [new file with mode: 0755]

index 46fe80361436774e19da3c14f4bc01fb1c2fb6d7..c76676d0a80afea951fc12ecfa95368deefd981c 100644 (file)
@@ -16,7 +16,7 @@
             jre: 'openjdk8'
         - beryllium:
             branch: 'stable/beryllium'
-            jre: 'openjdk7'
+            jre: 'openjdk8'
 
     install:
         - only:
diff --git a/jjb/netvirt/include-raw-cleanup-docker.sh b/jjb/netvirt/include-raw-cleanup-docker.sh
new file mode 100644 (file)
index 0000000..014178c
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+echo "---> Cleaning up OVS $OVS_VERSION"
+docker logs $CID > $WORKSPACE/docker-ovs-${OVS_VERSION}.log
+docker stop $CID
+docker rm $CID
+rm env.properties
+
+docker images
diff --git a/jjb/netvirt/include-raw-setup-docker.sh b/jjb/netvirt/include-raw-setup-docker.sh
new file mode 100644 (file)
index 0000000..6056b74
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+OVS_VERSION=${OVS_VERSION:-2.3.2}
+
+echo "---> Cleaning up existing Docker processes and images"
+for x in $(docker ps -a -q)
+do
+   docker stop "$x"
+   docker rm "$x"
+done
+
+for x in $(docker images | egrep -e 'davetucker|mgkwill|socketplane' | awk '{print $3}')
+do
+   docker rmi "$x"
+done
+
+
+
+echo "---> Starting OVS $OVS_VERSION"
+/usr/bin/docker pull mgkwill/openvswitch:$OVS_VERSION
+CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t mgkwill/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`
+echo "CONTROLLER_IP=${CONTROLLER_IP}" >> env.properties
+
+echo "---> Waiting..."
+sleep 10
diff --git a/jjb/netvirt/netvirt-full-integration.yaml b/jjb/netvirt/netvirt-full-integration.yaml
new file mode 100644 (file)
index 0000000..75986c3
--- /dev/null
@@ -0,0 +1,120 @@
+- project:
+    name: netvirt-full-integration
+    jobs:
+        - 'netvirt-daily-full-integration-{stream}'
+
+    # stream:    release stream (eg. stable-lithium or beryllium)
+    # branch:    git branch (eg. stable/lithium or master)
+    stream:
+        - boron:
+            branch: 'master'
+            jdk: openjdk8
+            jdks:
+                - openjdk8
+        - beryllium:
+            branch: 'stable/beryllium'
+            jdk: openjdk8
+            jdks:
+                - openjdk8
+        - stable-lithium:
+            branch: 'stable/lithium'
+            jdk: openjdk7
+            jdks:
+                - openjdk7
+
+    project: 'netvirt'
+
+- job-template:
+    name: 'netvirt-daily-full-integration-{stream}'
+
+    # Required Variables:
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
+
+    project-type: matrix
+    node: matrix_master
+    description: 'Integration tests for the netvirt project against different versions of OVS and branches. This job runs nightly. '
+    execution-strategy:
+        sequential: true
+
+    axes:
+        - axis:
+            type: user-defined
+            name: 'OVS_VERSION'
+            values:
+                - 2.3.2
+                - 2.4.0
+        - axis:
+            type: jdk
+            values: '{obj:jdks}'
+
+        - axis:
+            type: slave
+            name: nodes
+            values:
+                - dynamic_docker
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    wrappers:
+        - timeout:
+            fail: true
+            timeout: 360
+            timeout-var: 'BUILD_TIMEOUT'
+            type: absolute
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - timed: '@midnight'
+
+    builders:
+        - wipe-org-opendaylight-repo
+        - shell:
+            !include-raw-escape:
+                - include-raw-setup-docker.sh
+        - inject:
+            properties-file: env.properties
+        - maven-target:
+            maven-version: '{mvn33}'
+            pom: 'pom.xml'
+            goals: 'clean install -V verify -Pintegrationtest -Dskip.karaf.featureTest=true -Dmaven.compile.fork=true -Dovsdb.controller.address=${{CONTROLLER_IP}}'
+            properties:
+                - 'ovsdbserver.ipaddress=127.0.0.1'
+                - 'ovsdbserver.port=6641'
+                - 'ovsdb.userspace.enabled=yes'
+                - 'maven.repo.local=/tmp/r'
+                - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
+                - 'stream={stream}'
+            java-opts:
+                - '-Xmx1024m -XX:MaxPermSize=256m'
+            settings: '{netvirt-settings}'
+            global-settings: '{odl-global-settings}'
+        - shell:
+            !include-raw-escape:
+                - include-raw-cleanup-docker.sh
+        - jacoco-nojava-workaround
+
+    publishers:
+        - archive:
+            artifacts: 'docker-ovs-*.log'
+            fingerprint: false
+        - email-notification:
+            email-prefix: '[netvirt]'
similarity index 74%
rename from jjb/spectrometer/spectrometer-python.yaml
rename to jjb/spectrometer/spectrometer-jobs.yaml
index ac9c06558a4922bb76df1f94b3170ae6c11b8f50..b5b1d8697dc0af746a8236898533ecd4a87082d9 100644 (file)
@@ -1,16 +1,18 @@
 - project:
-    name: spectrometer-python
+    name: spectrometer
     jobs:
-        - 'spectrometer-verify-python-{stream}'
+        - 'spectrometer-merge-{stream}'
+        - '{name}-verify-python-{stream}'
 
     stream:
         - master:
             branch: 'master'
 
     project: 'spectrometer'
+    toxdir: server
 
 - job-template:
-    name: 'spectrometer-verify-python-{stream}'
+    name: 'spectrometer-merge-{stream}'
 
     project-type: freestyle
     node: dynamic_verify
@@ -21,6 +23,8 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
+        - gerrit-refspec-parameter:
+            refspec: 'refs/heads/{branch}'
 
     scm:
         - gerrit-trigger-scm:
@@ -44,9 +48,7 @@
                     exclude-no-code-change: 'false'
                 - draft-published-event
                 - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
+                    comment-contains-value: 'remerge'
             projects:
               - project-compare-type: 'ANT'
                 project-pattern: 'spectrometer'
 
     builders:
         - shell: |
-            virtualenv $WORKSPACE/venv-tox
-            source $WORKSPACE/venv-tox/bin/activate
-            pip install tox argparse
-            tox --version
-            cd server
-            tox
+            wget --post-data=test -qO- https://readthedocs.org/build/opendaylight-spectrometer &> /dev/null
 
     publishers:
         - email-notification:
index 91e68e7c8db6d2957a64f3a0203b8ad96de75122..61526084ecf425fb74dee124a9f774130a04e240 100755 (executable)
@@ -37,7 +37,7 @@ function sign {
     echo "Fetching artifacts from $URL"
     # Fetch Artifacts
     wget --recursive --execute robots=off --no-parent --quiet \
-        --no-host-directories --cut-dirs=2 \
+        --no-host-directories --cut-dirs=3 \
         $URL
 
     # Remove files that don't need signing
diff --git a/scripts/odlsign-bulk b/scripts/odlsign-bulk
new file mode 100755 (executable)
index 0000000..6a9acf8
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 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
+##############################################################################
+
+function print_usage {
+    echo "Usage: $0 <staging-repo>"
+    echo ""
+    echo "    <staging-repo>   : The Nexus staging repo ID to sign."
+}
+
+if [ -z "$1" ]; then
+    print_usage
+    exit 1
+fi
+
+SIGNREPO=$1
+SIGNATURES_DIR="gpg-signatures"
+TMPFILE=/tmp/project-list.txt
+
+wget -q https://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/ -O $TMPFILE
+PROJECTS=`grep '/</a>' $TMPFILE | sed -e 's#/</a>.*##' -e 's#.*/">##'`
+echo "Projects detected: $PROJECTS"
+
+#
+# Prepare staging repo to upload signatures to
+#
+
+if [ -d "$SIGNATURES_DIR" ]; then
+    echo "$SIGNATURES_DIR directory exists. Clearing..."
+    rm -rf $SIGNATURES_DIR
+fi
+mkdir $SIGNATURES_DIR
+
+mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \
+    -DskipStagingRepositoryClose=true \
+    -DrepositoryDirectory="$SIGNATURES_DIR" \
+    -DnexusUrl=https://nexus.opendaylight.org/ \
+    -DstagingProfileId="425e43800fea70" \
+    -DserverId="opendaylight.staging" | tee /tmp/deploy-staged-repository.log
+
+STAGED_REPO_ID=`grep 'Created staging repository with ID' /tmp/deploy-staged-repository.log | sed -e 's/.*ID "//' -e 's/".*//'`
+echo "Staged Repo: $STAGED_REPO"
+
+#
+# Finally retrieve and sign artifacts.
+#
+
+for i in $PROJECTS
+do
+    echo "Signing $i"
+    ./odlrelease sign http://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/$i/
+    mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \
+        -DskipStagingRepositoryClose=true \
+        -DstagingRepositoryId=$STAGED_REPO_ID \
+        -DrepositoryDirectory="$SIGNATURES_DIR" \
+        -DnexusUrl=https://nexus.opendaylight.org/ \
+        -DstagingProfileId="425e43800fea70" \
+        -DserverId="opendaylight.staging"
+done