Only add some steps if EE_BUILDER_IMAGE is defined #450
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to take a base image and then just add a couple of prepend steps to add some downloadable executables. So I did not define an
EE_BUILDER_IAMGE
(since nothing new was going to be built). When I did this I got errors because some of the steps in thecontext/Containerfile
assumed I would have a build image. This change prevents these lines from making it into the file ifEE_BUILDER_IMAGE
is not defined.To reproduce, create a builder file like:
Run:
ansible-builder build -f operator_hub_release.yml --tag quay.io/rhn_gps_jowestco/operator-hub-ee
At first you should get the following error because EE_BUILDER_IMAGE is
None
:You can then add these if conditions one at a time until you can build the image successfully.
When I started going down the route of trying to add a
EE_BUILD_IMAGE
I was then getting errors because the dependency files were missing or empty.