Plugin its-jira stable-2.12 branch build with BUCK
<!-- 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/its-jira
gerrit
+refs/heads/*:refs/remotes/gerrit/*
https://gerrit.googlesource.com/gerrit
base
+refs/heads/*:refs/remotes/base/*
https://gerrit.googlesource.com/plugins/its-base
origin/stable-2.12
false
Default
false
true
false
false
10
true
false
false
false
H/50 * * * *
false
false
#!/bin/bash -e
# NOTE: All Gerrit plugins currently depend on, at a minimum
# the bucklets repo, and most plugins don't build outside the
# Gerrit tree, even with bucklets. As a result, we need to
# graft the plugin onto the Gerrit repo. We do this by checking
# out the proper version of Gerrit, removing the plugin if it
# exists, then use git read-tree to put the plugin we're
# building in place.
git checkout gerrit/stable-2.12
rm -rf plugins/its-jira
rm -rf plugins/its-base
git read-tree -u --prefix=plugins/its-jira origin/stable-2.12
git read-tree -u --prefix=plugins/its-base base/stable-2.12
rm -Rf buck-out
SOURCE_LEVEL=$(grep "source_level" .buckconfig || echo "source_level=7")
. set-java.sh $(echo $SOURCE_LEVEL | cut -d '=' -f 2 | tr -d '[[:space:]]')
buck build -v 3 plugins/its-jira
# Remove duplicate entries
PLUGIN_JAR=$(ls $(pwd)/buck-out/gen/plugins/its-jira/its-jira*.jar)
mkdir jar-out && pushd jar-out
jar xf $PLUGIN_JAR && jar cmf META-INF/MANIFEST.MF $PLUGIN_JAR .
popd
# Extract version information
PLUGIN_VERSION=$(git describe --always origin/stable-2.12)
echo -e "Implementation-Version: $PLUGIN_VERSION" > MANIFEST.MF
jar ufm $PLUGIN_JAR MANIFEST.MF && rm MANIFEST.MF
echo "$PLUGIN_VERSION" > $PLUGIN_JAR-version
buck-out/gen/plugins/its-jira/its-jira.jar*
false
false
false
false
true
true
30