add concourse pipeline
This commit is contained in:
parent
17897a3dfe
commit
9234002493
6 changed files with 90 additions and 27 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,6 +1 @@
|
|||
_site/
|
||||
.sass-cache/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
_drafts
|
||||
klise-*.gem
|
||||
secrets.yml
|
||||
|
|
4
Dockerfile
Normal file
4
Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
|||
FROM nginx:1.24-bullseye
|
||||
|
||||
COPY ./site-html /var/www/blog
|
||||
COPY ./this-repo/nginx.conf /etc/nginx/conf.d/default.conf
|
6
jekyll/.gitignore
vendored
Normal file
6
jekyll/.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
_site/
|
||||
.sass-cache/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
_drafts
|
||||
klise-*.gem
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Mahendrata Harpi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
18
nginx.conf
Normal file
18
nginx.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name pim.kunis.nl;
|
||||
index index.html index.htm;
|
||||
root /var/www/blog;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
61
pipeline.yml
Normal file
61
pipeline.yml
Normal file
|
@ -0,0 +1,61 @@
|
|||
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
|
Reference in a new issue