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 docker packaging tests #37617

Closed
rjernst opened this issue Jan 18, 2019 · 3 comments · Fixed by #46599
Closed

Add docker packaging tests #37617

rjernst opened this issue Jan 18, 2019 · 3 comments · Fixed by #46599
Assignees
Labels
:Delivery/Build Build or test infrastructure :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@rjernst
Copy link
Member

rjernst commented Jan 18, 2019

Now that we have our docker distribution in the elasticsearch repo, we should add packaging tests (of some sort) that ensure the bits inside the docker distribution work as intended. This would help with changes like #37243 to allow confidence in the change.

@rjernst rjernst added the :Delivery/Build Build or test infrastructure label Jan 18, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t
Copy link
Contributor

alpar-t commented Feb 27, 2019

Other than checking that basic functionality is there, we don't rely have checks similar to other packaging tests for docker, so I think we should close this in favor of #38053

@alpar-t alpar-t closed this as completed Feb 27, 2019
@alpar-t
Copy link
Contributor

alpar-t commented Mar 21, 2019

I'm going to re-open this based on the discussion we had around #38053 and #39515.
The mentioned issue and PR add a minimal REST test for docker, but we decided we also want to run the relevant java packaging tests on a container running the docker image, either via changing the entry point or exec-ing into the container.
We expect most checks that deal with file location, permissions etc to be relevant.

@alpar-t alpar-t reopened this Mar 21, 2019
@alpar-t alpar-t changed the title Add docker tests Add docker packaging tests Mar 21, 2019
@alpar-t alpar-t added the :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts label Sep 5, 2019
@pugnascotia pugnascotia self-assigned this Sep 19, 2019
pugnascotia added a commit that referenced this issue Oct 5, 2019
Closes #37617. Add packaging tests for our Docker images, similar to what
we have for RPMs or Debian packages. This works by running a container and
probing it e.g. via `docker exec`. Test can also be run in Vagrant, by
exporting the Docker images to disk and loading them again in VMs. Docker
is installed via `Vagrantfile` in a selection of boxes.
pugnascotia added a commit to pugnascotia/elasticsearch that referenced this issue Nov 5, 2019
Closes elastic#37617. Add packaging tests for our Docker images, similar to what
we have for RPMs or Debian packages. This works by running a container and
probing it e.g. via `docker exec`. Test can also be run in Vagrant, by
exporting the Docker images to disk and loading them again in VMs. Docker
is installed via `Vagrantfile` in a selection of boxes.
pugnascotia added a commit that referenced this issue Nov 5, 2019
Backport of #46599 and #47640. Add packaging tests for Docker.

* Introduce packaging tests for Docker (#46599)

Closes #37617. Add packaging tests for our Docker images, similar to what
we have for RPMs or Debian packages. This works by running a container and
probing it e.g. via `docker exec`. Test can also be run in Vagrant, by
exporting the Docker images to disk and loading them again in VMs. Docker
is installed via `Vagrantfile` in a selection of boxes.

* Only define Docker pkg tests if Docker is available (#47640)

Closes #47639, and unmutes tests that were muted in b958467.

The Docker packaging tests were being defined irrespective of whether
Docker was actually available in the current environment. Instead,
implement exclude lists so that in environments where Docker is not
available, no Docker packaging tests are defined. For CI hosts, the build
checks `.ci/dockerOnLinuxExclusions`. The Vagrant VMs can defined the
extension property `shouldTestDocker` property to opt-in to packaging
tests.

As part of this, define a seperate utility class for checking Docker,
and call that instead of defining checks in-line in BuildPlugin.groovy
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants