2021-12-23 14:26:58 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "Test Pipeline"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
steps:
|
2021-12-23 14:34:14 +01:00
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2021-12-23 14:26:58 +01:00
|
|
|
- name: "Hugo test build"
|
2021-12-23 14:50:38 +01:00
|
|
|
image: klakegg/hugo:0.91.1-ext-alpine-ci
|
2021-12-23 14:26:58 +01:00
|
|
|
commands:
|
2021-12-23 14:28:08 +01:00
|
|
|
- hugo --gc --minify
|
2021-12-23 14:26:58 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "Next Build Pipeline"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- pull_request
|
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- "Test Pipeline"
|
|
|
|
|
|
|
|
steps:
|
2021-12-23 14:34:14 +01:00
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2021-12-23 14:26:58 +01:00
|
|
|
- name: "Build (${DRONE_BRANCH} as next)"
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: hub_user
|
|
|
|
password:
|
|
|
|
from_secret: hub_passwd
|
|
|
|
repo: ocram85/blog
|
|
|
|
tags: "next"
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
|
|
|
- name: "Trivy (next)"
|
|
|
|
image: aquasec/trivy
|
|
|
|
commands:
|
|
|
|
- "trivy image ocram85/blog:next"
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "Master Build Pipeline"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
branch:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- "Test Pipeline"
|
|
|
|
|
|
|
|
steps:
|
2021-12-23 14:34:14 +01:00
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2021-12-23 14:26:58 +01:00
|
|
|
- name: "Build (master)"
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: hub_user
|
|
|
|
password:
|
|
|
|
from_secret: hub_passwd
|
|
|
|
repo: ocram85/blog
|
|
|
|
auto_tag: true
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
|
|
|
- name: "Trivy (latest)"
|
|
|
|
image: aquasec/trivy
|
|
|
|
commands:
|
|
|
|
- "trivy image ocram85/blog:latest"
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "Tags Pipeline"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- tag
|
|
|
|
steps:
|
2021-12-23 14:34:14 +01:00
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
|
2021-12-23 14:26:58 +01:00
|
|
|
- name: "Build tag image"
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: hub_user
|
|
|
|
password:
|
|
|
|
from_secret: hub_passwd
|
|
|
|
repo: ocram85/blog
|
|
|
|
auto_tag: true
|