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

Forward-merge branch-23.08 into branch-23.10 #355

Closed
wants to merge 5 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/actions/build-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ runs:
--cache-from "${repo}:${{ inputs.tag }}" \
--image-name "${repo}:${{ inputs.tag }}" \
--workspace-folder "$(realpath -m ./image)" \
--output "type=oci,dest=${{ runner.temp }}/${{ inputs.arch }}.tar" \
--output "type=docker,dest=${{ runner.temp }}/${{ inputs.arch }}.tar" \
;
14 changes: 6 additions & 8 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ jobs:
hashes=();

for arch in "amd64" "arm64"; do
# Load and push the linux/$arch image and read its local hash
hash="$(docker load --input "${{ runner.temp }}/${arch}.tar" | tail -n1 | cut -d':' -f3)";
# Tag the loaded image with the final name
docker image tag ${hash} ${name};
# Push the local image to the registry to get its remote hash
hash="$(docker push ${name} | tail -n1 | cut -d' ' -f3)";
# Save the remote hash for use below
hashes+=("$hash");
# Load the linux/$arch and tag the loaded image with the final name
docker image tag \
$(docker load --input "${{ runner.temp }}/${arch}.tar" | tail -n1 | cut -d' ' -f3) \
${name};
# Push the local image to the registry to get its remote hash and save the remote hash for use below
hashes+=("$(docker push ${name} | tail -n1 | cut -d' ' -f3)");
done

# Create and push the multiarch manifest
Expand Down
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "23.8.13",
"version": "23.8.14",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

# Install the rapids dependency file generator and conda-merge
if type python >/dev/null 2>&1; then
python -m pip install rapids-dependency-file-generator conda-merge toml;
python -m pip install 'rapids-dependency-file-generator<1.14' conda-merge toml;
fi

# Install RAPIDS build utility scripts to /opt/
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "devcontainer-utils",
"id": "utils",
"version": "23.8.12",
"version": "23.8.13",
"description": "A feature to install RAPIDS devcontainer utility scripts",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
27 changes: 18 additions & 9 deletions features/src/utils/opt/devcontainer/bin/vault/auth/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ get_vault_token() {
local VAULT_HOST="$1";
local user_orgs="${@:2}";
local gh_token="$(gh auth token)";
local org

local vault_token=null;
local org;

for org in ${user_orgs}; do
vault_token="$( \
curl -s \
-X POST \
-H "Content-Type: application/json" \
-d "{\"token\": \"$gh_token\"}" \
"$VAULT_HOST/v1/auth/github-${org}/login" \
| jq -r '.auth.client_token' \
)";
for org in $(echo -e "${org}\n${org,,}\n${org^^}" | sort -su); do
vault_token="$( \
curl -s \
-X POST \
-H "Content-Type: application/json" \
-d "{\"token\": \"$gh_token\"}" \
"$VAULT_HOST/v1/auth/github-${org}/login" \
| jq -r '.auth.client_token' \
)";
if [[ "${vault_token:-null}" != null ]]; then
break;
fi
done
if [[ "${vault_token:-null}" != null ]]; then
break;
fi
Expand All @@ -29,4 +34,8 @@ get_vault_token() {
echo "vault_token='$vault_token'";
}

if test -n "${devcontainer_utils_debug:-}"; then
PS4="+ ${BASH_SOURCE[0]}:\${LINENO} "; set -x;
fi

(get_vault_token "$@");
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generate_s3_creds() {
local user_orgs="$( \
gh api user/orgs --jq '.[].login' \
-H "Accept: application/vnd.github+json" \
| grep --color=never -E "(${allowed_orgs})" \
| grep --color=never -iE "(${allowed_orgs})" \
)";

if test -z "${user_orgs:-}"; then
Expand Down
Loading