Skip to content

Commit 1a0c106

Browse files
Update publish and snapshot containers
1 parent 83e25da commit 1a0c106

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

.github/images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ images:
3636
image: ghcr.io/spack/ci-prune-buildcache:0.0.5
3737

3838
- path: ./images/protected-publish
39-
image: ghcr.io/spack/protected-publish:0.0.9
39+
image: ghcr.io/spack/protected-publish:0.0.10
4040

4141
- path: ./images/retry-trigger-jobs
4242
image: ghcr.io/spack/retry-trigger-jobs:0.0.2

images/protected-publish/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUN uv pip install --system --no-cache-dir -r /srcs/requirements.txt
1313

1414
COPY pkg /srcs/pkg
1515
COPY --chmod=755 migrate.sh /srcs/migrate.sh
16+
COPY --chmod=755 run.sh /srcs/run.sh
1617

1718
ENV PYTHONUNBUFFERED=1
1819
WORKDIR /srcs
19-
ENTRYPOINT ["python", "-m", "pkg.publish"]
20+
ENTRYPOINT ["bash", "/srcs/run.sh"]

images/protected-publish/run.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cmd=$1
2+
shift
3+
4+
case "$cmd" in
5+
*pub*)
6+
py_cmd="pkg.publish";;
7+
*mig*)
8+
exec /srcs/migrate.sh;;
9+
*snap*)
10+
py_cmd="pkg.snapshot";;
11+
*val*)
12+
py_cmd="pkg.validate_index";;
13+
*)
14+
echo "Unknown command: $cmd"
15+
exit 1;;
16+
esac
17+
18+
python -m $py_cmd $@

k8s/production/custom/protected-publish/cron-jobs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
restartPolicy: Never
1818
containers:
1919
- name: protected-publish
20-
image: ghcr.io/spack/protected-publish:0.0.9
20+
image: ghcr.io/spack/protected-publish:0.0.10
2121
imagePullPolicy: IfNotPresent
2222
resources:
2323
requests:
@@ -28,6 +28,7 @@ spec:
2828
- configMapRef:
2929
name: python-scripts-sentry-config
3030
args:
31+
- "publish"
3132
- "--bucket"
3233
- "spack-binaries"
3334
- "--ref"

k8s/production/custom/snapshot-release-tags/cron-jobs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
restartPolicy: Never
1717
containers:
1818
- name: snapshot-release-tags
19-
image: ghcr.io/spack/snapshot-release-tags:0.0.4
19+
image: ghcr.io/spack/protected-publish:0.0.10
2020
imagePullPolicy: IfNotPresent
2121
resources:
2222
requests:
@@ -31,5 +31,8 @@ spec:
3131
envFrom:
3232
- configMapRef:
3333
name: python-scripts-sentry-config
34+
args:
35+
- "snapshot"
36+
3437
nodeSelector:
3538
spack.io/node-pool: base

0 commit comments

Comments
 (0)