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

Don't read files from current working directory #4656

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cobalt/devinfra/kokoro/bin/dind_builder_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ set -ueEx

# Using repository root as work directory.
export WORKSPACE_COBALT="${KOKORO_ARTIFACTS_DIR}/git/src"
cd "${WORKSPACE_COBALT}"

# Clean up workspace on exit or error.
trap "bash ${WORKSPACE_COBALT}/cobalt/devinfra/kokoro/bin/cleanup.sh" EXIT INT TERM
Expand Down
6 changes: 2 additions & 4 deletions cobalt/devinfra/kokoro/bin/dind_py/dind_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def push_image(target_image):
utils.exec_cmd(command)


def get_local_image_name(service, compose_file='docker-compose.yaml'):
def get_local_image_name(service, compose_file):
"""
Parses the docker-compose file to determine the image-name from the
service-name. When the compose-file is used to build the image, it will get
Expand All @@ -86,9 +86,7 @@ def tag_image(src_img, dest_img):
utils.exec_cmd(tag_command)


def run_docker_build(platform,
target_image,
compose_file='docker-compose.yaml'):
def run_docker_build(platform, target_image, compose_file):
"""
Runs the docker build for the provided platform, and tags the newly built
image with the registry/image/tag arguments. If the build fails, instead it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def main():
utils.logging_info_spacer('Building Docker Image')
build_start_time = time.time()
try:
dind.run_docker_build(args.platform, target_image)
dind.run_docker_build(args.platform, target_image,
args.src_root + '/docker-compose.yaml')
dind.tag_image(target_image, floating_image)
dind.push_image(floating_image)
docker_build_duration = time.time() - build_start_time
Expand Down
1 change: 0 additions & 1 deletion cobalt/devinfra/kokoro/bin/dind_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ set -ueEx

# Using repository root as work directory.
export WORKSPACE_COBALT="${KOKORO_ARTIFACTS_DIR}/git/src"
cd "${WORKSPACE_COBALT}"

# Clean up workspace on exit or error.
trap "bash ${WORKSPACE_COBALT}/cobalt/devinfra/kokoro/bin/cleanup.sh" EXIT INT TERM
Expand Down
Loading