Skip to content

Commit

Permalink
Add example input and output for the jq script
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Nov 22, 2024
1 parent cc6dff7 commit 0dac170
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ops/docker/extract_build_args.jq
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Example input:
## xgb-ci.gpu_build_r_rockylinux8
## Example output:
## --build-arg CUDA_VERSION_ARG=12.4.1 --build-arg R_VERSION_ARG=4.3.2
def compute_build_args($input; $container_id):
$input |
.[$container_id] |
Expand Down
5 changes: 5 additions & 0 deletions ops/docker/extract_build_args.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
## Extract container definition and build args from ops/docker/ci_container.yml,
## given the container ID.
##
## 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]"
Expand Down

0 comments on commit 0dac170

Please sign in to comment.