Which command configures a buildconfig to trigger when the base image changes?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

Which command configures a buildconfig to trigger when the base image changes?

Explanation:
Setting a BuildConfig to trigger when its base image changes is done by adding an image change trigger that watches a specific image stream tag. The command does exactly that by attaching an image change trigger to the BuildConfig named phpbuild and pointing it to the image stream tag newapp/php:1. When the image tagged as newapp/php:1 gets a new image (digest) in the registry, OpenShift automatically starts a new build for phpbuild. This is the correct way to ensure builds stay up to date with updates to the base image. Other approaches would either reference a different tag (watching a different version), use an incorrect subcommand form, or specify an unlikely tag like 0, which would not reliably reflect changes to the intended base image. The key idea is to bind the BuildConfig to a specific base image tag so that any change to that image triggers a new build.

Setting a BuildConfig to trigger when its base image changes is done by adding an image change trigger that watches a specific image stream tag. The command does exactly that by attaching an image change trigger to the BuildConfig named phpbuild and pointing it to the image stream tag newapp/php:1. When the image tagged as newapp/php:1 gets a new image (digest) in the registry, OpenShift automatically starts a new build for phpbuild. This is the correct way to ensure builds stay up to date with updates to the base image.

Other approaches would either reference a different tag (watching a different version), use an incorrect subcommand form, or specify an unlikely tag like 0, which would not reliably reflect changes to the intended base image. The key idea is to bind the BuildConfig to a specific base image tag so that any change to that image triggers a new build.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy