62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
|
resources:
|
||
|
- name: site-repo
|
||
|
type: git
|
||
|
source:
|
||
|
uri: https://git.pim.kunis.nl/pim/static.git
|
||
|
- name: site-registry-image
|
||
|
type: registry-image
|
||
|
source:
|
||
|
repository: git.pim.kunis.nl/pim/static
|
||
|
tag: latest
|
||
|
username: pim
|
||
|
password: ((registry_token))
|
||
|
|
||
|
jobs:
|
||
|
- name: build-static-website
|
||
|
plan:
|
||
|
- get: site-repo
|
||
|
trigger: true
|
||
|
- task: build-site
|
||
|
config:
|
||
|
platform: linux
|
||
|
image_resource:
|
||
|
type: registry-image
|
||
|
source:
|
||
|
repository: jekyll/builder
|
||
|
inputs:
|
||
|
- name: site-repo
|
||
|
outputs:
|
||
|
- name: site-html
|
||
|
params:
|
||
|
JEKYLL_ENV: production
|
||
|
run:
|
||
|
path: sh
|
||
|
args:
|
||
|
- -exc
|
||
|
- |
|
||
|
ls -lash
|
||
|
chown jekyll:jekyll site-html
|
||
|
cd site-repo/jekyll
|
||
|
bundle install
|
||
|
bundle exec jekyll build --disable-disk-cache --destination ../../site-html
|
||
|
- task: build-image
|
||
|
privileged: true
|
||
|
config:
|
||
|
platform: linux
|
||
|
image_resource:
|
||
|
type: registry-image
|
||
|
source:
|
||
|
repository: concourse/oci-build-task
|
||
|
inputs:
|
||
|
- name: site-repo
|
||
|
- name: site-html
|
||
|
outputs:
|
||
|
- name: image
|
||
|
params:
|
||
|
DOCKERFILE: site-repo/Dockerfile
|
||
|
run:
|
||
|
path: build
|
||
|
- put: site-registry-image
|
||
|
params:
|
||
|
image: image/image.tar
|