Merge "Recommend JJB 1.4.0"
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 12 Jan 2016 15:38:36 +0000 (15:38 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 12 Jan 2016 15:38:36 +0000 (15:38 +0000)
jjb/armoury/armoury.cfg
jjb/armoury/armoury.yaml
jjb/releng-jobs.yaml
scripts/.gitignore
scripts/odlrelease [new file with mode: 0755]
src/site/markdown/maven-site.md

index 27e89fa60516793acaed04050c9d10f3a96bcd87..3cecb364fd54525f2e6a97461ebad7f2dcb4de7c 100644 (file)
@@ -2,7 +2,6 @@ STREAMS:
 - beryllium:
     branch: master
     jdks: openjdk8,openjdk7
-    autorelease: true
 - pre-boron:
     branch: pre-boron
     jdks: openjdk8,openjdk7
index 57a0b32a02435bfa58bbfd4f3110f3e3b84f91ab..685e97a4b7e720da7d781f51059a5a28a9fcab31 100644 (file)
@@ -25,7 +25,7 @@
             jdks:
                 - openjdk8
                 - openjdk7
-            disable_autorelease: False
+            disable_autorelease: True
         - pre-boron:
             branch: 'pre-boron'
             jdk: openjdk8
index 911ea271c67ff910ebe01fcbfa82a2f28fa13905..f6a29cbc2d430d7514ffbde8f5a01a27882d61f6 100644 (file)
@@ -23,7 +23,7 @@
         daysToKeep: 30
         numToKeep: 10
         artifactDaysToKeep: -1
-        artifactNumToKeep: -1
+        artifactNumToKeep: 5
 
     parameters:
         - project-parameter:
index 11c400efe7ec1583ca9f329f41cd04d737da3619..c5ec4a4cbfa75b2aaf689bbb16dd4e63e1c70c54 100644 (file)
@@ -1,3 +1,7 @@
 # Python
 __pycache__/
 *.pyc
+
+# ODL Signer
+.sign-artifacts
+gpg-signatures
diff --git a/scripts/odlrelease b/scripts/odlrelease
new file mode 100755 (executable)
index 0000000..6152608
--- /dev/null
@@ -0,0 +1,86 @@
+#!/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
+##############################################################################
+
+ARTIFACT_DIR=".sign-artifacts"
+SIGNATURES_DIR="gpg-signatures"
+
+
+function print_usage {
+    echo "Usage: $0 sign <url>"
+    echo ""
+    echo "    sign   : Downloads and Signs artifacts from Nexus"
+}
+
+
+# Downloads artifacts from a Nexus URL and creates gpg signatures for them
+# and copies the signatures to a separate directory.
+function sign {
+    echo "Signing artifacts..."
+
+    if [ -d "$ARTIFACT_DIR" ]; then
+        echo "$ARTIFACT_DIR directory exists. Clearing..."
+        rm -rf $ARTIFACT_DIR
+    fi
+
+    mkdir $ARTIFACT_DIR
+    cd $ARTIFACT_DIR
+
+    echo "Fetching artifacts from $URL"
+    # Fetch Artifacts
+    wget --recursive --execute robots=off --no-parent --quiet \
+        --no-host-directories --cut-dirs=3 \
+        $URL
+
+    # Remove files that don't need signing
+    find . -type f \
+            -name "*.asc" \
+            -o -name "*.sha1" \
+            -o -name "*.md5" \
+            -o -name "_maven.repositories*" \
+            -o -name "_remote.repositories*" \
+            -o -name "maven-metadata-local.xml*" \
+            -o -name "maven-metadata.xml*" \
+            -o -name "index.html*" | xargs rm
+
+    for f in `find . -type f ! -name "*.asc" ! -name "*.sha1" ! -name "*.md5"`
+    do
+        echo "Signing $f"
+        gpg --batch -abq $f
+    done
+
+    cd ..
+
+    if [ -d "$SIGNATURES_DIR" ]; then
+        echo "$SIGNATURES_DIR directory exists. Clearing..."
+        rm -rf $SIGNATURES_DIR
+    fi
+
+    rsync -avz --include '*/' --include '*.asc' --exclude '*' \
+           "${ARTIFACT_DIR}/org" "${SIGNATURES_DIR}"
+}
+
+
+if [ -z "$2" ]; then
+    print_usage
+    exit 1
+fi
+
+MODE=$1
+URL=$2
+
+if [ "$MODE" == "sign" ]; then
+    sign
+else
+    echo "ERROR: Invalid mode."
+    print_usage
+    exit 1
+fi
index 191de0ec149f6a5aa7638d7a2d7e2ad8d2171dae..d95b2b5261780e4bf5e9ae5fd226261d1f07b66a 100644 (file)
@@ -95,10 +95,10 @@ example).
     <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
 
     <distributionManagement>
-    <site>
-      <id>opendaylight-site</id>
-      <url>${nexus.site.url}/${project.artifactId}/</url>
-    </site>
+      <site>
+        <id>opendaylight-site</id>
+        <url>${nexus.site.url}/${project.artifactId}/</url>
+      </site>
     </distributionManagement>
 
 **Note:** For the project root pom.xml remove the final path
@@ -121,3 +121,44 @@ content:
 
   * https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html
   * https://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html
+
+## <a name="aggregate_apidocs">Aggregating Java apidocs</a>
+
+Javadoc is generated automatically for each bundle however to aggregate them
+all into a single convenient url we need to ensure that the root pom has a
+profile to activate it. The following should be copied into the profiles
+section of the project root pom.
+
+    <profiles>
+      <profile>
+        <!--
+            This profile is to ensure we only build javadocs reports
+            when we plan to deploy Maven site for our project.
+        -->
+        <id>maven-site</id>
+        <activation>
+          <file>
+            <exists>${user.dir}/deploy-site.xml</exists>
+          </file>
+        </activation>
+
+        <build>
+          <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-javadoc-plugin</artifactId>
+              <inherited>false</inherited>
+              <executions>
+                <execution>
+                  <id>aggregate</id>
+                  <goals>
+                    <goal>aggregate</goal>
+                  </goals>
+                  <phase>package</phase>
+              </execution>
+              </executions>
+            </plugin>
+          </plugins>
+        </build>
+      </profile>
+    </profiles>