Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC4J-592 Github Action: Baremetal regression suite, fails to find version #702

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading