fix(ci): helm collision-proof en helm-deploy (pre-horneado + fallback mktemp único)
Propaga desde coralware/IDP@b31c741 (CI-SHARED-HOME-RACE). El step usa el helm pre-horneado de la imagen del runner si está presente; el fallback descarga a un dir único por-run (mktemp), nunca a $HOME/.local/bin ni /tmp/linux-$ARCH compartidos que con executor=host se pisan entre jobs concurrentes.
This commit is contained in:
@@ -165,21 +165,32 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Instalar helm
|
- name: Asegurar helm disponible
|
||||||
|
# helm v3.14.4 viene pre-horneado en la imagen del runner
|
||||||
|
# (infrastructure/ci-system/Dockerfile, igual que kubectl/trivy) → este
|
||||||
|
# step es un no-op de verificación. Fallback para imágenes antiguas:
|
||||||
|
# descarga a un directorio ÚNICO por-run (`mktemp -d`) y lo añade al PATH;
|
||||||
|
# NUNCA escribe a rutas compartidas ($HOME/.local/bin ni /tmp/linux-$ARCH),
|
||||||
|
# que con executor=host se pisan entre jobs concurrentes del mismo runner
|
||||||
|
# (causa raíz del flake first-deploy: "helm: Text file busy" /
|
||||||
|
# "mv: can't rename", CI-SHARED-HOME-RACE, sesión CI 2026-06-16).
|
||||||
run: |
|
run: |
|
||||||
|
if command -v helm >/dev/null 2>&1; then
|
||||||
|
echo "helm pre-horneado en la imagen: $(helm version --short)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
HELM_VERSION=v3.14.4
|
HELM_VERSION=v3.14.4
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
x86_64) ARCH=amd64 ;;
|
x86_64) ARCH=amd64 ;;
|
||||||
aarch64) ARCH=arm64 ;;
|
aarch64) ARCH=arm64 ;;
|
||||||
*) echo "Arquitectura no soportada: $(uname -m)"; exit 1 ;;
|
*) echo "Arquitectura no soportada: $(uname -m)"; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
mkdir -p "${HOME}/.local/bin"
|
DEST="$(mktemp -d)"
|
||||||
curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz" \
|
curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz" \
|
||||||
| tar -xz -C /tmp "linux-${ARCH}/helm"
|
| tar -xz -C "$DEST" "linux-${ARCH}/helm"
|
||||||
mv "/tmp/linux-${ARCH}/helm" "${HOME}/.local/bin/helm"
|
chmod +x "${DEST}/linux-${ARCH}/helm"
|
||||||
chmod +x "${HOME}/.local/bin/helm"
|
echo "${DEST}/linux-${ARCH}" >> "$GITHUB_PATH"
|
||||||
echo "${HOME}/.local/bin" >> "$GITHUB_PATH"
|
"${DEST}/linux-${ARCH}/helm" version
|
||||||
"${HOME}/.local/bin/helm" version
|
|
||||||
|
|
||||||
- name: Decodificar kubeconfig del tenant
|
- name: Decodificar kubeconfig del tenant
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user