chore(portfolio): add Job to build site image
This commit is contained in:
parent
91e12a766b
commit
058785ba2d
2 changed files with 25 additions and 0 deletions
24
apps/portfolio/base/job.build-site.yaml
Normal file
24
apps/portfolio/base/job.build-site.yaml
Normal 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
|
||||||
|
|
@ -4,3 +4,4 @@ kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ./deployment.yaml
|
- ./deployment.yaml
|
||||||
- ./service.yaml
|
- ./service.yaml
|
||||||
|
- ./job.build-site.yaml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue