Skip to content

Commit fea6f3b

Browse files
committed
JBTM-845 Tweak script support for benchmarking LRA PR's (script and GH Action)
1 parent 3535716 commit fea6f3b

2 files changed

Lines changed: 12 additions & 19 deletions

File tree

.github/scripts/performance.sh

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,28 @@ function build_narayana_lra {
5252
export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=512m"
5353

5454
LRA_REPO=${LRA_REPO:-jbosstm}
55-
LRA_BRANCH=main
55+
LRA_BRANCH=${LRA_BRANCH:-main}
5656
#rm -rf ~/.m2/repository/
5757
rm -rf lra
58-
git clone https://github.com/${LRA_REPO}/lra.git -b ${LRA_BRANCH}
58+
git clone https://github.com/${LRA_REPO}/lra.git
5959
[ $? = 0 ] || fatal "git clone https://github.com/${LRA_REPO}/lra.git failed"
60-
echo "Checking if need Narayana LRA PR"
61-
if [ -n "$LRA_PR_BRANCH" ]; then
62-
echo "Building LRA PR ${LRA_PR_BRANCH}"
63-
cd lra
64-
git fetch origin +refs/pull/*/head:refs/remotes/jbosstm/pull/*/head
65-
[ $? = 0 ] || fatal "git fetch of pulls failed"
66-
git checkout $LRA_PR_BRANCH
67-
[ $? = 0 ] || fatal "git fetch of pull branch failed"
68-
cd ../
69-
fi
70-
71-
if [ $? != 0 ]; then
72-
echo "Checkout failed"
73-
exit -1
74-
fi
60+
echo "Checking if need an LRA PR"
61+
echo "Building LRA PR ${LRA_BRANCH}"
7562
cd lra
63+
git fetch origin +refs/pull/*/head:refs/remotes/jbosstm/pull/*/head
64+
[ $? = 0 ] || fatal "git fetch of pulls failed"
65+
git checkout $LRA_BRANCH
66+
[ $? = 0 ] || fatal "Checkout failed: $BUILD_URL";
67+
7668
./build.sh clean install -B -DskipTests
7769
[ $LRA_CURRENT_VERSION ] || export LRA_CURRENT_VERSION=`grep "<version>" pom.xml | head -n 2 | tail -n 1 | sed "s/ *<version>//" | sed "s#</version>##"`
78-
cd ..
7970

8071
if [ $? != 0 ]; then
8172
echo "Narayana LRA build failed";
8273
exit -1
8374
fi
75+
76+
cd ..
8477
}
8578

8679
function download_and_update_as {

.github/workflows/parser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
'COMPARE_TRANSPORTS',
175175
'COMPARE_JOURNAL_PARAMETERS',
176176
'LRA_REPO',
177-
'LRA_PR_BRANCH',
177+
'LRA_BRANCH',
178178
'LRA_CURRENT_VERSION'
179179
];
180180

0 commit comments

Comments
 (0)