Implements woodpecker pipeline #19

Merged
OCram85 merged 18 commits from woodpecker into master 2022-09-13 13:24:46 +02:00
4 changed files with 139 additions and 0 deletions

67
.woodpecker/.master.yml Normal file
View File

@ -0,0 +1,67 @@
depends_on:
- test
pipeline:
buildMaster:
image: plugins/docker
settings:
repo: ocram85/blog
dockerfile: Dockerfile
auto_tag: true
build_args:
- NODE_BASE=lts-buster-slim
- NGINX_BASE=1.23.1-alpine
username:
from_secret: hub_user
password:
from_secret: hub_passwd
when:
event: push
branch: master
buildMasterGitea:
image: plugins/docker
settings:
registry: gitea.ocram85.com
repo: gitea.ocram85.com/ocram85/blog
dockerfile: Dockerfile
auto_tag: true
build_args:
- NODE_BASE=lts-buster-slim
- NGINX_BASE=1.23.1-alpine
username:
from_secret: gitea_user
password:
from_secret: gitea_passwd
when:
event: push
branch: master
trivyMaster:
image: aquasec/trivy:0.24.3
commands:
- |
trivy image \
--severity UNKNOWN,LOW,MEDIUM \
--no-progress \
ocram85/blog:latest
- |
trivy image \
--exit-code 1 \
--severity HIGH,CRITICAL \
--no-progress \
ocram85/blog:latest
when:
event: push
branch: master
triggerPortainerMaster:
image: ocram85/portainer-serviceupdate
settings:
#VERBOSE: true
URI: "https://portainer.ocram85.com"
TOKEN:
from_secret: TOKEN
when:
event: push
branch: master

65
.woodpecker/.next.yml Normal file
View File

@ -0,0 +1,65 @@
depends_on:
- test
pipeline:
buildNext:
image: plugins/docker
settings:
#dry_run: true
repo: ocram85/blog
dockerfile: Dockerfile
tags: next
build_args:
- NODE_BASE=lts-buster-slim
- NGINX_BASE=1.23.1-alpine
username:
from_secret: hub_user
password:
from_secret: hub_passwd
when:
event: pull_request
buildNextGitea:
image: plugins/docker
settings:
#dry_run: true
registry: gitea.ocram85.com
repo: gitea.ocram85.com/ocram85/blog
dockerfile: Dockerfile
tags: next
build_args:
- NODE_BASE=lts-buster-slim
- NGINX_BASE=1.23.1-alpine
username:
from_secret: gitea_user
password:
from_secret: gitea_passwd
when:
event: pull_request
trivyNext:
image: aquasec/trivy:0.24.3
commands:
- |
trivy image \
--severity UNKNOWN,LOW,MEDIUM \
--no-progress \
ocram85/blog:next
- |
trivy image \
--exit-code 1 \
--severity HIGH,CRITICAL \
--no-progress \
ocram85/blog:next
when:
event: pull_request
triggerPortainer:
image: ocram85/portainer-serviceupdate
settings:
#VERBOSE: true
URI: "https://portainer.ocram85.com"
TOKEN:
from_secret: NEXT_TOKEN
when:
event: pull_request

7
.woodpecker/.test.yml Normal file
View File

@ -0,0 +1,7 @@
pipeline:
build:
image: node:lts-buster-slim
commands:
- npm install
- npm run test
- npm run build