Plugin importer stable-2.14 branch build with Bazel<!-- 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/importer
gerrit
+refs/heads/*:refs/remotes/gerrit/*
https://gerrit.googlesource.com/gerrit
origin/stable-2.14
false
Default
false
true
false
false
10
bazel-debian
false
false
false
false
H/50 * * * *
false
false
#!/bin/bash -e
git checkout -fb stable-2.14 gerrit/stable-2.14
git submodule update --init
rm -rf plugins/importer
git read-tree -u --prefix=plugins/importer origin/stable-2.14
if [ -f plugins/importer/external_plugin_deps.bzl ]
then
cp -f plugins/importer/external_plugin_deps.bzl plugins/
fi
TARGETS=$(echo "plugins/{name}:{name}" | sed -e 's/{name}/importer/g')
TEST_TARGET=$(grep -2 junit_tests plugins/importer/BUILD | grep -o 'name = "[^"]*"' | cut -d '"' -f 2)
. set-java.sh 8
java -fullversion
bazelisk version
bazelisk build --spawn_strategy=standalone --genrule_strategy=standalone $TARGETS
if [ "$TEST_TARGET" != "" ]
then
bazelisk test --test_env DOCKER_HOST=$DOCKER_HOST plugins/importer:$TEST_TARGET
fi
for JAR in $(find bazel-bin/plugins/importer -name importer*.jar)
do
PLUGIN_VERSION=$(git describe --always origin/stable-2.14)
echo -e "Implementation-Version: $PLUGIN_VERSION" > MANIFEST.MF
jar ufm $JAR MANIFEST.MF && rm MANIFEST.MF
DEST_JAR=bazel-bin/plugins/importer/$(basename $JAR)
[ "$JAR" -ef "$DEST_JAR" ] || mv $JAR $DEST_JAR
echo "$PLUGIN_VERSION" > bazel-bin/plugins/importer/$(basename $JAR-version)
done
#!/bin/bash -e
curl -L https://gerrit-review.googlesource.com/projects/plugins%2Fimporter/config | \
tail -n +2 > bazel-bin/plugins/importer/importer.json
bazel-bin/plugins/importer/importer.jar, bazel-bin/plugins/importer/importer.jar-version, bazel-bin/plugins/importer/importer.json
false
false
false
false
true
true
30