You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[9.1] (backport #18181) Remove redundant testing and circular dependency from docker acceptance testing (#18254)
* Remove redundant testing and circular dependency from docker acceptance testing (#18181)
* Use locally build artifact to build container from public dockerfile
Previously we would build an image (which would not actually be used), build
dockerfiles, modify dockerfiles to curl from
`https://snapshots.elastic.co/downloads/logstash'` then build the image used for
testing based on the modified dockerfile. This resulted in testing the last
published image to `snapshots`. This presents two problems 1. The test is
running against the last published image (not the tip of the branch being
tested) 2. this carries a dependency on both a DRA and unified stack release
having been run. Therefor acceptance tests will fail in between the time we bump
logstash version and a successful run of unified release.
This commit modifies the dockerfile to use the artifact prepared in the first
step instead of curling the last published one. This solves both issues as the
tests run against the code from the tip fo the branch being tested and there is
no dependency on an artifact existing as a result of a unified release pipeline.
* Remove redundant docker steps from workflows
Previously for docker acceptance tests three steps were performed: 1. Build
container images (based on local artifacts) 2. Build "public" dockerfiles 3.
Build container based on (a modified) file from step 2. The ONLY difference
between the dockerfile that ultimately is used to define an image between 1 and
2 is WHERE the logstash source is downloaded from. In acceptance testing we WANT
to use the source at the current checkout of logstash (not a remote). Using
remote causes a dependency issue when changes are not published. Publishing is
tied to unified release and gated on tests so naturally this is a bad fit for
that dependency.
This commit removes the redundancy by ONLY generating images for testing (step 1
from above). This also firms up our use of LOCAL_ARTIFACTS. Namely, the ONLY
time we want that set to `false` is when we build a "public" dockerfile. We
explicitly set that in the corresponding DRA script now. Similarly we explicitly
set it to `true` when testing.
* Remove unused function and argument
This commit removes the unused function for building from dockerfiles.
It also removes an unused argument for the make task for build_docker.
(cherry picked from commit a994c7c)
# Conflicts:
# docker/Makefile
# rakelib/artifacts.rake
* fix merge conflicts
---------
Co-authored-by: Cas Donoghue <[email protected]>
0 commit comments