Skip to content

[Test] Verify cpu-32-hk Vault/buildkitd fix after ServiceAccount corr… #1

[Test] Verify cpu-32-hk Vault/buildkitd fix after ServiceAccount corr…

[Test] Verify cpu-32-hk Vault/buildkitd fix after ServiceAccount corr… #1

#
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is a part of the vllm-ascend project.
#
name: Test CPU-32-HK Vault/Buildkitd Fix
on:
pull_request:
types:
- opened
- synchronize
- reopened
push:
branches:
- 'test-cpu-32-hk-verify*'
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
defaults:
run:
shell: bash -el {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify-cpu-32-hk-vault-buildkitd:
runs-on: linux-amd64-cpu-32-hk
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: System info
run: |
echo "System: $(uname -a)"
echo "CPU cores: $(nproc)"
echo "User: $(whoami)"
echo "DOCKER_CONFIG=${DOCKER_CONFIG:-<unset>}"
echo "BUILDKITD_ADDR=${BUILDKITD_ADDR:-<unset>}"
- name: Verify Vault certificate injection
run: |
set -e
DOCKER_CONFIG_DIR="${DOCKER_CONFIG:-/home/user/.docker}"
echo "Checking Vault-injected certs in ${DOCKER_CONFIG_DIR}"
missing=0
for f in ca.pem cert.pem key.pem config.json; do
path="${DOCKER_CONFIG_DIR}/${f}"
if [ -s "$path" ]; then
echo "OK: ${path} ($(wc -c < "$path") bytes)"
else
echo "MISSING or empty: ${path}"
missing=1
fi
done
if [ "$missing" -ne 0 ]; then
echo "::error::vault-agent-init did not inject buildkitd certs into ${DOCKER_CONFIG_DIR}"
exit 1
fi
- name: Verify ServiceAccount token volume
run: |
set -e
TOKEN_PATH="/var/run/secrets/tokens/token"
if [ ! -s "$TOKEN_PATH" ]; then
echo "::error::projected ServiceAccount token not found at ${TOKEN_PATH}"
exit 1
fi
echo "OK: token present ($(wc -c < "$TOKEN_PATH") bytes)"
- name: Verify buildctl installation
run: |
set -e
BUILDKIT_CACHE="/root/.cache/buildkit/bin"
if [ ! -x "${BUILDKIT_CACHE}/buildctl" ]; then
echo "::error::buildctl not found at ${BUILDKIT_CACHE}/buildctl"
exit 1
fi
"${BUILDKIT_CACHE}/buildctl" --version
- name: Verify buildkitd connectivity
run: |
set -e
export PATH="/root/.cache/buildkit/bin:${PATH}"
buildctl debug workers
- name: Summary
if: always()
run: |
echo "cpu-32-hk job pod started, Vault certs injected, buildctl reachable via buildkitd."