Merge "Remove maven_metadata_validate function"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 8 May 2018 23:17:37 +0000 (23:17 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Tue, 8 May 2018 23:17:37 +0000 (23:17 +0000)
docs/jjb/lf-maven-jobs.rst
docs/jjb/lf-python-jobs.rst
jjb/lf-maven-jobs.yaml
jjb/lf-python-jobs.yaml
shell/common-variables.sh
shell/maven-deploy.sh

index 939aaf8..2fe043d 100644 (file)
@@ -109,7 +109,7 @@ Produces a CLM scan of the code into Nexus IQ Server.
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -151,7 +151,7 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -190,7 +190,7 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -247,7 +247,7 @@ This job uses the following strategy to deploy jobs to Nexus:
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :nexus-cut-dirs: Number of directories to cut from file path for `wget -r`.
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
@@ -298,7 +298,7 @@ directory can then be reused later to deploy to Nexus.
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -342,7 +342,7 @@ interest in that kind of support.
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -379,7 +379,7 @@ Verify job which runs mvn clean install to test a project build..
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -423,7 +423,7 @@ via comment trigger.
         Maven configuration. (default: global-settings)
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
index 6288c4d..d527948 100644 (file)
@@ -136,7 +136,7 @@ https://docs.sonarqube.org/display/PLUG/Python+Coverage+Results+Import
     :java-version: Version of Java to use for the build. (default: openjdk8)
     :mvn-global-settings: The name of the Maven global settings to use for
         Maven configuration. (default: global-settings)
-    :mvn-version: Version of maven to use. (default: mvn33)
+    :mvn-version: Version of maven to use. (default: mvn35)
     :stream: Keyword used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
index b2482c1..ca94823 100644 (file)
     mvn-global-settings: global-settings
     mvn-opts: ''
     mvn-params: ''
-    mvn-version: mvn33
+    mvn-version: mvn35
     staging-profile-id: ''  # Unused in this job
     stream: master
     submodule-recursive: true
     mvn-global-settings: global-settings
     mvn-opts: ''
     mvn-params: ''
-    mvn-version: mvn33
+    mvn-version: mvn35
     staging-profile-id: ''  # Unused by the javadoc jobs
     stream: master
     submodule-recursive: true
     mvn-global-settings: global-settings
     mvn-opts: ''
     mvn-params: ''
-    mvn-version: mvn33
+    mvn-version: mvn35
     staging-profile-id: ''  # Unused by the javadoc jobs
     stream: master
     submodule-recursive: true
     mvn-goals: clean deploy
     mvn-opts: ''
     mvn-params: '-Dmerge'
-    mvn-version: mvn33
+    mvn-version: mvn35
     nexus-cut-dirs: 6  # Number of dirs in the Nexus path to remove for wget -r.
     staging-profile-id: ''  # Unused by this job.
     stream: master
     mvn-goals: clean deploy
     mvn-opts: ''
     mvn-params: ''
-    mvn-version: mvn33
+    mvn-version: mvn35
     stream: master
     submodule-recursive: true
 
     mvn-global-settings: global-settings
     mvn-opts: ''
     mvn-params: ''
-    mvn-version: mvn33
+    mvn-version: mvn35
     sonar-mvn-goal: 'sonar:sonar'
     staging-profile-id: ''  # Unused in this job
     stream: master
     mvn-goals: clean deploy
     mvn-opts: ''
     mvn-params: '-Dstream=$STREAM'
-    mvn-version: mvn33
+    mvn-version: mvn35
     staging-profile-id: ''  # Unused in this job
     stream: master
     submodule-recursive: true
     mvn-goals: clean deploy
     mvn-opts: ''
     mvn-params: '-Dstream=$STREAM'
-    mvn-version: mvn33
+    mvn-version: mvn35
     staging-profile-id: ''  # Unused by this job
     stream: master
     submodule-recursive: true
index 0029f3e..54bab29 100644 (file)
     python-version: python2
     mvn-global-settings: global-settings
     mvn-settings: '{mvn-settings}'
-    mvn-version: mvn33
+    mvn-version: mvn35
     sonar-mvn-goal: 'sonar:sonar'
     stream: master
     submodule-recursive: true
index deb1058..6a5d2fb 100644 (file)
@@ -29,63 +29,3 @@ lftools_activate() {
     source "/tmp/v/lftools/bin/activate"
     set -u  # Restore unbound variable checking
 }
-
-# Check maven-metadata.xml for any unexpected timestamp mismatches
-maven_metadata_validate() {
-    stage_dir="$1"
-
-    if [ -z "$1" ]; then
-        echo "Usage: maven_metadata_validate STAGE_REPO_DIR"
-        exit 1
-    fi
-
-    error_detected=0
-    mapfile -t files < <(find "$stage_dir" -name maven-metadata.xml | grep SNAPSHOT)
-
-    for f in "${files[@]}"; do
-        timestamp=$(xmlstarlet sel \
-            -t -v "/metadata/versioning/snapshot/timestamp" "$f")
-
-        # Scan all snapshot versions but ignore javadoc and source jars
-        mapfile -t ext_timestamps < <(xmlstarlet sel \
-            -t -m "/metadata/versioning/snapshotVersions/snapshotVersion" \
-            -n \
-            --if "classifier='javadoc'" \
-               -o "" \
-            --elif "classifier='sources'" \
-               -o "" \
-            --else \
-               -o "extension:" -v extension \
-               -o " value:" -v value \
-               -o " updated:" -v updated \
-            "$f")
-
-        for t in "${ext_timestamps[@]}"; do
-            # Ignore blank timestamps caused by xmlstarlet ignores
-            if [[ -z "$t" ]]; then
-                continue
-            fi
-
-            timestamp_error=0
-            if [[ $t != *"$timestamp"* ]]; then
-                echo "Metadata $f 'value:$timestamp' mismatch vs '$t'"
-                timestamp_error=1
-            fi
-            # Updated is timestamp without the dot character
-            if [[ $t != *"${timestamp//\./}"* ]]; then
-                echo "Metadata $f 'updated:${timestamp//\./}' mismatch vs '$t'"
-                timestamp_error=1
-            fi
-
-            if [[ $timestamp_error != 0 ]]; then
-                error_detected=1
-                cat "$f"
-            fi
-        done
-    done
-
-    if [ $error_detected -ne 0 ]; then
-        echo "ERROR: Mismatches in maven-metadata discovered. Quitting..."
-        exit 1
-    fi
-}
index 4f6f584..0ab5c6c 100644 (file)
@@ -40,7 +40,6 @@ fi
 set -u  # Re-enable.
 
 find "$m2repo_dir" -type d -empty -delete
-maven_metadata_validate "$m2repo_dir"
 
 echo "-----> Upload files to Nexus"
 lftools deploy nexus -s "$nexus_repo_url" "$m2repo_dir"