<?xml version='1.1' encoding='UTF-8'?>
<project>
  <actions/>
  <description>Lib module git-refs-filter stable-3.4 branch Bazel build&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
  <keepDependencies>false</keepDependencies>
  <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>
      <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/>
      <permission>hudson.model.Item.Discover:anonymous</permission>
      <permission>hudson.model.Item.ExtendedRead:anonymous</permission>
      <permission>hudson.model.Item.Read:anonymous</permission>
    </hudson.security.AuthorizationMatrixProperty>
  </properties>
  <scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
    <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-3.4</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <gitTool>Default</gitTool>
    <submoduleCfg class="list"/>
    <extensions>
      <hudson.plugins.git.extensions.impl.CloneOption>
        <shallow>false</shallow>
        <noTags>true</noTags>
        <depth>1</depth>
        <honorRefspec>false</honorRefspec>
      </hudson.plugins.git.extensions.impl.CloneOption>
      <hudson.plugins.git.extensions.impl.WipeWorkspace/>
    </extensions>
  </scm>
  <assignedNode>bazel-debian</assignedNode>
  <canRoam>false</canRoam>
  <disabled>true</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers>
    <hudson.triggers.SCMTrigger>
      <spec>H/50 * * * *</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -e
echo &quot;machine gerrit.googlesource.com login $GS_GIT_USER password $GS_GIT_PASS&quot;&gt;&gt; ~/.netrc
chmod 600 ~/.netrc
</command>
    </hudson.tasks.Shell>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -e

. set-java.sh 11

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

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

TARGETS=$(echo &quot;plugins/{name}:{name}&quot; | sed -e &apos;s/{name}/git-refs-filter/g&apos;)

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-3.4)
    echo -e &quot;Implementation-Version: $PLUGIN_VERSION&quot; &gt; MANIFEST.MF
    jar ufm $JAR MANIFEST.MF &amp;&amp; rm MANIFEST.MF
    DEST_JAR=bazel-bin/plugins/git-refs-filter/$(basename $JAR)
    [ &quot;$JAR&quot; -ef &quot;$DEST_JAR&quot; ] || mv $JAR $DEST_JAR
    echo &quot;$PLUGIN_VERSION&quot; &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>
      <latestOnly>false</latestOnly>
      <allowEmptyArchive>false</allowEmptyArchive>
      <onlyIfSuccessful>false</onlyIfSuccessful>
      <fingerprint>false</fingerprint>
      <defaultExcludes>true</defaultExcludes>
      <caseSensitive>true</caseSensitive>
    </hudson.tasks.ArtifactArchiver>
  </publishers>
  <buildWrappers>
    <hudson.plugins.build__timeout.BuildTimeoutWrapper plugin="build-timeout@1.19">
      <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 plugin="timestamper@1.8.10"/>
    <org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper plugin="credentials-binding@1.23">
      <bindings>
        <org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
          <credentialsId>gerrit.googlesource.com</credentialsId>
          <usernameVariable>GS_GIT_USER</usernameVariable>
          <passwordVariable>GS_GIT_PASS</passwordVariable>
        </org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
      </bindings>
    </org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>
  </buildWrappers>
</project>