Plugin login-redirect master branch Bazel build for Gerrit stable-2.15<!-- Managed by Jenkins Job Builder -->
false
20
-1
20
-1
hudson.model.Item.Discover:anonymous
hudson.model.Item.ExtendedRead:anonymous
hudson.model.Item.Read:anonymous
2
origin
+refs/heads/*:refs/remotes/origin/*
https://gerrit.googlesource.com/plugins/login-redirect
*/master
false
Default
bazel-debian
false
false
false
false
H/50 * * * *
false
false
#!/bin/bash -e
. set-java.sh 8
echo "Building plugin login-redirect/master with Gerrit/stable-2.15"
git remote add gerrit https://gerrit.googlesource.com/gerrit
git fetch gerrit stable-2.15
git checkout -fb stable-2.15 gerrit/stable-2.15
git submodule update --init
git read-tree -u --prefix=plugins/login-redirect origin/master
if [ -f plugins/login-redirect/external_plugin_deps.bzl ]
then
cp -f plugins/login-redirect/external_plugin_deps.bzl plugins/
fi
TARGETS=$(echo "plugins/{name}:{name}" | sed -e 's/{name}/login-redirect/g')
BUILD_TARGETS=$(echo "$TARGETS" | tr ' ' '\n' | grep -v test)
java -fullversion
bazelisk version
bazelisk build --spawn_strategy=standalone --genrule_strategy=standalone $BUILD_TARGETS
if TEST_TARGETS=$(echo "$TARGETS" | tr ' ' '\n' | grep test)
then
BAZEL_OPTS="--spawn_strategy=standalone --genrule_strategy=standalone \
--test_output errors \
--test_summary detailed --flaky_test_attempts 3 \
--test_verbose_timeout_warnings --build_tests_only \
--test_timeout 3600 \
--test_tag_filters=-flaky \
--test_env DOCKER_HOST=$DOCKER_HOST"
bazelisk test $BAZEL_OPTS $TEST_TARGETS
fi
for JAR in $(find bazel-bin/plugins/login-redirect -name login-redirect*.jar)
do
PLUGIN_VERSION=$(git describe --always origin/master)
echo -e "Implementation-Version: $PLUGIN_VERSION" > MANIFEST.MF
jar ufm $JAR MANIFEST.MF && rm MANIFEST.MF
DEST_JAR=bazel-bin/plugins/login-redirect/$(basename $JAR)
[ "$JAR" -ef "$DEST_JAR" ] || mv $JAR $DEST_JAR
echo "$PLUGIN_VERSION" > bazel-bin/plugins/login-redirect/$(basename $JAR-version)
done
#!/bin/bash -e
curl -L https://gerrit-review.googlesource.com/projects/plugins%2Flogin-redirect/config | \
tail -n +2 > bazel-bin/plugins/login-redirect/login-redirect.json
bazel-bin/plugins/login-redirect/login-redirect.jar, bazel-bin/plugins/login-redirect/login-redirect.jar-version, bazel-bin/plugins/login-redirect/login-redirect.json
false
false
false
false
true
true
30