From 058785ba2dd1fe3ecdeed41bbf7c3618b154c202 Mon Sep 17 00:00:00 2001 From: David Landry Date: Thu, 27 Mar 2025 13:11:22 -0400 Subject: [PATCH] chore(portfolio): add Job to build site image --- apps/portfolio/base/job.build-site.yaml | 24 ++++++++++++++++++++++++ apps/portfolio/base/kustomization.yaml | 1 + 2 files changed, 25 insertions(+) create mode 100644 apps/portfolio/base/job.build-site.yaml diff --git a/apps/portfolio/base/job.build-site.yaml b/apps/portfolio/base/job.build-site.yaml new file mode 100644 index 0000000..49c97ee --- /dev/null +++ b/apps/portfolio/base/job.build-site.yaml @@ -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 diff --git a/apps/portfolio/base/kustomization.yaml b/apps/portfolio/base/kustomization.yaml index ab1e6ea..bddb663 100644 --- a/apps/portfolio/base/kustomization.yaml +++ b/apps/portfolio/base/kustomization.yaml @@ -4,3 +4,4 @@ kind: Kustomization resources: - ./deployment.yaml - ./service.yaml + - ./job.build-site.yaml