add pipeline

This commit is contained in:
Pim Kunis 2023-05-19 22:32:48 +02:00
parent 5feae321f8
commit 689376e44b
3 changed files with 69 additions and 3 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
secrets.yml

View file

@ -4,6 +4,6 @@ Here I will test how to build a jekyll project, create a docker image from it an
## Commands
`./fly -t lewis login -c http://lewis.hyp:8080 -u test -p test`
`./fly -t lewis set-pipeline -p static -c static.yml`
`./fly -t lewis intercept --check static/site-repo`
`fly -t lewis login -c http://lewis.hyp:8080 -u test -p test`
`fly -t lewis set-pipeline --load-vars-from=secrets.yml -p static -c static.yml`
`fly -t lewis intercept --check static/site-repo`

65
static.yml Normal file
View file

@ -0,0 +1,65 @@
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