Skip to content

Update hawk image path to load the container built by Leap16.0#25203

Open
Dawei-Pang wants to merge 1 commit intoos-autoinst:masterfrom
Dawei-Pang:update_hawk_docker_path_20260331
Open

Update hawk image path to load the container built by Leap16.0#25203
Dawei-Pang wants to merge 1 commit intoos-autoinst:masterfrom
Dawei-Pang:update_hawk_docker_path_20260331

Conversation

@Dawei-Pang
Copy link
Copy Markdown
Contributor

@Dawei-Pang Dawei-Pang commented Apr 3, 2026

Please allow me to use this merge request to implement:

  1. Update default hawk image path to load the container built by Leap16.0
  2. Add the followed two parameters:
    • DOCKER_CONTENT_TRUST: set DOCKER_CONTENT_TRUST=1 this is env variable to enable Docker content trust by default it is in disable mode
    • HAWK_E2E_TEST_IMAGE: Load customized container instead of default path

Copy link
Copy Markdown
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.

It LGTM in general, but I do have 2 suggestions.

my $image = "registry.opensuse.org/devel/openqa/ci/tooling/containers_15_4/hawk_test:latest";

assert_script_run("podman pull $image", 240);
my $image = get_var('HAWK_IMAGE_URL', 'registry.opensuse.org/devel/openqa/ci/tooling/containers_16_0/hawk_test:latest');
Copy link
Copy Markdown
Contributor

@alvarocarvajald alvarocarvajald Apr 7, 2026

Choose a reason for hiding this comment

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

Is HAWK_IMAGE_URL a new setting? If so, I suggest to change it to something more descriptive, such as HAWK_E2E_TEST_IMAGE. "hawk image URL" tells me that we're downloading HAWK from the URL, when what we're actually downloading is a docker/podman image that contains the E2E test and its dependencies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks!

assert_script_run("cd /home/$testapi::username");
my $test_cmd = "podman run --rm --name test --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=\$DISPLAY -v \$PWD/$path:/$path ";
record_info("podman images", script_output('podman images'));
my $test_cmd = $docker_content_trust . "podman run --rm --name test --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=\$DISPLAY -v \$PWD/$path:/$path ";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As you're using double quotes, the variable can go between the quotes:

    my $test_cmd = "$docker_content_trust podman run --rm --name test --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=\$DISPLAY -v \$PWD/$path:/$path ";

This way you avoid the string concat operation on top of the string interpolation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks Alvaro!
Since $docker_content_trust include trailing space, I uses ${docker_content_trust}podman to make sure podman command without leading space when $docker_content_trust is empty.

@Dawei-Pang Dawei-Pang force-pushed the update_hawk_docker_path_20260331 branch from ab873ef to 5f29a71 Compare April 8, 2026 02:36
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.

2 participants