Skip to content

Instantly share code, notes, and snippets.

@pauloricardomg
Created November 19, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauloricardomg/1b223b48230fab078570 to your computer and use it in GitHub Desktop.
Save pauloricardomg/1b223b48230fab078570 to your computer and use it in GitHub Desktop.
Cassandra JIRA submission table generator
#!/bin/bash
GIT_USER=pauloricardomg
CASSCI_USER=paulomotta
if [[ $# -lt 2 ]]; then
echo "usage: $0 <suffix> <version1> .. <versionN>"
exit 1
fi
BRANCH_SUFFIX=$1
shift
## Header
HEADER=""
BRANCH=""
TESTALL=""
DTEST=""
for version in "$@"
do
HEADER="$HEADER||$version"
if [[ $version == "dtest" ]]; then
BRANCH="$BRANCH||[branch|https://github.com/riptano/cassandra-dtest/compare/master...$GIT_USER:$BRANCH_SUFFIX]"
continue
fi
if [[ $version == "ccm" ]]; then
BRANCH="$BRANCH||[branch|https://github.com/pcmanus/ccm/compare/master......$GIT_USER:$BRANCH_SUFFIX]"
continue
fi
if [[ $version == "trunk" ]]; then
BRANCH="$BRANCH||[branch|https://github.com/apache/cassandra/compare/trunk...$GIT_USER:$version-$BRANCH_SUFFIX]"
else
BRANCH="$BRANCH||[branch|https://github.com/apache/cassandra/compare/cassandra-$version...$GIT_USER:$version-$BRANCH_SUFFIX]"
fi
TESTALL="$TESTALL||[testall|http://cassci.datastax.com/view/Dev/view/$CASSCI_USER/job/$GIT_USER-$version-$BRANCH_SUFFIX-testall/lastCompletedBuild/testReport/]"
DTEST="$DTEST||[dtest|http://cassci.datastax.com/view/Dev/view/$CASSCI_USER/job/$GIT_USER-$version-$BRANCH_SUFFIX-dtest/lastCompletedBuild/testReport/]"
done
HEADER="$HEADER||"
BRANCH="$BRANCH||"
TESTALL="$TESTALL||"
DTEST="$DTEST||"
echo $HEADER
echo $BRANCH
echo $TESTALL
echo $DTEST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment