chore(portfolio): add Job to build site image

This commit is contained in:
David Landry 2025-03-27 13:11:22 -04:00
parent 91e12a766b
commit 058785ba2d
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,24 @@
apiVersion: batch/v1
kind: Job
metadata:
name: build-hugo-site
spec:
template:
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--context=git://git.nc.landry.land/davad/portfolio-site.git" # Need to set env GIT_USERNAME and GIT_PASSWORD
- "--destination=registry.int.nc.landry.land/portfolio-site:$TAG" # Need to set TAG somehow. Maybe this goes in the overlays?
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker
restartPolicy: Never
volumes:
- name: kaniko-secret
secret:
secretName: registry-credentials
items:
- key: .dockerconfigjson
path: config.json

View file

@ -4,3 +4,4 @@ kind: Kustomization
resources:
- ./deployment.yaml
- ./service.yaml
- ./job.build-site.yaml