26 lines
888 B
YAML
26 lines
888 B
YAML
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
|
|
#- "--build-arg 'HUGO_ENVIRONMENT=production'"
|
|
- "--build-arg 'HUGO_ENVIRONMENT=staging'"
|
|
- "--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
|