Skip to content

Commit e45f1c7

Browse files
Add an option to refresh to newest hack/env image
If we pre-pull the `openshift/origin-release` image onto the nodes that run our CI we still need to ensure that we are updating to the newest version of the image that is released when we run the CI, regardless of when the underlying AMI was created for that job. This patch allows for a user to pass in `$OS_BUILD_ENV_PULL_IMAGE` to force a new image to be pulled. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 356101a commit e45f1c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hack/lib/build/environment.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ function os::build::environment::run() {
205205
fi
206206
fi
207207

208+
if [[ -n "${OS_BUILD_ENV_PULL_IMAGE:-}" ]]; then
209+
os::log::info "Pulling the ${OS_BUILD_ENV_IMAGE} image to update it..."
210+
docker pull "${OS_BUILD_ENV_IMAGE}"
211+
fi
212+
208213
os::log::debug "Using commit ${commit}"
209214
os::log::debug "Using volume ${volume}"
210215

0 commit comments

Comments
 (0)