diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..769c244 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets.yml diff --git a/README.md b/README.md index eb9252e..f804c91 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/static.yml b/static.yml new file mode 100644 index 0000000..eedf2de --- /dev/null +++ b/static.yml @@ -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