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

Fix packaging tests after addition of new wolfi-based image #112831

Merged
merged 21 commits into from
Sep 26, 2024
Merged

Conversation

brianseeders
Copy link
Contributor

@brianseeders brianseeders commented Sep 12, 2024

No description provided.

@brianseeders brianseeders added >non-issue :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts v9.0.0 v8.16.0 labels Sep 12, 2024
@breskeby breskeby force-pushed the missing-wolfi branch 4 times, most recently from 2f5efe1 to 8199a19 Compare September 24, 2024 14:55
@breskeby breskeby marked this pull request as ready for review September 25, 2024 16:01
@breskeby breskeby requested a review from a team as a code owner September 25, 2024 16:01
@elasticsearchmachine elasticsearchmachine added the Team:Delivery Meta label for Delivery team label Sep 25, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@breskeby
Copy link
Contributor

resolved packaging tests tested on buildkite: https://buildkite.com/elastic/elasticsearch-periodic-packaging/builds/3850

@@ -83,6 +83,33 @@ if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then

DOCKER_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you just do docker login --username "$DOCKER_REGISTRY_USERNAME" --password "$DOCKER_REGISTRY_PASSWORD" docker.elastic.co instead of all of this stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(and by "can you" I mean: do you know if it works?)

Copy link
Contributor

Choose a reason for hiding this comment

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

@brianseeders I tried that and the problem with that is, that we run this logic on all OS types, even those which don't have docker installed. using this file only approach allows not failing on those systems. Alternatively we could just not fail if docker is not available but that approach did not seem better than this file based one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, I would do:

if which docker > /dev/null 2>&1; then
  docker login --username "$DOCKER_REGISTRY_USERNAME" --password "$DOCKER_REGISTRY_PASSWORD" docker.elastic.co
fi

which has the advantage of not blowing away the existing docker config if there is one.

And probably move the vault lookups into the if as well, since they're useless on OSes that don't have docker, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

applied your suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would approve the PR but you'll have to since I opened it

@brianseeders brianseeders changed the title Add more missing wolfi references to fix tests Fix packaging tests after addition of new wolfi-based image Sep 25, 2024
@breskeby breskeby added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport-and-merge labels Sep 25, 2024
@breskeby breskeby merged commit e9b3033 into main Sep 26, 2024
15 of 22 checks passed
@breskeby breskeby deleted the missing-wolfi branch September 26, 2024 09:11
@brianseeders
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

brianseeders added a commit to brianseeders/elasticsearch that referenced this pull request Sep 27, 2024
…112831)

* Add more missing wolfi references to fix tests
* packaging tests require access to docker registry
* Fix symlink for es distributions jdk cacerts in wolfi docker
* Fix native support on wolfi images
* Fix provided keystore packaging tests for wolfi
* Add utils used for testing to wolfi image
* Explicitly set default shell to bash in docker images
* Fix docker config issues
* Apply review feedback around docker login

---------

Co-authored-by: Rene Groeschke <[email protected]>
(cherry picked from commit e9b3033)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >non-issue Team:Delivery Meta label for Delivery team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants