2021-07-04 06:22:25 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
2021-07-04 07:54:30 +00:00
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
|
2021-07-04 06:22:25 +00:00
|
|
|
steps:
|
2023-07-01 15:47:58 +00:00
|
|
|
- name: update-submodules
|
2021-07-04 06:35:32 +00:00
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2023-07-01 15:47:58 +00:00
|
|
|
- name: generate-blog
|
2021-07-04 06:22:25 +00:00
|
|
|
image: plugins/hugo
|
|
|
|
settings:
|
|
|
|
hugo_version: 0.84.4
|
|
|
|
validate: true
|
2021-07-04 06:24:48 +00:00
|
|
|
pull: always
|
2021-07-04 06:59:25 +00:00
|
|
|
|
2023-07-01 15:47:58 +00:00
|
|
|
- name: clean-up-images
|
|
|
|
image: alpine
|
2021-07-04 06:59:25 +00:00
|
|
|
commands:
|
2021-07-04 08:34:04 +00:00
|
|
|
- rm -rf public/images/*
|
2021-07-04 06:59:25 +00:00
|
|
|
|
2023-07-01 15:47:58 +00:00
|
|
|
- name: test-build-container
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
registry: scm.project42.io
|
|
|
|
username:
|
|
|
|
from_secret: registry_username
|
|
|
|
password:
|
|
|
|
from_secret: registry_password
|
|
|
|
repo: scm.project42.io/elia/blog
|
|
|
|
dry_run: true
|
|
|
|
squash: true
|
|
|
|
tags:
|
|
|
|
- "${DRONE_COMMIT_SHA:0:8}"
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: build-container
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
registry: scm.project42.io
|
|
|
|
username:
|
|
|
|
from_secret: registry_username
|
|
|
|
password:
|
|
|
|
from_secret: registry_password
|
|
|
|
repo: scm.project42.io/elia/blog
|
|
|
|
dry_run: false
|
|
|
|
squash: true
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- "${DRONE_COMMIT_SHA:0:8}"
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|