Do not force expected-xml 92/8392/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 13 Jan 2018 17:05:34 +0000 (12:05 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 13 Jan 2018 17:33:29 +0000 (12:33 -0500)
After using this for a few months now I'm convinced this is not the
right way to achieve what we want here. XML differences should be
informational and not build breaking. Pretty much every change
requires XML changes so I think this has been more annoying than
helpful.

This new patch removes expected-xml and instead outputs XML diffs
instead which can be stored in logs and reviewed.

Change-Id: Ia4039489502499df1b15a4d9fe1e553af3c5bfcd
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
42 files changed:
.jjb-test/expected-xml/gerrit-ciman-gerrit-branch-lock-master [deleted file]
.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job [deleted file]
.jjb-test/expected-xml/gerrit-ciman-jjb-merge [deleted file]
.jjb-test/expected-xml/gerrit-ciman-jjb-verify [deleted file]
.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-java-builder [deleted file]
.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet [deleted file]
.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-java-builder [deleted file]
.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-mininet [deleted file]
.jjb-test/expected-xml/gerrit-ciman-packer-verify [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-clm-master [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-merge-master [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-release-master [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 [deleted file]
.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 [deleted file]
.jjb-test/expected-xml/gerrit-maven-sonar [deleted file]
.jjb-test/expected-xml/gerrit-node-node-verify-master [deleted file]
.jjb-test/expected-xml/gerrit-python-tox-verify-master [deleted file]
.jjb-test/expected-xml/gerrit-rtd-rtd-merge-master [deleted file]
.jjb-test/expected-xml/gerrit-rtd-rtd-verify-master [deleted file]
.jjb-test/expected-xml/github-ciman-jjb-deploy-job [deleted file]
.jjb-test/expected-xml/github-ciman-jjb-merge [deleted file]
.jjb-test/expected-xml/github-ciman-jjb-verify [deleted file]
.jjb-test/expected-xml/github-ciman-packer-merge-centos-java-builder [deleted file]
.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet [deleted file]
.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-java-builder [deleted file]
.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-mininet [deleted file]
.jjb-test/expected-xml/github-ciman-packer-verify [deleted file]
.jjb-test/expected-xml/github-maven-maven-clm-master [deleted file]
.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master [deleted file]
.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master [deleted file]
.jjb-test/expected-xml/github-maven-maven-merge-master [deleted file]
.jjb-test/expected-xml/github-maven-maven-release-master [deleted file]
.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 [deleted file]
.jjb-test/expected-xml/github-maven-sonar [deleted file]
.jjb-test/expected-xml/github-node-node-verify-master [deleted file]
.jjb-test/expected-xml/github-python-tox-verify-master [deleted file]
.jjb-test/expected-xml/github-rtd-rtd-merge-master [deleted file]
.jjb-test/expected-xml/github-rtd-rtd-verify-master [deleted file]
jjb-compare-xml.sh
tox.ini

diff --git a/.jjb-test/expected-xml/gerrit-ciman-gerrit-branch-lock-master b/.jjb-test/expected-xml/gerrit-ciman-gerrit-branch-lock-master
deleted file mode 100644 (file)
index 1c5b305..0000000
+++ /dev/null
@@ -1,520 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>1</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>false</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>(un)?lock branch$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Generates a patch to lock|unlock a branch in Gerrit
-#
-# Assumes that the project repository was cloned via ssh and thus uses ssh to
-# install the git commit hook.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-git fetch origin refs/meta/config:config
-git checkout config
-
-install_gerrit_hook() {
-    ssh_url=$(git remote show origin | grep Fetch | grep 'ssh://' \
-        | awk -F'/' '{print $3}' | awk -F':' '{print $1}')
-    ssh_port=$(git remote show origin | grep Fetch | grep 'ssh://' \
-        | awk -F'/' '{print $3}' | awk -F':' '{print $2}')
-
-    if [ -z $ssh_url ]; then
-        echo &quot;ERROR: Gerrit SSH URL not found.&quot;
-        exit 1
-    fi
-
-    scp -p -P &quot;$ssh_port&quot; &quot;$ssh_url&quot;:hooks/commit-msg .git/hooks/
-    chmod u+x .git/hooks/commit-msg
-}
-install_gerrit_hook
-
-# Groups must be mapped in the groups file before they can be used
-if ! grep 'Registered Users'; then
-    echo -e &quot;global:Registered-Users\tRegistered Users&quot; &gt;&gt; groups
-fi
-
-mode=$(echo &quot;$GERRIT_EVENT_COMMENT_TEXT&quot; | grep branch | awk '{print $1}')
-case $mode in
-    lock)
-        echo &quot;Locking branch: $GERRIT_BRANCH&quot;
-        git config -f project.config &quot;access.refs/heads/${GERRIT_BRANCH}.exclusiveGroupPermissions&quot; &quot;submit&quot;
-        git config -f project.config &quot;access.refs/heads/${GERRIT_BRANCH}.submit&quot; &quot;block group Registered Users&quot;
-        git commit -asm &quot;Lock branch $GERRIT_BRANCH&quot;
-        ;;
-
-    unlock)
-        echo &quot;Unlocking branch: $GERRIT_BRANCH&quot;
-        git config -f project.config --remove-section &quot;access.refs/heads/${GERRIT_BRANCH}&quot; || true
-        git commit -asm &quot;Unlock branch $GERRIT_BRANCH&quot;
-        ;;
-
-    *)
-        echo &quot;ERROR: Unknown mode selected '$mode'.&quot;
-        exit 1
-        ;;
-esac
-
-git diff HEAD~1
-git push origin HEAD:refs/for/refs/meta/config
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>5</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job b/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job
deleted file mode 100644 (file)
index 1c33598..0000000
+++ /dev/null
@@ -1,542 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>1</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>refs/heads/master</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>jjb-deploy (?!\*+$).+$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PIP_PACKAGES=jenkins-job-builder</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# pip install packages into a virtualenv using the first listed package as venv name
-#
-# PIP_PACKAGES is a space separated list of pypi packages to install. The first
-#              listed package is used as the virtualenv directory name.
-echo &quot;---&gt; pip-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-# Install git-review using virtualenv to the latest version that supports
-# --reviewers option, available through pip install. Existing minion image has a
-# version that does not have it.
-virtualenv &quot;/tmp/v/${PIP_PACKAGES%% *}&quot;
-# shellcheck source=/tmp/v/venv/bin/activate disable=SC1091
-source &quot;/tmp/v/${PIP_PACKAGES%% *}/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-
-# PIP_PACKAGES needs to be passed through as a space separated list of packages
-# shellcheck disable=SC2086
-pip install --upgrade $PIP_PACKAGES
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini-sandbox</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Push a job to jenkins-sandbox via Gerrit / GitHub comment
-# Comment Pattern: jjb-deploy JOB_NAME
-# JOB_NAME: Can also include * wildcards too. Additional parameters are ignored.
-echo &quot;---&gt; jjb-deploy-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-
-# shellcheck source=/tmp/v/jenkins-job-builder/bin/activate disable=SC1091
-source &quot;/tmp/v/jenkins-job-builder/bin/activate&quot;
-
-echo &quot;-----&gt; Fetching project&quot;
-git fetch origin &quot;$GERRIT_REFSPEC&quot; &amp;&amp; git checkout FETCH_HEAD
-
-# If not Gerrit Trigger than assume GitHub
-COMMENT=&quot;${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}&quot;
-JOB_NAME=$(echo &quot;$COMMENT&quot; | grep jjb-deploy | awk '{print $2}')
-
-# Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z &quot;${JOB_NAME//\*/}&quot; ]; then
-    echo &quot;ERROR: JOB_NAME cannot be empty or '*'.&quot;
-    exit 1
-fi
-
-jenkins-jobs update --recursive --workers 4 jjb/ &quot;$JOB_NAME&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>5</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-jjb-merge b/.jjb-test/expected-xml/gerrit-ciman-jjb-merge
deleted file mode 100644 (file)
index be6ac42..0000000
+++ /dev/null
@@ -1,526 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>JJB_VERSION</name>
-          <description>Jenkins Job Builder version to download and install.</description>
-          <defaultValue>1.6.2</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/global-jjb</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv &quot;/tmp/v/jjb&quot;
-# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091
-source &quot;/tmp/v/jjb/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade &quot;jenkins-job-builder==$JJB_VERSION&quot;
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-merge-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-jenkins-jobs update --recursive --delete-old --workers 4 jjb/
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-jjb-verify b/.jjb-test/expected-xml/gerrit-ciman-jjb-verify
deleted file mode 100644 (file)
index 75f7dbc..0000000
+++ /dev/null
@@ -1,619 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>JJB_VERSION</name>
-          <description>Jenkins Job Builder version to download and install.</description>
-          <defaultValue>1.6.2</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/global-jjb</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script will make sure that there are no JIRA URLs in the commit
-# message. JIRA URLs will break the its-jira plugin
-
-# Ensure we fail the job if any steps fail.
-# Do not treat undefined variables as errors as in this case we are allowed
-# to have JIRA_URL undefined
-set -e -o pipefail
-set +u
-
-if [ -n &quot;${JIRA_URL}&quot; ];
-then
-  BASE_URL=$(echo $JIRA_URL | awk -F'/' '{print $3}')
-  JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io &quot;http[s]*://$BASE_URL/&quot; || true)
-  if [[ ! -z &quot;$JIRA_LINK&quot; ]]
-  then
-    echo 'Remove JIRA URLs from commit message'
-    echo 'Add jira references as: Issue: &lt;JIRAKEY&gt;-&lt;ISSUE#&gt;, instead of URLs'
-    exit 1
-  fi
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv &quot;/tmp/v/jjb&quot;
-# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091
-source &quot;/tmp/v/jjb/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade &quot;jenkins-job-builder==$JJB_VERSION&quot;
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-verify-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-jenkins-jobs -l DEBUG test --recursive -o archives/job-configs jjb/
-
-# Sort job output into sub-directories. On large Jenkins systems that have
-# many jobs archiving so many files into the same directory makes NGINX return
-# the directory list slow.
-pushd archives/job-configs
-for letter in {a..z}
-do
-    if [[ $(ls &quot;$letter&quot;* &gt; /dev/null 2&gt;&amp;1) -eq 0 ]]
-    then
-        mkdir &quot;$letter&quot;
-        find . -maxdepth 1 -type f -name &quot;$letter*&quot; -exec mv {} &quot;$letter&quot; \;
-    fi
-done
-popd
-
-#!/bin/bash
-# SPDX-License-Identifier: 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
-##############################################################################
-echo &quot;---&gt; jjb-check-unicode.sh&quot;
-
-if LC_ALL=C grep -I -r '[^[:print:][:space:]]' jjb/; then
-    echo &quot;Found files containing non-ascii characters.&quot;
-    exit 1
-fi
-
-echo &quot;All files are ASCII only&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: 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
-##############################################################################
-echo &quot;---&gt; gpg-verify-git-signature.sh&quot;
-
-if git log --show-signature -1 | grep -E -q 'gpg: Signature made.*key ID'; then
-   echo &quot;Git commit is GPG signed.&quot;
-else
-   echo &quot;WARNING: GPG signature missing for the commit.&quot;
-fi
-
-# Do NOT fail the job for unsigned commits
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-java-builder b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-java-builder
deleted file mode 100644 (file)
index 3569d83..0000000
+++ /dev/null
@@ -1,718 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/vars/centos.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/templates/java-builder.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/java-builder.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/lib/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=centos
-PACKER_TEMPLATE=java-builder
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet
deleted file mode 100644 (file)
index a759c4b..0000000
+++ /dev/null
@@ -1,718 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/vars/centos.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/templates/mininet.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/mininet.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/lib/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=centos
-PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-java-builder b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-java-builder
deleted file mode 100644 (file)
index ebcd8ae..0000000
+++ /dev/null
@@ -1,718 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/vars/ubuntu1604.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/templates/java-builder.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/java-builder.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/lib/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=ubuntu1604
-PACKER_TEMPLATE=java-builder
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-mininet b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-mininet
deleted file mode 100644 (file)
index 052561c..0000000
+++ /dev/null
@@ -1,718 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/vars/ubuntu1604.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/templates/mininet.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/*.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/mininet.yaml</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/lib/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=ubuntu1604
-PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-verify b/.jjb-test/expected-xml/gerrit-ciman-packer-verify
deleted file mode 100644 (file)
index bb6ead1..0000000
+++ /dev/null
@@ -1,598 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/vars/**.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/templates/**.json</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/**.sh</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>packer/provision/lib/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-clm-master b/.jjb-test/expected-xml/gerrit-maven-maven-clm-master
deleted file mode 100644 (file)
index 9456069..0000000
+++ /dev/null
@@ -1,604 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>30</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>H H * * 6</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>true</onSuccessful>
-        <onFailed>true</onFailed>
-        <onUnstable>true</onUnstable>
-        <onNotBuilt>true</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>run-clm$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>find . -regex &quot;.*karaf/target&quot; | xargs rm -rf</command>
-    </hudson.tasks.Shell>
-    <com.sonatype.insight.ci.hudson.PreBuildScan plugin="sonatype-clm-ci">
-      <applicationSelectType>
-        <value>list</value>
-        <applicationId>gerrit-maven</applicationId>
-      </applicationSelectType>
-      <pathConfig>
-        <scanTargets/>
-        <moduleExcludes/>
-        <scanProperties/>
-      </pathConfig>
-      <failOnClmServerFailures>false</failOnClmServerFailures>
-      <stageId>build</stageId>
-      <username/>
-      <password/>
-    </com.sonatype.insight.ci.hudson.PreBuildScan>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master
deleted file mode 100644 (file)
index 6281f82..0000000
+++ /dev/null
@@ -1,742 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>30</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=project-site</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>DEPLOY_PATH=org.example.project/$STREAM</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Generates javadoc in a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install javadoc:aggregate \
-    -Pq -Dmaven.javadoc.skip=false \
-    -DskipTests=true \
-    -Dcheckstyle.skip=true \
-    -Dfindbugs.skip=true \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-mv &quot;$WORKSPACE/target/site/apidocs&quot; &quot;$JAVADOC_DIR&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Publishes javadoc to a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-
-pushd &quot;$JAVADOC_DIR&quot;
-zip -r &quot;$WORKSPACE/javadoc.zip&quot; .
-popd
-
-lftools deploy nexus-zip &quot;$NEXUS_URL&quot; &quot;javadoc&quot; &quot;$DEPLOY_PATH&quot; &quot;$WORKSPACE/javadoc.zip&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master
deleted file mode 100644 (file)
index 0f9e56b..0000000
+++ /dev/null
@@ -1,596 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>30</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Generates javadoc in a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install javadoc:aggregate \
-    -Pq -Dmaven.javadoc.skip=false \
-    -DskipTests=true \
-    -Dcheckstyle.skip=true \
-    -Dfindbugs.skip=true \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-mv &quot;$WORKSPACE/target/site/apidocs&quot; &quot;$JAVADOC_DIR&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-merge-master b/.jjb-test/expected-xml/gerrit-maven-maven-merge-master
deleted file mode 100644 (file)
index da858a5..0000000
+++ /dev/null
@@ -1,852 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>30</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue>-Dmerge</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>H H * * 0</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=fakeproject-snapshots</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>NEXUS_CUT_DIRS=6
-NEXUS_REPO=fakeproject-snapshots
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-project=$(xmlstarlet sel \
-    -N &quot;x=http://maven.apache.org/POM/4.0.0&quot; -t \
-    --if &quot;/x:project/x:groupId&quot; \
-      -v &quot;/x:project/x:groupId&quot; \
-    --elif &quot;/x:project/x:parent/x:groupId&quot; \
-      -v &quot;/x:project/x:parent/x:groupId&quot; \
-    --else -o &quot;&quot; pom.xml)
-project_path=&quot;${project//.//}&quot;
-
-mkdir -p &quot;$WORKSPACE/m2repo/$project_path&quot;
-pushd &quot;$WORKSPACE/m2repo/$project_path&quot;
-    # Temporarily disable failing for wget
-    # If 404 happens we don't care because it might be a new project.
-    set +e
-    wget -nv --recursive \
-         --accept maven-metadata.xml \
-         -R &quot;index.html*&quot; \
-         --execute robots=off \
-         --no-parent \
-         --no-host-directories \
-         --cut-dirs=&quot;$NEXUS_CUT_DIRS&quot; \
-         &quot;$NEXUS_URL/content/repositories/$NEXUS_REPO/$project_path/&quot;
-    set -e  # Re-enable.
-popd
-
-# Backup metadata - Used later to find metadata files that have not been modified
-mkdir -p &quot;$WORKSPACE/m2repo-backup&quot;
-cp -a &quot;$WORKSPACE/m2repo/&quot;* &quot;$WORKSPACE/m2repo-backup&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Upload the snapshot files to a snapshot repo.
-#
-# Requires the existance of $WORKSPACE/m2repo and $WORKSPACE/m2repo-backup to
-# compare if maven metadata files have changed. Unchanged files are then
-# removed from $WORKSPACE/m2repo before uploading to the snapshot repo.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-m2repo_dir=&quot;$WORKSPACE/m2repo&quot;
-nexus_repo_url=&quot;$NEXUS_URL/content/repositories/$NEXUS_REPO&quot;
-
-# Remove metadata files that were not updated.
-set +e  # Temporarily disable to run diff command.
-IFS=&quot; &quot; read -r -a metadata_files &lt;&lt;&lt; &quot;$(diff -s -r &quot;$m2repo_dir&quot; &quot;$WORKSPACE/m2repo-backup&quot; \
-    | grep 'Files .* and .* are identical' \
-    | awk '{print $2}')&quot;
-set -e  # Re-enable.
-
-set +u  # $metadata_files could be unbound if project is new.
-if [ -n &quot;${metadata_files[*]}&quot; ]; then
-    for i in &quot;${metadata_files[@]}&quot;; do
-        rm &quot;$i&quot;*
-    done
-fi
-set -u  # Re-enable.
-
-find &quot;$m2repo_dir&quot; -type d -empty -delete
-
-lftools deploy nexus -s &quot;$nexus_repo_url&quot; &quot;$m2repo_dir&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-    <hudson.plugins.parameterizedtrigger.BuildTrigger>
-      <configs/>
-    </hudson.plugins.parameterizedtrigger.BuildTrigger>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-release-master b/.jjb-test/expected-xml/gerrit-maven-maven-release-master
deleted file mode 100644 (file)
index 6db96c8..0000000
+++ /dev/null
@@ -1,768 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>30</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec/>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>build release$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=project-staging</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script removes the -SNAPSHOT from a project to prepare it for release.
-
-PATCH_DIR=&quot;$WORKSPACE/archives/patches&quot;
-mkdir -p &quot;$PATCH_DIR&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-echo &quot;$PROJECT&quot; &quot;$(git rev-parse --verify HEAD)&quot; | tee -a &quot;$PATCH_DIR/taglist.log&quot;
-
-# Strip -SNAPSHOT from version to prepare release.
-find . -name &quot;*.xml&quot; -print0 | xargs -0 sed -i 's/-SNAPSHOT//g'
-
-git commit -am &quot;Release $PROJECT&quot;
-git format-patch --stdout &quot;origin/$GERRIT_BRANCH&quot; &gt; &quot;$PATCH_DIR/${PROJECT//\//-}.patch&quot;
-git bundle create &quot;$PATCH_DIR/${PROJECT//\//-}.bundle&quot; &quot;origin/${GERRIT_BRANCH}..HEAD&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script publishes artifacts to a staging repo in Nexus.
-#
-# $WORKSPACE/m2repo   :  Exists and used to deploy the staging repository.
-# $NEXUS_URL          :  Jenkins global variable should be defined.
-# $STAGING_PROFILE_ID :  Provided by a job parameter.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-TMP_FILE=&quot;$(mktemp)&quot;
-lftools deploy nexus-stage &quot;$NEXUS_URL&quot; &quot;$STAGING_PROFILE_ID&quot; &quot;$WORKSPACE/m2repo&quot; | tee &quot;$TMP_FILE&quot;
-staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' &quot;$TMP_FILE&quot;)
-
-# Store repo info to a file in archives
-mkdir -p &quot;$WORKSPACE/archives&quot;
-echo &quot;$staging_repo&quot; &gt; &quot;$WORKSPACE/archives/staging-repo.txt&quot;
-
-# Cleanup
-rm &quot;$TMP_FILE&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8
deleted file mode 100644 (file)
index 1db4186..0000000
+++ /dev/null
@@ -1,767 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue>-Dstream=$STREAM</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck: [0-9 ]+</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Fetches patches all projects provided by comment trigger
-#
-# Takes a list of Gerrit patches and fetches all projects and cherry-pick
-# patches for projects. The trigger is
-#     'recheck: SPACE_SEPERATED_LIST_OF_PATCHES'
-#
-# NOTE: This script assumes the user will provide the correct dependency order
-#       via the PATCHES list.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-REPOS_DIR=&quot;$WORKSPACE/.repos&quot;
-
-IFS=&quot; &quot; read -r -a PATCHES &lt;&lt;&lt; &quot;$(echo &quot;$GERRIT_EVENT_COMMENT_TEXT&quot; | grep 'recheck:' | awk -F: '{print $2}')&quot;
-
-# Workaround for git-review bug in v1.24
-# https://storyboard.openstack.org/#!/story/2001081
-set +u  # Allow unbound variables for virtualenv
-virtualenv --quiet &quot;/tmp/v/git-review&quot;
-# shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
-source &quot;/tmp/v/git-review/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade git-review
-set -u
-# End git-review workaround
-
-projects=()
-for patch in $(echo &quot;${PATCHES[@]}&quot;); do
-    json=$(curl -s &quot;$GERRIT_URL/changes/$patch&quot; | sed -e &quot;s/)]}'//&quot;)
-    project=$(echo &quot;$json&quot; | jq -r '.project')
-    branch=$(echo &quot;$json&quot; | jq -r '.branch')
-
-    if [ ! -d &quot;$REPOS_DIR/$project&quot; ]; then
-        git clone -q --depth 1 -b &quot;$branch&quot; &quot;$GIT_URL/$project&quot; &quot;$REPOS_DIR/$project&quot;
-
-        # This array will be used later to determine project build order.
-        projects+=(&quot;$project&quot;)
-    fi
-
-    pushd &quot;$REPOS_DIR/$project&quot;
-    # If remote gerrit already exists just make sure path is expected
-    if ! git remote add gerrit &quot;$GERRIT_URL/$project&quot; &gt; /dev/null 2&gt;&amp;1; then
-        git remote set-url gerrit &quot;$GERRIT_URL/$project&quot;
-    fi
-    git review --cherrypick=&quot;$patch&quot;
-    popd
-done
-
-# This script should be a macro which re-inject's the projects variable back
-# into the build so a script later on can use it.
-echo &quot;DEPENDENCY_BUILD_ORDER=${projects[*]}&quot; &gt; &quot;$WORKSPACE/.dependency.properties&quot;
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesFilePath>$WORKSPACE/.dependency.properties</propertiesFilePath>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Builds projects provided via $DEPENDENCY_BUILD_ORDER list
-#
-# This runs a `mvn clean install` against all projects provided by a list. This
-# script is a companion script for the gerrit-fetch-dependencies script which
-# clones project repos to &quot;$WORKSPACE/.repos&quot;.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-IFS=&quot; &quot; read -r -a PROJECTS &lt;&lt;&lt; &quot;$DEPENDENCY_BUILD_ORDER&quot;
-REPOS_DIR=&quot;$WORKSPACE/.repos&quot;
-
-export MAVEN_OPTS
-
-for project in &quot;${PROJECTS[@]}&quot;; do
-    pushd &quot;$REPOS_DIR/$project&quot;
-    # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-    # shellcheck disable=SC2086
-    $MVN clean install \
-        -Pq \
-        -DskipTests=true \
-        --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-        --settings &quot;$SETTINGS_FILE&quot; \
-        $MAVEN_OPTIONS $MAVEN_PARAMS
-    popd
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>60</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8
deleted file mode 100644 (file)
index b469e52..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue>-Dstream=$STREAM</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>60</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-maven-sonar b/.jjb-test/expected-xml/gerrit-maven-sonar
deleted file mode 100644 (file)
index 98ae3ba..0000000
+++ /dev/null
@@ -1,649 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>SONAR_MAVEN_GOAL</name>
-          <description>Maven goals to pass to the Sonar call. Typically sonar:sonar
-however to use a specific version of the sonar-maven-plugin we
-can call &quot;org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar&quot;.
-</description>
-          <defaultValue>sonar:sonar</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>H H * * 6</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>true</onSuccessful>
-        <onFailed>true</onFailed>
-        <onUnstable>true</onUnstable>
-        <onNotBuilt>true</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>run-sonar$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SONAR_HOST_URL=$SONAR_URL</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>gerrit-maven-project-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    -Dsonar \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN $SONAR_MAVEN_GOAL \
-    -Dsonar -Dsonar.host.url=&quot;$SONAR_HOST_URL&quot; \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-node-node-verify-master b/.jjb-test/expected-xml/gerrit-node-node-verify-master
deleted file mode 100644 (file)
index e9ebb3b..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>NODE_DIR</name>
-          <description>Path to a Node project directory.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>NODE_VERSION</name>
-          <description>Version of NodeJS to install.</description>
-          <defaultValue>6.11.4</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/origin/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>{node-dir}/**</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>false</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; node-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/python&quot;
-# shellcheck source=/tmp/v/node/bin/activate disable=SC1091
-source &quot;/tmp/v/python/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade nodeenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; node-run.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-# Prepare node
-nodeenv --node=&quot;$NODE_VERSION&quot; --prebuilt &quot;/tmp/v/node&quot;
-source /tmp/v/node/bin/activate
-cd &quot;$WORKSPACE/$NODE_DIR&quot;
-npm install
-npm test
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-python-tox-verify-master b/.jjb-test/expected-xml/gerrit-python-tox-verify-master
deleted file mode 100644 (file)
index 7505dce..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>TOX_DIR</name>
-          <description>Path to directory containing tox.ini file.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>TOX_ENVS</name>
-          <description>Tox environments to run build against.
-Example: docs,py2,py3
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>$GERRIT_REFSPEC</refspec>
-        <url>$GIT_URL/$GERRIT_PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>releng/ciman</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PYTHON_VERSION=python3</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet -p &quot;$PYTHON_VERSION&quot; &quot;/tmp/v/tox&quot;
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade argparse detox tox tox-pyenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-run.sh&quot;
-
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-ARCHIVE_TOX_DIR=&quot;$WORKSPACE/archives/tox&quot;
-mkdir -p &quot;$ARCHIVE_TOX_DIR&quot;
-cd &quot;$WORKSPACE/$TOX_DIR&quot;
-
-if [ -d &quot;/opt/pyenv&quot; ]; then
-    echo &quot;---&gt; Setting up pyenv&quot;
-    export PYENV_ROOT=&quot;/opt/pyenv&quot;
-    export PATH=&quot;$PYENV_ROOT/bin:$PATH&quot;
-fi
-
-set +e  # Allow detox to fail so that we can collect the logs in the next step
-if [ ! -z &quot;$TOX_ENVS&quot; ]; then
-    detox -e &quot;$TOX_ENVS&quot;  | tee -a &quot;$ARCHIVE_TOX_DIR/detox.log&quot;
-    detox_status=&quot;${PIPESTATUS[0]}&quot;
-else
-    detox | tee -a &quot;$ARCHIVE_TOX_DIR/detox.log&quot;
-    detox_status=&quot;${PIPESTATUS[0]}&quot;
-fi
-
-# Disable SC2116 as we want to echo a space separated list of TOX_ENVS
-# shellcheck disable=SC2116
-for i in .tox/*/log; do
-    tox_env=$(echo $i | awk -F'/' '{print $2}')
-    cp -r &quot;$i&quot; &quot;$ARCHIVE_TOX_DIR/$tox_env&quot;
-done
-set -e  # Logs collected so re-enable
-
-echo &quot;Completed tox runs.&quot;
-
-test &quot;$detox_status&quot; -eq 0 || exit &quot;$detox_status&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-rtd-rtd-merge-master b/.jjb-test/expected-xml/gerrit-rtd-rtd-merge-master
deleted file mode 100644 (file)
index a61fff8..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.scm.NullSCM"/>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>**</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.rst</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/conf.py</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>remerge$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>RTD_PROJECT=gerrit-rtd</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; rtd-trigger-build.sh&quot;
-
-if [ &quot;$GERRIT_BRANCH&quot; == &quot;master&quot; ]; then
-    RTD_BUILD_VERSION=latest
-else
-    RTD_BUILD_VERSION=&quot;${GERRIT_BRANCH/\//-}&quot;
-fi
-
-curl -X POST --data &quot;version_slug=$RTD_BUILD_VERSION&quot; &quot;https://readthedocs.org/build/$RTD_PROJECT&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>15</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/gerrit-rtd-rtd-verify-master b/.jjb-test/expected-xml/gerrit-rtd-rtd-verify-master
deleted file mode 100644 (file)
index b800fef..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <jenkins.model.BuildDiscarderProperty>
-      <strategy class="hudson.tasks.LogRotator">
-        <daysToKeep>7</daysToKeep>
-        <numToKeep>-1</numToKeep>
-        <artifactDaysToKeep>-1</artifactDaysToKeep>
-        <artifactNumToKeep>0</artifactNumToKeep>
-      </strategy>
-    </jenkins.model.BuildDiscarderProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>$GIT_URL/$PROJECT</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/$GERRIT_BRANCH</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-      <spec/>
-      <gerritProjects>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-          <compareType>ANT</compareType>
-          <pattern>**</pattern>
-          <branches>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-              <compareType>ANT</compareType>
-              <pattern>**/master</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
-          </branches>
-          <filePaths>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/*.rst</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-            <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-              <compareType>ANT</compareType>
-              <pattern>**/conf.py</pattern>
-            </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
-          </filePaths>
-          <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
-      </gerritProjects>
-      <skipVote>
-        <onSuccessful>false</onSuccessful>
-        <onFailed>false</onFailed>
-        <onUnstable>false</onUnstable>
-        <onNotBuilt>false</onNotBuilt>
-      </skipVote>
-      <silentMode>false</silentMode>
-      <silentStartMode>false</silentStartMode>
-      <escapeQuotes>true</escapeQuotes>
-      <noNameAndEmailParameters>false</noNameAndEmailParameters>
-      <readableMessage>false</readableMessage>
-      <dependencyJobsNames/>
-      <notificationLevel/>
-      <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
-      <triggerConfigURL/>
-      <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
-      <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-          <excludeDrafts>true</excludeDrafts>
-          <excludeTrivialRebase>false</excludeTrivialRebase>
-          <excludeNoCodeChange>false</excludeNoCodeChange>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-          <commentAddedCommentContains>recheck$</commentAddedCommentContains>
-        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
-      </triggerOnEvents>
-      <buildStartMessage/>
-      <buildFailureMessage/>
-      <buildSuccessfulMessage/>
-      <buildUnstableMessage/>
-      <buildNotBuiltMessage/>
-      <buildUnsuccessfulFilepath/>
-      <customUrl/>
-      <serverName>test-server</serverName>
-    </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>DOC_DIR=docs/_build/html</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet -p &quot;$PYTHON_VERSION&quot; &quot;/tmp/v/tox&quot;
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade argparse detox tox tox-pyenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; rtd-verify.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-echo &quot;---&gt; Fetching project&quot;
-if [ &quot;$GERRIT_PROJECT&quot; != &quot;$PROJECT&quot; ]; then
-    cd &quot;docs/submodules/$GERRIT_PROJECT&quot;
-fi
-
-git fetch origin &quot;$GERRIT_REFSPEC&quot; &amp;&amp; git checkout FETCH_HEAD
-
-echo &quot;---&gt; Generating docs&quot;
-cd &quot;$WORKSPACE&quot;
-tox -edocs
-
-echo &quot;---&gt; Archiving generated docs&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-mv &quot;$DOC_DIR&quot; archives/
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>15</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-jjb-deploy-job b/.jjb-test/expected-xml/github-ciman-jjb-deploy-job
deleted file mode 100644 (file)
index 984d363..0000000
+++ /dev/null
@@ -1,514 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$GERRIT_PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^jjb-deploy (?!\*+$).+$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>JJB Deploy Job</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PIP_PACKAGES=jenkins-job-builder</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# pip install packages into a virtualenv using the first listed package as venv name
-#
-# PIP_PACKAGES is a space separated list of pypi packages to install. The first
-#              listed package is used as the virtualenv directory name.
-echo &quot;---&gt; pip-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-# Install git-review using virtualenv to the latest version that supports
-# --reviewers option, available through pip install. Existing minion image has a
-# version that does not have it.
-virtualenv &quot;/tmp/v/${PIP_PACKAGES%% *}&quot;
-# shellcheck source=/tmp/v/venv/bin/activate disable=SC1091
-source &quot;/tmp/v/${PIP_PACKAGES%% *}/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-
-# PIP_PACKAGES needs to be passed through as a space separated list of packages
-# shellcheck disable=SC2086
-pip install --upgrade $PIP_PACKAGES
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini-sandbox</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Push a job to jenkins-sandbox via Gerrit / GitHub comment
-# Comment Pattern: jjb-deploy JOB_NAME
-# JOB_NAME: Can also include * wildcards too. Additional parameters are ignored.
-echo &quot;---&gt; jjb-deploy-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-
-# shellcheck source=/tmp/v/jenkins-job-builder/bin/activate disable=SC1091
-source &quot;/tmp/v/jenkins-job-builder/bin/activate&quot;
-
-echo &quot;-----&gt; Fetching project&quot;
-git fetch origin &quot;$GERRIT_REFSPEC&quot; &amp;&amp; git checkout FETCH_HEAD
-
-# If not Gerrit Trigger than assume GitHub
-COMMENT=&quot;${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}&quot;
-JOB_NAME=$(echo &quot;$COMMENT&quot; | grep jjb-deploy | awk '{print $2}')
-
-# Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z &quot;${JOB_NAME//\*/}&quot; ]; then
-    echo &quot;ERROR: JOB_NAME cannot be empty or '*'.&quot;
-    exit 1
-fi
-
-jenkins-jobs update --recursive --workers 4 jjb/ &quot;$JOB_NAME&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>5</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-jjb-merge b/.jjb-test/expected-xml/github-ciman-jjb-merge
deleted file mode 100644 (file)
index 9e899d3..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>JJB_VERSION</name>
-          <description>Jenkins Job Builder version to download and install.</description>
-          <defaultValue>1.6.2</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>JJB Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv &quot;/tmp/v/jjb&quot;
-# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091
-source &quot;/tmp/v/jjb/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade &quot;jenkins-job-builder==$JJB_VERSION&quot;
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-merge-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-jenkins-jobs update --recursive --delete-old --workers 4 jjb/
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-jjb-verify b/.jjb-test/expected-xml/github-ciman-jjb-verify
deleted file mode 100644 (file)
index 63cf4bd..0000000
+++ /dev/null
@@ -1,571 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>JJB_VERSION</name>
-          <description>Jenkins Job Builder version to download and install.</description>
-          <defaultValue>1.6.2</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>JJB Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>jjbini</fileId>
-          <targetLocation>$HOME/.config/jenkins_jobs/jenkins_jobs.ini</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script will make sure that there are no JIRA URLs in the commit
-# message. JIRA URLs will break the its-jira plugin
-
-# Ensure we fail the job if any steps fail.
-# Do not treat undefined variables as errors as in this case we are allowed
-# to have JIRA_URL undefined
-set -e -o pipefail
-set +u
-
-if [ -n &quot;${JIRA_URL}&quot; ];
-then
-  BASE_URL=$(echo $JIRA_URL | awk -F'/' '{print $3}')
-  JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io &quot;http[s]*://$BASE_URL/&quot; || true)
-  if [[ ! -z &quot;$JIRA_LINK&quot; ]]
-  then
-    echo 'Remove JIRA URLs from commit message'
-    echo 'Add jira references as: Issue: &lt;JIRAKEY&gt;-&lt;ISSUE#&gt;, instead of URLs'
-    exit 1
-  fi
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv &quot;/tmp/v/jjb&quot;
-# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091
-source &quot;/tmp/v/jjb/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade &quot;jenkins-job-builder==$JJB_VERSION&quot;
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; jjb-verify-job.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-jenkins-jobs -l DEBUG test --recursive -o archives/job-configs jjb/
-
-# Sort job output into sub-directories. On large Jenkins systems that have
-# many jobs archiving so many files into the same directory makes NGINX return
-# the directory list slow.
-pushd archives/job-configs
-for letter in {a..z}
-do
-    if [[ $(ls &quot;$letter&quot;* &gt; /dev/null 2&gt;&amp;1) -eq 0 ]]
-    then
-        mkdir &quot;$letter&quot;
-        find . -maxdepth 1 -type f -name &quot;$letter*&quot; -exec mv {} &quot;$letter&quot; \;
-    fi
-done
-popd
-
-#!/bin/bash
-# SPDX-License-Identifier: 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
-##############################################################################
-echo &quot;---&gt; jjb-check-unicode.sh&quot;
-
-if LC_ALL=C grep -I -r '[^[:print:][:space:]]' jjb/; then
-    echo &quot;Found files containing non-ascii characters.&quot;
-    exit 1
-fi
-
-echo &quot;All files are ASCII only&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: 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
-##############################################################################
-echo &quot;---&gt; gpg-verify-git-signature.sh&quot;
-
-if git log --show-signature -1 | grep -E -q 'gpg: Signature made.*key ID'; then
-   echo &quot;Git commit is GPG signed.&quot;
-else
-   echo &quot;WARNING: GPG signature missing for the commit.&quot;
-fi
-
-# Do NOT fail the job for unsigned commits
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-packer-merge-centos-java-builder b/.jjb-test/expected-xml/github-ciman-packer-merge-centos-java-builder
deleted file mode 100644 (file)
index 29ded26..0000000
+++ /dev/null
@@ -1,676 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Packer centos-$java-builder Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=centos
-PACKER_TEMPLATE=java-builder
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet b/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet
deleted file mode 100644 (file)
index a6da5f9..0000000
+++ /dev/null
@@ -1,676 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Packer centos-$mininet Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=centos
-PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-java-builder b/.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-java-builder
deleted file mode 100644 (file)
index 12f74aa..0000000
+++ /dev/null
@@ -1,676 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Packer ubuntu1604-$java-builder Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=ubuntu1604
-PACKER_TEMPLATE=java-builder
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-mininet b/.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-mininet
deleted file mode 100644 (file)
index 8bf2913..0000000
+++ /dev/null
@@ -1,676 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec>00 10 1 * *</spec>
-    </hudson.triggers.TimerTrigger>
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Packer ubuntu1604-$mininet Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_PLATFORM=ubuntu1604
-PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-build.sh&quot;
-# The script builds an image using packer
-# $CLOUDENV            :  Provides the cloud credential file.
-# $PACKER_PLATFORM     :  Provides the packer platform.
-# $PACKER_TEMPLATE     :  Provides the packer temnplate.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-# Prioritize the project's own version of vars if available
-platform_file=&quot;common-packer/vars/$PACKER_PLATFORM.json&quot;
-if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
-    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
-fi
-
-cd packer
-export PACKER_LOG=&quot;yes&quot;
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
-packer.io build -color=false \
-    -var-file=&quot;$CLOUDENV&quot; \
-    -var-file=&quot;$platform_file&quot; \
-    &quot;templates/$PACKER_TEMPLATE.json&quot;
-
-# Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
-
-# Split public/private clouds logs
-for cloud in &quot;${clouds[@]}&quot;; do
-    grep -e &quot;$cloud&quot; &quot;$PACKER_BUILD_LOG&quot; &gt; &quot;$PACKER_LOGS_DIR/packer-build_$cloud.log&quot; 2&gt;&amp;1
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>90</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-ciman-packer-verify b/.jjb-test/expected-xml/github-ciman-packer-verify
deleted file mode 100644 (file)
index 67b3ab6..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>PACKER_VERSION</name>
-          <description>Packer version to download and install.</description>
-          <defaultValue>1.1.3</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Packer Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>ci-packer-cloud-env</fileId>
-          <targetLocation/>
-          <variable>CLOUDENV</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PACKER_VERSION=1.1.3
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-install.sh&quot;
-# The script checks for the packer binaries and installs the binary
-# if its not available
-
-# $PACKER_VERSION        : Define a packer version passed as job paramter
-
-PACKER_VERSION=&quot;${PACKER_VERSION:-1.1.3}&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-if hash packer.io 2&gt;/dev/null; then
-    echo &quot;packer.io command is available.&quot;
-else
-    echo &quot;packer.io command not is available. Installing packer ...&quot;
-    # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd &quot;${WORKSPACE}&quot;
-    wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
-    mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
-    # rename packer to avoid conflict with binary in cracklib
-    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
-    popd
-fi
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-validate.sh&quot;
-# The script validates an packers files.
-
-# $CLOUDENV            :  Provides the cloud credential file.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-PACKER_LOGS_DIR=&quot;$WORKSPACE/archives/packer&quot;
-mkdir -p &quot;$PACKER_LOGS_DIR&quot;
-export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
-
-cd packer
-varfiles=(vars/*.json common-packer/vars/*.json)
-templates=(templates/*.json)
-
-for varfile in &quot;${varfiles[@]}&quot;; do
-    # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here. Also handle the case where a project
-    # has not vars/*.json file.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
-        continue
-    fi
-
-    echo &quot;-----&gt; Testing varfile: $varfile&quot;
-    for template in &quot;${templates[@]}&quot;; do
-        export PACKER_LOG=&quot;yes&quot;
-        export PACKER_LOG_PATH=&quot;$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log&quot;
-        if output=$(packer.io validate -var-file=&quot;$CLOUDENV&quot; -var-file=&quot;$varfile&quot; &quot;$template&quot;); then
-            echo &quot;$template: $output&quot;
-        else
-            echo &quot;$template: $output&quot;
-            exit 1
-        fi
-    done
-done
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; packer-clear-credentials.sh&quot;
-
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-rm &quot;$CLOUDENV&quot;
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-clm-master b/.jjb-test/expected-xml/github-maven-maven-clm-master
deleted file mode 100644 (file)
index 1fa9c11..0000000
+++ /dev/null
@@ -1,573 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^run-clm$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>CLM</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>find . -regex &quot;.*karaf/target&quot; | xargs rm -rf</command>
-    </hudson.tasks.Shell>
-    <com.sonatype.insight.ci.hudson.PreBuildScan plugin="sonatype-clm-ci">
-      <applicationSelectType>
-        <value>list</value>
-        <applicationId>github-maven</applicationId>
-      </applicationSelectType>
-      <pathConfig>
-        <scanTargets/>
-        <moduleExcludes/>
-        <scanProperties/>
-      </pathConfig>
-      <failOnClmServerFailures>false</failOnClmServerFailures>
-      <stageId>build</stageId>
-      <username/>
-      <password/>
-    </com.sonatype.insight.ci.hudson.PreBuildScan>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master
deleted file mode 100644 (file)
index cceb368..0000000
+++ /dev/null
@@ -1,722 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec/>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <com.cloudbees.jenkins.GitHubPushTrigger>
-      <spec/>
-    </com.cloudbees.jenkins.GitHubPushTrigger>
-    <hudson.triggers.SCMTrigger>
-      <spec/>
-      <ignorePostCommitHooks>false</ignorePostCommitHooks>
-    </hudson.triggers.SCMTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist>tykeal</adminlist>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist>jpwku
-tykeal
-zxiiro</whitelist>
-      <orgslist>example-org</orgslist>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>false</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>JJB Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=project-site</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>DEPLOY_PATH=org.example.project/$STREAM</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Generates javadoc in a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install javadoc:aggregate \
-    -Pq -Dmaven.javadoc.skip=false \
-    -DskipTests=true \
-    -Dcheckstyle.skip=true \
-    -Dfindbugs.skip=true \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-mv &quot;$WORKSPACE/target/site/apidocs&quot; &quot;$JAVADOC_DIR&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Publishes javadoc to a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-
-pushd &quot;$JAVADOC_DIR&quot;
-zip -r &quot;$WORKSPACE/javadoc.zip&quot; .
-popd
-
-lftools deploy nexus-zip &quot;$NEXUS_URL&quot; &quot;javadoc&quot; &quot;$DEPLOY_PATH&quot; &quot;$WORKSPACE/javadoc.zip&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master
deleted file mode 100644 (file)
index d9b3d89..0000000
+++ /dev/null
@@ -1,562 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Maven Javadoc</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Generates javadoc in a Maven project.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean install javadoc:aggregate \
-    -Pq -Dmaven.javadoc.skip=false \
-    -DskipTests=true \
-    -Dcheckstyle.skip=true \
-    -Dfindbugs.skip=true \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-mv &quot;$WORKSPACE/target/site/apidocs&quot; &quot;$JAVADOC_DIR&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-merge-master b/.jjb-test/expected-xml/github-maven-maven-merge-master
deleted file mode 100644 (file)
index 5fafbac..0000000
+++ /dev/null
@@ -1,814 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue>-Dmerge</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Maven Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=fakeproject-snapshots</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>NEXUS_CUT_DIRS=6
-NEXUS_REPO=fakeproject-snapshots
-</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-project=$(xmlstarlet sel \
-    -N &quot;x=http://maven.apache.org/POM/4.0.0&quot; -t \
-    --if &quot;/x:project/x:groupId&quot; \
-      -v &quot;/x:project/x:groupId&quot; \
-    --elif &quot;/x:project/x:parent/x:groupId&quot; \
-      -v &quot;/x:project/x:parent/x:groupId&quot; \
-    --else -o &quot;&quot; pom.xml)
-project_path=&quot;${project//.//}&quot;
-
-mkdir -p &quot;$WORKSPACE/m2repo/$project_path&quot;
-pushd &quot;$WORKSPACE/m2repo/$project_path&quot;
-    # Temporarily disable failing for wget
-    # If 404 happens we don't care because it might be a new project.
-    set +e
-    wget -nv --recursive \
-         --accept maven-metadata.xml \
-         -R &quot;index.html*&quot; \
-         --execute robots=off \
-         --no-parent \
-         --no-host-directories \
-         --cut-dirs=&quot;$NEXUS_CUT_DIRS&quot; \
-         &quot;$NEXUS_URL/content/repositories/$NEXUS_REPO/$project_path/&quot;
-    set -e  # Re-enable.
-popd
-
-# Backup metadata - Used later to find metadata files that have not been modified
-mkdir -p &quot;$WORKSPACE/m2repo-backup&quot;
-cp -a &quot;$WORKSPACE/m2repo/&quot;* &quot;$WORKSPACE/m2repo-backup&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-# Upload the snapshot files to a snapshot repo.
-#
-# Requires the existance of $WORKSPACE/m2repo and $WORKSPACE/m2repo-backup to
-# compare if maven metadata files have changed. Unchanged files are then
-# removed from $WORKSPACE/m2repo before uploading to the snapshot repo.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-m2repo_dir=&quot;$WORKSPACE/m2repo&quot;
-nexus_repo_url=&quot;$NEXUS_URL/content/repositories/$NEXUS_REPO&quot;
-
-# Remove metadata files that were not updated.
-set +e  # Temporarily disable to run diff command.
-IFS=&quot; &quot; read -r -a metadata_files &lt;&lt;&lt; &quot;$(diff -s -r &quot;$m2repo_dir&quot; &quot;$WORKSPACE/m2repo-backup&quot; \
-    | grep 'Files .* and .* are identical' \
-    | awk '{print $2}')&quot;
-set -e  # Re-enable.
-
-set +u  # $metadata_files could be unbound if project is new.
-if [ -n &quot;${metadata_files[*]}&quot; ]; then
-    for i in &quot;${metadata_files[@]}&quot;; do
-        rm &quot;$i&quot;*
-    done
-fi
-set -u  # Re-enable.
-
-find &quot;$m2repo_dir&quot; -type d -empty -delete
-
-lftools deploy nexus -s &quot;$nexus_repo_url&quot; &quot;$m2repo_dir&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-    <hudson.plugins.parameterizedtrigger.BuildTrigger>
-      <configs/>
-    </hudson.plugins.parameterizedtrigger.BuildTrigger>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-release-master b/.jjb-test/expected-xml/github-maven-maven-release-master
deleted file mode 100644 (file)
index 42487ad..0000000
+++ /dev/null
@@ -1,740 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>master</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <hudson.triggers.TimerTrigger>
-      <spec/>
-    </hudson.triggers.TimerTrigger>
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^build release$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>true</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Maven Release</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SERVER_ID=project-staging</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script removes the -SNAPSHOT from a project to prepare it for release.
-
-PATCH_DIR=&quot;$WORKSPACE/archives/patches&quot;
-mkdir -p &quot;$PATCH_DIR&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-echo &quot;$PROJECT&quot; &quot;$(git rev-parse --verify HEAD)&quot; | tee -a &quot;$PATCH_DIR/taglist.log&quot;
-
-# Strip -SNAPSHOT from version to prepare release.
-find . -name &quot;*.xml&quot; -print0 | xargs -0 sed -i 's/-SNAPSHOT//g'
-
-git commit -am &quot;Release $PROJECT&quot;
-git format-patch --stdout &quot;origin/$GERRIT_BRANCH&quot; &gt; &quot;$PATCH_DIR/${PROJECT//\//-}.patch&quot;
-git bundle create &quot;$PATCH_DIR/${PROJECT//\//-}.bundle&quot; &quot;origin/${GERRIT_BRANCH}..HEAD&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script publishes artifacts to a staging repo in Nexus.
-#
-# $WORKSPACE/m2repo   :  Exists and used to deploy the staging repository.
-# $NEXUS_URL          :  Jenkins global variable should be defined.
-# $STAGING_PROFILE_ID :  Provided by a job parameter.
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-TMP_FILE=&quot;$(mktemp)&quot;
-lftools deploy nexus-stage &quot;$NEXUS_URL&quot; &quot;$STAGING_PROFILE_ID&quot; &quot;$WORKSPACE/m2repo&quot; | tee &quot;$TMP_FILE&quot;
-staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' &quot;$TMP_FILE&quot;)
-
-# Store repo info to a file in archives
-mkdir -p &quot;$WORKSPACE/archives&quot;
-echo &quot;$staging_repo&quot; &gt; &quot;$WORKSPACE/archives/staging-repo.txt&quot;
-
-# Cleanup
-rm &quot;$TMP_FILE&quot;
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8
deleted file mode 100644 (file)
index 33d083f..0000000
+++ /dev/null
@@ -1,684 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue>-Dstream=$STREAM</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue>uuddlrlrba</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Maven Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>60</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-maven-sonar b/.jjb-test/expected-xml/github-maven-sonar
deleted file mode 100644 (file)
index c0c8c2a..0000000
+++ /dev/null
@@ -1,618 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <jdk>openjdk8</jdk>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>M2_HOME</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_OPTS</name>
-          <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MAVEN_PARAMS</name>
-          <description>Maven parameters to pass to the mvn command.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>MVN</name>
-          <description>Maven selector to be used by shell scripts</description>
-          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STAGING_PROFILE_ID</name>
-          <description>Nexus staging profile ID.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>ARCHIVE_ARTIFACTS</name>
-          <description>Artifacts to archive to the logs server.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>SONAR_MAVEN_GOAL</name>
-          <description>Maven goals to pass to the Sonar call. Typically sonar:sonar
-however to use a specific version of the sonar-maven-plugin we
-can call &quot;org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar&quot;.
-</description>
-          <defaultValue>sonar:sonar</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Maven Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Maven>
-      <targets>--version</targets>
-      <properties/>
-      <mavenName>mvn33</mavenName>
-      <usePrivateRepository>false</usePrivateRepository>
-      <settings class="jenkins.mvn.DefaultSettingsProvider"/>
-      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
-    </hudson.tasks.Maven>
-    <hudson.tasks.Shell>
-      <command>rm &quot;$HOME/.wgetrc&quot;</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>SONAR_HOST_URL=$SONAR_URL</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>global-settings</fileId>
-          <targetLocation/>
-          <variable>GLOBAL_SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>aproject-settings</fileId>
-          <targetLocation/>
-          <variable>SETTINGS_FILE</variable>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This file contains a list of variables that are generally useful in many
-# scripts. It is meant to be sourced in other scripts so that the variables can
-# be called.
-
-MAVEN_OPTIONS=&quot;$(echo --show-version \
-    --batch-mode \
-    -Djenkins \
-    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -Dmaven.repo.local=/tmp/r \
-    -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
-echo &quot;$MAVEN_OPTIONS&quot;
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# This script builds a Maven project and deploys it into a staging repo which
-# can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
-
-# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
-# Ensure we fail the job if any steps fail.
-set -e -o pipefail
-set +u
-
-export MAVEN_OPTS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN clean deploy \
-    -Dsonar \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-
-# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
-# shellcheck disable=SC2086
-$MVN $SONAR_MAVEN_GOAL \
-    -Dsonar -Dsonar.host.url=&quot;$SONAR_HOST_URL&quot; \
-    --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
-    --settings &quot;$SETTINGS_FILE&quot; \
-    -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_OPTIONS $MAVEN_PARAMS
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-set +e  # DO NOT cause build failure if any of the rm calls fail.
-
-rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
-
-# In some cases we use the lf-provide-maven-settings macro to produce
-# a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
-# too if it exists.
-rm &quot;$HOME/.netrc&quot;
-
-# DO NOT fail build if any of the above lines fail.
-exit 0
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
-      <execPattern>**/**.exec</execPattern>
-      <classPattern>**/classes</classPattern>
-      <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus>false</changeBuildStatus>
-      <inclusionPattern/>
-      <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
-      <maximumBranchCoverage>10</maximumBranchCoverage>
-      <minimumBranchCoverage>20</minimumBranchCoverage>
-      <maximumMethodCoverage>50</maximumMethodCoverage>
-      <minimumMethodCoverage>40</minimumMethodCoverage>
-    </hudson.plugins.jacoco.JacocoPublisher>
-    <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
-      <isRankActivated>false</isRankActivated>
-      <includePattern/>
-      <excludePattern/>
-      <healthy/>
-      <unHealthy/>
-      <thresholdLimit>low</thresholdLimit>
-      <pluginName>[FINDBUGS] </pluginName>
-      <defaultEncoding/>
-      <canRunOnFailed>false</canRunOnFailed>
-      <useStableBuildAsReference>false</useStableBuildAsReference>
-      <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
-      <useDeltaValues>false</useDeltaValues>
-      <thresholds>
-        <unstableTotalAll/>
-        <unstableTotalHigh/>
-        <unstableTotalNormal/>
-        <unstableTotalLow/>
-        <failedTotalAll/>
-        <failedTotalHigh/>
-        <failedTotalNormal/>
-        <failedTotalLow/>
-      </thresholds>
-      <shouldDetectModules>false</shouldDetectModules>
-      <dontComputeNew>true</dontComputeNew>
-      <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
-      <pattern/>
-    </hudson.plugins.findbugs.FindBugsPublisher>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>30</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-node-node-verify-master b/.jjb-test/expected-xml/github-node-node-verify-master
deleted file mode 100644 (file)
index 02d3563..0000000
+++ /dev/null
@@ -1,485 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$GERRIT_PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>NODE_DIR</name>
-          <description>Path to a Node project directory.</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>NODE_VERSION</name>
-          <description>Version of NodeJS to install.</description>
-          <defaultValue>6.11.4</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>Node Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; node-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/python&quot;
-# shellcheck source=/tmp/v/node/bin/activate disable=SC1091
-source &quot;/tmp/v/python/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade nodeenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; node-run.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-# Prepare node
-nodeenv --node=&quot;$NODE_VERSION&quot; --prebuilt &quot;/tmp/v/node&quot;
-source /tmp/v/node/bin/activate
-cd &quot;$WORKSPACE/$NODE_DIR&quot;
-npm install
-npm test
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-python-tox-verify-master b/.jjb-test/expected-xml/github-python-tox-verify-master
deleted file mode 100644 (file)
index cbdff16..0000000
+++ /dev/null
@@ -1,610 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$GERRIT_PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>TOX_DIR</name>
-          <description>Path to directory containing tox.ini file.
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>TOX_ENVS</name>
-          <description>Tox environments to run build against.
-Example: docs,py2,py3
-</description>
-          <defaultValue/>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>JJB Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>PYTHON_VERSION=python3</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet -p &quot;$PYTHON_VERSION&quot; &quot;/tmp/v/tox&quot;
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade argparse detox tox tox-pyenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-</command>
-    </hudson.tasks.Shell>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-run.sh&quot;
-
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-ARCHIVE_TOX_DIR=&quot;$WORKSPACE/archives/tox&quot;
-mkdir -p &quot;$ARCHIVE_TOX_DIR&quot;
-cd &quot;$WORKSPACE/$TOX_DIR&quot;
-
-if [ -d &quot;/opt/pyenv&quot; ]; then
-    echo &quot;---&gt; Setting up pyenv&quot;
-    export PYENV_ROOT=&quot;/opt/pyenv&quot;
-    export PATH=&quot;$PYENV_ROOT/bin:$PATH&quot;
-fi
-
-set +e  # Allow detox to fail so that we can collect the logs in the next step
-if [ ! -z &quot;$TOX_ENVS&quot; ]; then
-    detox -e &quot;$TOX_ENVS&quot;  | tee -a &quot;$ARCHIVE_TOX_DIR/detox.log&quot;
-    detox_status=&quot;${PIPESTATUS[0]}&quot;
-else
-    detox | tee -a &quot;$ARCHIVE_TOX_DIR/detox.log&quot;
-    detox_status=&quot;${PIPESTATUS[0]}&quot;
-fi
-
-# Disable SC2116 as we want to echo a space separated list of TOX_ENVS
-# shellcheck disable=SC2116
-for i in .tox/*/log; do
-    tox_env=$(echo $i | awk -F'/' '{print $2}')
-    cp -r &quot;$i&quot; &quot;$ARCHIVE_TOX_DIR/$tox_env&quot;
-done
-set -e  # Logs collected so re-enable
-
-echo &quot;Completed tox runs.&quot;
-
-test &quot;$detox_status&quot; -eq 0 || exit &quot;$detox_status&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>10</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-rtd-rtd-merge-master b/.jjb-test/expected-xml/github-rtd-rtd-merge-master
deleted file mode 100644 (file)
index 943ab35..0000000
+++ /dev/null
@@ -1,418 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>false</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.scm.NullSCM"/>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^remerge$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>RTD Merge</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-    <hudson.triggers.TimerTrigger>
-      <spec>H H * * *</spec>
-    </hudson.triggers.TimerTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>RTD_PROJECT=github-rtd</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; rtd-trigger-build.sh&quot;
-
-if [ &quot;$GERRIT_BRANCH&quot; == &quot;master&quot; ]; then
-    RTD_BUILD_VERSION=latest
-else
-    RTD_BUILD_VERSION=&quot;${GERRIT_BRANCH/\//-}&quot;
-fi
-
-curl -X POST --data &quot;version_slug=$RTD_BUILD_VERSION&quot; &quot;https://readthedocs.org/build/$RTD_PROJECT&quot;
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>15</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
diff --git a/.jjb-test/expected-xml/github-rtd-rtd-verify-master b/.jjb-test/expected-xml/github-rtd-rtd-verify-master
deleted file mode 100644 (file)
index bc03947..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <actions/>
-  <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
-  <keepDependencies>false</keepDependencies>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <concurrentBuild>true</concurrentBuild>
-  <assignedNode>build-vm</assignedNode>
-  <canRoam>false</canRoam>
-  <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
-      <projectUrl>$GIT_URL/$PROJECT/example-org/releng/ciman</projectUrl>
-      <displayName/>
-    </com.coravy.hudson.plugins.github.GithubProjectProperty>
-    <hudson.model.ParametersDefinitionProperty>
-      <parameterDefinitions>
-        <hudson.model.StringParameterDefinition>
-          <name>PROJECT</name>
-          <description>Parameter to identify a Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>STREAM</name>
-          <description>Stream is often set to the same name as 'branch' but can
-sometimes be used as a name representing a project's release code
-name.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_PROJECT</name>
-          <description>Parameter to identify Gerrit project. This is typically the
-project repo path as exists in Gerrit.
-For example: ofextensions/circuitsw
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>releng/ciman</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_BRANCH</name>
-          <description>Parameter to identify a Gerrit branch.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>GERRIT_REFSPEC</name>
-          <description>Parameter to identify a refspec when pulling from Gerrit.
-
-Note that Gerrit will override this parameter automatically if a
-job is triggered by Gerrit.
-</description>
-          <defaultValue>refs/heads/master</defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>LFTOOLS_VERSION</name>
-          <description>Version of lftools to install. Can be a specific version like
-'0.6.0' or a PEP-440 definition.
-https://www.python.org/dev/peps/pep-0440/
-For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
-</description>
-          <defaultValue>&lt;1.0.0</defaultValue>
-        </hudson.model.StringParameterDefinition>
-      </parameterDefinitions>
-    </hudson.model.ParametersDefinitionProperty>
-  </properties>
-  <scm class="hudson.plugins.git.GitSCM">
-    <configVersion>2</configVersion>
-    <userRemoteConfigs>
-      <hudson.plugins.git.UserRemoteConfig>
-        <name>origin</name>
-        <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
-        <url>git@github.com:example-org/releng/ciman</url>
-        <credentialsId>test-credential</credentialsId>
-      </hudson.plugins.git.UserRemoteConfig>
-    </userRemoteConfigs>
-    <branches>
-      <hudson.plugins.git.BranchSpec>
-        <name>$sha1</name>
-      </hudson.plugins.git.BranchSpec>
-    </branches>
-    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <remotePoll>false</remotePoll>
-    <gitTool>Default</gitTool>
-    <submoduleCfg class="list"/>
-    <reference/>
-    <gitConfigName/>
-    <gitConfigEmail/>
-    <extensions>
-      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
-        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
-      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
-      <hudson.plugins.git.extensions.impl.SubmoduleOption>
-        <disableSubmodules>false</disableSubmodules>
-        <recursiveSubmodules>true</recursiveSubmodules>
-        <trackingSubmodules>false</trackingSubmodules>
-        <parentCredentials>false</parentCredentials>
-        <reference/>
-        <timeout>10</timeout>
-      </hudson.plugins.git.extensions.impl.SubmoduleOption>
-      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
-    </extensions>
-  </scm>
-  <triggers class="vector">
-    <org.jenkinsci.plugins.ghprb.GhprbTrigger>
-      <spec/>
-      <adminlist/>
-      <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
-      <whitelist/>
-      <orgslist/>
-      <whiteListLabels/>
-      <blackListLabels/>
-      <cron/>
-      <triggerPhrase>^recheck$</triggerPhrase>
-      <skipBuildPhrase/>
-      <onlyTriggerPhrase>false</onlyTriggerPhrase>
-      <useGitHubHooks>true</useGitHubHooks>
-      <permitAll>true</permitAll>
-      <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
-      <extensions>
-        <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-          <commitStatusContext>RTD Verify</commitStatusContext>
-        </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
-      </extensions>
-    </org.jenkinsci.plugins.ghprb.GhprbTrigger>
-  </triggers>
-  <builders>
-    <EnvInjectBuilder>
-      <info>
-        <propertiesContent>DOC_DIR=docs/_build/html</propertiesContent>
-      </info>
-    </EnvInjectBuilder>
-    <hudson.tasks.Shell>
-      <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; tox-install.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet -p &quot;$PYTHON_VERSION&quot; &quot;/tmp/v/tox&quot;
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source &quot;/tmp/v/tox/bin/activate&quot;
-pip install --quiet --upgrade pip
-pip install --quiet --upgrade pipdeptree
-pip install --quiet --upgrade argparse detox tox tox-pyenv
-
-echo &quot;----&gt; Pip Dependency Tree&quot;
-pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; rtd-verify.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-echo &quot;---&gt; Fetching project&quot;
-if [ &quot;$GERRIT_PROJECT&quot; != &quot;$PROJECT&quot; ]; then
-    cd &quot;docs/submodules/$GERRIT_PROJECT&quot;
-fi
-
-git fetch origin &quot;$GERRIT_REFSPEC&quot; &amp;&amp; git checkout FETCH_HEAD
-
-echo &quot;---&gt; Generating docs&quot;
-cd &quot;$WORKSPACE&quot;
-tox -edocs
-
-echo &quot;---&gt; Archiving generated docs&quot;
-mkdir -p &quot;$WORKSPACE/archives&quot;
-mv &quot;$DOC_DIR&quot; archives/
-</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers>
-    <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-      <buildSteps>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; sysstat.sh&quot;
-set +e  # DON'T fail build if script fails.
-
-OS=$(facter operatingsystem)
-case &quot;$OS&quot; in
-    Ubuntu)
-        SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
-
-        # Dont run the script when systat is not enabled by default
-        if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
-            exit 0
-        fi
-    ;;
-    CentOS|RedHat)
-        SYSSTAT_PATH=&quot;/var/log/sa&quot;
-    ;;
-    *)
-        # nothing to do
-        exit 0
-    ;;
-esac
-
-SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
-mkdir -p &quot;$SAR_DIR&quot;
-cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
-# convert sar data to ascii format
-while IFS=&quot;&quot; read -r sarfilenum
-do
-    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
-done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
-
-# DON'T fail build if script fails.
-exit 0
-</command>
-        </hudson.tasks.Shell>
-        <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
-          <managedFiles>
-            <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-              <fileId>jenkins-log-archives-settings</fileId>
-              <targetLocation/>
-              <variable>SETTINGS_FILE</variable>
-            </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          </managedFiles>
-        </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
-        <EnvInjectBuilder>
-          <info>
-            <propertiesContent>SERVER_ID=logs</propertiesContent>
-          </info>
-        </EnvInjectBuilder>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; create-netrc.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
-    -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
-    -v x:username -o &quot;:&quot; -v x:password \
-    &quot;$SETTINGS_FILE&quot;)
-
-machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
-user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
-pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
-
-echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; lftools-install.sh&quot;
-
-# Script to install lftools via a version passed in via lf-infra-parameters
-#
-# Required parameters:
-#
-#     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
-#                      set to a strict version number like '1.2.3' or using
-#                      PEP-440 definitions.
-#
-#                      Examples:
-#                          &lt;1.0.0
-#                          &gt;=1.0.0,&lt;2.0.0
-#
-# By default a released version of lftools should always be used.
-# The purpose of the 2 variables below is so that lftools devs can test
-# unreleased versions of lftools. There are 2 methods to install a dev version
-# of lftools:
-#
-#     1) gerrit patch: Used to test a patch that has not yet been merged.
-#                      To do this set something like this:
-#                          LFTOOLS_MODE=gerrit
-#                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
-#
-#     2) git branch: Used to install an lftools version from a specific branch.
-#                    To use this set the variables as follows:
-#                          LFTOOLS_MODE=git
-#                          LFTOOLS_REFSPEC=master
-#
-#     3) release : The intended use case and default setting.
-#                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
-
-LFTOOLS_MODE=release  # release | git | gerrit
-LFTOOLS_REFSPEC=master
-
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
-
-virtualenv --quiet &quot;/tmp/v/lftools&quot;
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source &quot;/tmp/v/lftools/bin/activate&quot;
-pip install --quiet --upgrade pip
-
-case $LFTOOLS_MODE in
-    gerrit)
-        git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
-        pushd /tmp/lftools
-        git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
-        git checkout FETCH_HEAD
-        pip install --quiet --upgrade -r requirements.txt
-        pip install --quiet --upgrade -e .
-        popd
-        ;;
-
-    git)
-        pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
-        ;;
-
-    release)
-        if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
-            LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
-        fi
-
-        pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
-        ;;
-esac
-
-lftools --version
-
-# pipdeptree prints out a lot of information because lftools pulls in many
-# dependencies. Let's only print it if we want to debug.
-# echo &quot;----&gt; Pip Dependency Tree&quot;
-# pip install --quiet --upgrade pipdeptree
-# pipdeptree
-
-#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-echo &quot;---&gt; logs-deploy.sh&quot;
-
-# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
-
-set -x  # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
-LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
-
-if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
-then
-    set +x # Disable trace since we no longer need it
-
-    echo &quot;WARNING: Logging server not set&quot;
-else
-    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
-    NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
-    BUILD_URL=&quot;${BUILD_URL}&quot;
-
-    lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
-    lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
-
-    set +x  # Disable trace since we no longer need it.
-
-    echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
-fi
-</command>
-        </hudson.tasks.Shell>
-        <hudson.tasks.Shell>
-          <command>#!/bin/bash
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2017 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
-##############################################################################
-
-# Clear log credential files
-rm &quot;$SETTINGS_FILE&quot;
-rm ~/.netrc
-</command>
-        </hudson.tasks.Shell>
-        <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-          <regexp>^Build logs: .*</regexp>
-        </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
-      </buildSteps>
-      <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
-      <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
-      <markBuildUnstable>false</markBuildUnstable>
-    </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
-    <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
-      <patterns>
-        <hudson.plugins.ws__cleanup.Pattern>
-          <pattern>**/*.jenkins-trigger</pattern>
-          <type>EXCLUDE</type>
-        </hudson.plugins.ws__cleanup.Pattern>
-      </patterns>
-      <deleteDirs>false</deleteDirs>
-      <cleanupMatrixParent>false</cleanupMatrixParent>
-      <externalDelete/>
-      <cleanWhenSuccess>true</cleanWhenSuccess>
-      <cleanWhenUnstable>true</cleanWhenUnstable>
-      <cleanWhenFailure>true</cleanWhenFailure>
-      <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
-      <cleanWhenAborted>true</cleanWhenAborted>
-      <notFailBuild>true</notFailBuild>
-    </hudson.plugins.ws__cleanup.WsCleanup>
-  </publishers>
-  <buildWrappers>
-    <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
-    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>15</timeoutMinutes>
-      <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
-      <failBuild>true</failBuild>
-      <writingDescription>false</writingDescription>
-      <timeoutPercentage>0</timeoutPercentage>
-      <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
-      <timeoutType>absolute</timeoutType>
-    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
-    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
-    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-      <user>test-credential</user>
-    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
-    <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
-    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
-      <managedFiles>
-        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-          <fileId>npmrc</fileId>
-          <targetLocation>$HOME/.npmrc</targetLocation>
-          <variable/>
-        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
-      </managedFiles>
-    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
-  </buildWrappers>
-</project>
index d1ed43c..e29c1fa 100755 (executable)
@@ -9,15 +9,27 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-# This script tests jjb templates by comparing the result with expected output.
+# This script tests jjb templates by comparing the result with expected output
+# from global-jjb's origin/master branch.
 
 test_dir=$(mktemp -d)
 script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-expected_xml_dir="$script_dir/.jjb-test/expected-xml"
+expected_xml_dir="$(mktemp -d -t gjjb-XXXXXXXX)"
 
 echo "Script Directory: $script_dir"
 echo "Test Directory: $test_dir"
+echo "Expected XML Directory: $expected_xml_dir"
 
+git fetch origin
+gittmp="$(mktemp -d)"
+git worktree add --detach "$gittmp" origin/master
+pushd "$gittmp" || exit
+echo "Generating expected XML."
+jenkins-jobs test --recursive -o "$expected_xml_dir" "$gittmp":.jjb-test > /dev/null 2>&1
+popd || exit
+rm -r "$gittmp"
+
+echo "Generating test XML."
 jenkins-jobs test --recursive -o "$test_dir" "$script_dir":.jjb-test
 
 fail=false
@@ -31,9 +43,9 @@ for xml in "$test_dir"/*; do
 done
 
 # Cleanup
-rm -rf "$test_dir"
+rm -rf "$test_dir" "$expected_xml_dir"
 
 if $fail; then
-    echo "Differences detected. Check above for jobs that have been changed."
-    exit 1
+    echo "WARN: Differences detected. Check above for jobs that have been changed."
+    exit 0
 fi
diff --git a/tox.ini b/tox.ini
index 34e762c..ed34581 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -42,10 +42,3 @@ commands =
 [testenv:license]
 deps = lftools
 commands = lftools license check-dir -r '.+' shell
-
-[testenv:update-expected-xml]
-deps =
-    jenkins-job-builder
-commands =
-    jenkins-jobs test --recursive -o {toxinidir}/.jjb-test/expected-xml {toxinidir}/jjb:{toxinidir}/.jjb-test
-