65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
resources:
|
|
- name: site-repo
|
|
type: git
|
|
source:
|
|
uri: https://git.pim.kunis.nl/pim/static.git
|
|
- name: this-repo
|
|
type: git
|
|
source:
|
|
uri: https://git.pim.kunis.nl/pim/concourse-test.git
|
|
- name: site-registry-image
|
|
type: registry-image
|
|
source:
|
|
repository: git.pim.kunis.nl/pim/concourse-test
|
|
tag: latest
|
|
username: pim
|
|
password: ((registry_token))
|
|
|
|
jobs:
|
|
- name: build-static-website
|
|
plan:
|
|
- get: site-repo
|
|
- 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
|
|
bundle install
|
|
bundle exec jekyll build --disable-disk-cache --destination ../site-html
|
|
- get: this-repo
|
|
- task: build-image
|
|
privileged: true
|
|
config:
|
|
platform: linux
|
|
image_resource:
|
|
type: registry-image
|
|
source:
|
|
repository: concourse/oci-build-task
|
|
inputs:
|
|
- name: this-repo
|
|
- name: site-html
|
|
outputs:
|
|
- name: image
|
|
params:
|
|
DOCKERFILE: this-repo/Dockerfile
|
|
run:
|
|
path: build
|
|
- put: site-registry-image
|
|
params:
|
|
image: image/image.tar
|