Skip to content

Commit

Permalink
HPCC4J-592 Github Action: Baremetal regression suite, fails to find l…
Browse files Browse the repository at this point in the history
…atest 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]
  • Loading branch information
jpmcmu authored Apr 3, 2024
1 parent 1e8562f commit 004797b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/baremetal-regression-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
if gitTagProcessStatus != 0:
print('Unable to retrieve latest git tag. With error: ' + str(err))
sys.exit(1)
return None
latestGitTag = str(output)
Expand All @@ -82,11 +82,14 @@ jobs:
return extractVersion(versionMatch.group(1))
else:
print('Unable to extract version from git tag: ' + latestGitTag)
sys.exit(2)
return None
def getLatestBranchVersion(branchName):
latestVersion = getTagVersionForCmd("git tag --list 'hpcc4j_*-release' --sort=-v:refname | head -n 1")
if latestVersion is None:
print('Unable to find latest release version')
sys.exit(2)
if branchName == 'master':
return [latestVersion[0], latestVersion[1], latestVersion[2]]
Expand All @@ -102,7 +105,12 @@ jobs:
# Get latest release in branch
findLatestBranchVer = "git tag --list 'hpcc4j_" + str(branchVersion[0]) + "." + str(branchVersion[1]) + "*-release' --sort=-v:refname | head -n 1"
return getTagVersionForCmd(findLatestBranchVer)
latestBranchVersion = getTagVersionForCmd(findLatestBranchVer)
if latestBranchVersion is None:
print('No release found for branch: ' + branchName + ' using latest release: ' + str(latestVersion))
return latestVersion
else:
return latestBranchVersion
branch_name = os.environ['BRANCH_NAME']
Expand Down

0 comments on commit 004797b

Please sign in to comment.