5ed2ef0958
Build and Deploy Platform / build-push-deploy (push) Has been cancelled
Harbor in-cluster builds via Kaniko, ArgoCD auto-sync, and production Helm values for abrban.com domains. Co-authored-by: Cursor <cursoragent@cursor.com>
61 lines
2.1 KiB
YAML
61 lines
2.1 KiB
YAML
# In-cluster platform build (Kaniko → Harbor abrban/). Apply via scripts/trigger-platform-build.sh
|
|
# Base images pulled via Harbor proxy-cache — no separate mirror job.
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: build-platform-images
|
|
namespace: cloudhost-builds
|
|
spec:
|
|
ttlSecondsAfterFinished: 3600
|
|
backoffLimit: 1
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
imagePullSecrets:
|
|
- name: registry-pull-secret
|
|
initContainers:
|
|
- name: git-clone
|
|
image: registry.abrban.com/proxy-dockerhub/alpine/git:2.43.0
|
|
env:
|
|
- name: GIT_REPO
|
|
value: http://gitea-http.gitea.svc.cluster.local:3000/abrban/cloud-host.git
|
|
- name: GIT_REF
|
|
value: main
|
|
command:
|
|
- sh
|
|
- -ec
|
|
- |
|
|
git clone --depth=1 --branch "${GIT_REF}" "${GIT_REPO}" /workspace
|
|
volumeMounts:
|
|
- name: workspace
|
|
mountPath: /workspace
|
|
containers:
|
|
- name: kaniko
|
|
image: registry.abrban.com/proxy-gcr/kaniko-project/executor:v1.23.2
|
|
env:
|
|
- name: IMAGE_TAG
|
|
value: bootstrap
|
|
command:
|
|
- sh
|
|
- -ec
|
|
- |
|
|
set -eux
|
|
REG="harbor-registry.cloudhost.svc.cluster.local:5000/abrban"
|
|
/kaniko/executor \
|
|
--dockerfile=/workspace/backend/Dockerfile \
|
|
--context=dir:///workspace/backend \
|
|
--destination="${REG}/cloudhost-backend:${IMAGE_TAG}" \
|
|
--insecure --skip-tls-verify
|
|
/kaniko/executor \
|
|
--dockerfile=/workspace/frontend/Dockerfile \
|
|
--context=dir:///workspace/frontend \
|
|
--build-arg=NEXT_PUBLIC_API_URL=https://api.abrban.com \
|
|
--destination="${REG}/cloudhost-frontend:${IMAGE_TAG}" \
|
|
--insecure --skip-tls-verify
|
|
volumeMounts:
|
|
- name: workspace
|
|
mountPath: /workspace
|
|
volumes:
|
|
- name: workspace
|
|
emptyDir: {}
|