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

fix docker build opts error #85278

Open
wants to merge 1 commit into
base: master
from

Conversation

@zhouya0
Copy link
Contributor

zhouya0 commented Nov 14, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:
Fix the unbound variable error.
It's because of the set -u of the script. When the DOCKER_BUILD_OPTS is empty. It will report this error.

Which issue(s) this PR fixes:

Fixes #85277

Does this PR introduce a user-facing change?:

fix docker build opts error
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 14, 2019

Hi @zhouya0. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 14, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zhouya0
To complete the pull request process, please assign lavalamp
You can assign the PR to them by writing /assign @lavalamp in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from BenTheElder and fejta Nov 14, 2019
@dims

This comment has been minimized.

Copy link
Member

dims commented Nov 14, 2019

/ok-to-test
/kind bug
/priority important-soon
/sig release

@dims

This comment has been minimized.

Copy link
Member

dims commented Nov 14, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 14, 2019

@zhouya0: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-node-e2e-containerd 28ce354 link /test pull-kubernetes-node-e2e-containerd
pull-kubernetes-kubemark-e2e-gce-big 28ce354 link /test pull-kubernetes-kubemark-e2e-gce-big

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

cblecker left a comment

/hold

@@ -344,6 +344,8 @@ function kube::release::create_docker_images_for_server() {
local DOCKER_BUILD_OPTS=()
if [[ "${KUBE_BUILD_PULL_LATEST_IMAGES}" =~ [yY] ]]; then
DOCKER_BUILD_OPTS+=("--pull")
else
DOCKER_BUILD_OPTS+=("")

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 14, 2019

Member

This should not be needed, as DOCKER_BUILD_OPTS is defined on L344

This comment has been minimized.

Copy link
@zhouya0

zhouya0 Nov 15, 2019

Author Contributor

Thanks for your reply. But I tested multiple-times and i still get the unbound variable error if not with DOCKER_BUILD_OPTS+=("").

This comment has been minimized.

Copy link
@BenTheElder

BenTheElder Nov 15, 2019

Member

https://stackoverflow.com/a/7577209

It depends on the bash version

This comment has been minimized.

Copy link
@BenTheElder

BenTheElder Nov 15, 2019

Member

instead we should probably expand DOCKER_BUILD_OPTS in a way that doesn't cause this error

@fejta

This comment has been minimized.

Copy link
Contributor

fejta commented Nov 15, 2019

/uncc

@k8s-ci-robot k8s-ci-robot removed the request for review from fejta Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.