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

Add support for latest deployment release #19490

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

BillAnastasiadis
Copy link
Contributor

@BillAnastasiadis BillAnastasiadis commented Jun 10, 2024

This commit adds support for the keyword latest in QESAP_INSTALL_VERSION, along with explicit version number.

It uses the github api to fetch the latest release tag, and downloads it.

Copy link

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files.

Copy link
Contributor

@mpagot mpagot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe add a unit test in t/09_qesapdeployment.t

@BillAnastasiadis BillAnastasiadis force-pushed the qesap_latest branch 4 times, most recently from e9ac029 to 6987974 Compare June 10, 2024 14:48
if (get_var('QESAP_INSTALL_VERSION') eq 'latest') {
my $latest_release_url = "https://$official_repo/releases/latest";
my $redirect_url = script_output("curl -s -L -o /dev/null -w %{url_effective} $latest_release_url");
if ($redirect_url =~ /\/tag\/v([0-9.]+)$/) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

die "Failed to parse the latest version from $redirect_url" if ($redirect_url !~ /\/tag\/v([0-9.]+)$/);
my $version = $1;
$ver_artifact = "v$version.tar.gz";
record_info("Latest QE-SAP-DEPLOYMENT release used: $version", $version);

Copy link
Contributor

@mpagot mpagot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@lpalovsky lpalovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@alvarocarvajald alvarocarvajald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alvarocarvajald alvarocarvajald merged commit 1b82e89 into os-autoinst:master Jun 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants