Skip to content

Commit 004797b

Browse files
authored
HPCC4J-592 Github Action: Baremetal regression suite, fails to find latest version (#702)
- Updated logic that finds that latest published HPCC version Signed-off-by: James McMullan [email protected] Signed-off-by: James McMullan [email protected]
1 parent 1e8562f commit 004797b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/baremetal-regression-suite.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
7474
if gitTagProcessStatus != 0:
7575
print('Unable to retrieve latest git tag. With error: ' + str(err))
76-
sys.exit(1)
76+
return None
7777
7878
latestGitTag = str(output)
7979
@@ -82,11 +82,14 @@ jobs:
8282
return extractVersion(versionMatch.group(1))
8383
else:
8484
print('Unable to extract version from git tag: ' + latestGitTag)
85-
sys.exit(2)
85+
return None
8686
8787
def getLatestBranchVersion(branchName):
8888
8989
latestVersion = getTagVersionForCmd("git tag --list 'hpcc4j_*-release' --sort=-v:refname | head -n 1")
90+
if latestVersion is None:
91+
print('Unable to find latest release version')
92+
sys.exit(2)
9093
9194
if branchName == 'master':
9295
return [latestVersion[0], latestVersion[1], latestVersion[2]]
@@ -102,7 +105,12 @@ jobs:
102105
103106
# Get latest release in branch
104107
findLatestBranchVer = "git tag --list 'hpcc4j_" + str(branchVersion[0]) + "." + str(branchVersion[1]) + "*-release' --sort=-v:refname | head -n 1"
105-
return getTagVersionForCmd(findLatestBranchVer)
108+
latestBranchVersion = getTagVersionForCmd(findLatestBranchVer)
109+
if latestBranchVersion is None:
110+
print('No release found for branch: ' + branchName + ' using latest release: ' + str(latestVersion))
111+
return latestVersion
112+
else:
113+
return latestBranchVersion
106114
107115
branch_name = os.environ['BRANCH_NAME']
108116

0 commit comments

Comments
 (0)