<?xml version="1.0" encoding="UTF-8"?><project>
  <actions/>
  <description>Lib module git-refs-filter stable-2.16 branch Bazel build&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
  <keepDependencies>false</keepDependencies>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <concurrentBuild>false</concurrentBuild>
  <assignedNode>bazel-debian</assignedNode>
  <canRoam>false</canRoam>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>20</daysToKeep>
        <numToKeep>-1</numToKeep>
        <artifactDaysToKeep>20</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <hudson.security.AuthorizationMatrixProperty>
      <permission>hudson.model.Item.Discover:anonymous</permission>
      <permission>hudson.model.Item.Read:anonymous</permission>
      <permission>hudson.model.Item.ExtendedRead:anonymous</permission>
    </hudson.security.AuthorizationMatrixProperty>
  </properties>
  <scm class="hudson.plugins.git.GitSCM">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <name>origin</name>
        <refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
        <url>https://gerrit.googlesource.com/a/modules/git-refs-filter</url>
        <credentialsId>gerrit.googlesource.com</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
      <hudson.plugins.git.UserRemoteConfig>
        <name>gerrit</name>
        <refspec>+refs/heads/*:refs/remotes/gerrit/*</refspec>
        <url>https://gerrit.googlesource.com/a/gerrit</url>
        <credentialsId>gerrit.googlesource.com</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>*/stable-2.16</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <disableSubmodules>false</disableSubmodules>
    <recursiveSubmodules>false</recursiveSubmodules>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <remotePoll>false</remotePoll>
    <gitTool>Default</gitTool>
    <submoduleCfg class="list"/>
    <reference/>
    <gitConfigName/>
    <gitConfigEmail/>
    <extensions>
      <hudson.plugins.git.extensions.impl.CloneOption>
        <shallow>false</shallow>
        <depth>1</depth>
        <noTags>true</noTags>
      </hudson.plugins.git.extensions.impl.CloneOption>
      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
    </extensions>
  </scm>
  <triggers class="vector">
    <hudson.triggers.SCMTrigger>
      <spec>H/50 * * * *</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
  <builders>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -e
echo "machine gerrit.googlesource.com login $GS_GIT_USER password $GS_GIT_PASS"&gt;&gt; ~/.netrc
chmod 600 ~/.netrc
</command>
    </hudson.tasks.Shell>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -e

case "stable-2.16" in
  stable-2.16|stable-3.2)
    . set-java.sh 8
    ;;
  *)
    . set-java.sh 11
    ;;
esac

git checkout -fb stable-2.16 gerrit/stable-2.16
git submodule update --init
rm -rf plugins/git-refs-filter
git read-tree -u --prefix=plugins/git-refs-filter origin/stable-2.16
git fetch --tags origin

for file in external_plugin_deps.bzl package.json
do
  if [ -f plugins/git-refs-filter/$file ]
  then
    cp -f plugins/git-refs-filter/$file plugins/
  fi
done

TARGETS=$(echo "plugins/{name}:{name}" | sed -e 's/{name}/git-refs-filter/g')

java -fullversion
bazelisk version
bazelisk build $BAZEL_OPTS $TARGETS
bazelisk test $BAZEL_OPTS --test_env DOCKER_HOST=$DOCKER_HOST //tools/bzl:always_pass_test plugins/git-refs-filter/...

for JAR in $(find bazel-bin/plugins/git-refs-filter -maxdepth 1 -name git-refs-filter*.jar)
do
    PLUGIN_VERSION=$(git describe  --always origin/stable-2.16)
    echo -e "Implementation-Version: $PLUGIN_VERSION" &gt; MANIFEST.MF
    jar ufm $JAR MANIFEST.MF &amp;&amp; rm MANIFEST.MF
    DEST_JAR=bazel-bin/plugins/git-refs-filter/$(basename $JAR)
    [ "$JAR" -ef "$DEST_JAR" ] || mv $JAR $DEST_JAR
    echo "$PLUGIN_VERSION" &gt; bazel-bin/plugins/git-refs-filter/$(basename $JAR-version)
done
</command>
    </hudson.tasks.Shell>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -e

curl -L https://gerrit-review.googlesource.com/projects/modules%2Fgit-refs-filter/config | \
     tail -n +2 &gt; bazel-bin/plugins/git-refs-filter/git-refs-filter.json

</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers>
    <hudson.tasks.ArtifactArchiver>
      <artifacts>bazel-bin/plugins/git-refs-filter/git-refs-filter.jar, bazel-bin/plugins/git-refs-filter/git-refs-filter.jar-version, bazel-bin/plugins/git-refs-filter/git-refs-filter.json, 
</artifacts>
      <allowEmptyArchive>false</allowEmptyArchive>
      <onlyIfSuccessful>false</onlyIfSuccessful>
      <fingerprint>false</fingerprint>
      <defaultExcludes>true</defaultExcludes>
      <caseSensitive>true</caseSensitive>
      <latestOnly>false</latestOnly>
    </hudson.tasks.ArtifactArchiver>
  </publishers>
  <buildWrappers>
    <hudson.plugins.build__timeout.BuildTimeoutWrapper>
      <strategy class="hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy">
        <timeoutMinutes>60</timeoutMinutes>
      </strategy>
      <operationList>
        <hudson.plugins.build__timeout.operations.FailOperation/>
      </operationList>
    </hudson.plugins.build__timeout.BuildTimeoutWrapper>
    <hudson.plugins.timestamper.TimestamperBuildWrapper/>
    <org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>
      <bindings>
        <org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
          <usernameVariable>GS_GIT_USER</usernameVariable>
          <passwordVariable>GS_GIT_PASS</passwordVariable>
          <credentialsId>gerrit.googlesource.com</credentialsId>
        </org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
      </bindings>
    </org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>
  </buildWrappers>
</project>