-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use precise terminology for image components (#10)
* Assign alias tag even if PUBLISH_CONTAINER=0 * Use precise terminology for image components
- Loading branch information
Showing
5 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
#!/bin/bash | ||
## Extract container definition and build args from containers/ci_container.yml, | ||
## given the container ID. | ||
## given the image repo. | ||
## | ||
## Example input: | ||
## xgb-ci.clang_tidy | ||
## Example output: | ||
## CONTAINER_DEF='clang_tidy' BUILD_ARGS='--build-arg CUDA_VERSION_ARG=12.4.1' | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 [container_id]" | ||
echo "Usage: $0 [image_repo]" | ||
exit 1 | ||
fi | ||
|
||
CONTAINER_ID="$1" | ||
IMAGE_REPO="$1" | ||
CONTAINER_DEF=$( | ||
yq -o json containers/ci_container.yml | | ||
jq -r --arg container_id "${CONTAINER_ID}" '.[$container_id].container_def' | ||
jq -r --arg image_repo "${IMAGE_REPO}" '.[$image_repo].container_def' | ||
) | ||
BUILD_ARGS=$( | ||
yq -o json containers/ci_container.yml | | ||
jq -r --arg container_id "${CONTAINER_ID}" \ | ||
jq -r --arg image_repo "${IMAGE_REPO}" \ | ||
'include "containers/extract_build_args"; | ||
compute_build_args(.; $container_id)' | ||
compute_build_args(.; $image_repo)' | ||
) | ||
echo "CONTAINER_DEF='${CONTAINER_DEF}' BUILD_ARGS='${BUILD_ARGS}'" |