From d379b689ef80e31ac5c522fe421bb6dcc723ece2 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Thu, 11 Aug 2022 14:16:10 +0200 Subject: [PATCH] add build pipeline for non master changes --- .woodpecker/.next.yaml | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .woodpecker/.next.yaml diff --git a/.woodpecker/.next.yaml b/.woodpecker/.next.yaml new file mode 100644 index 0000000..dbedcab --- /dev/null +++ b/.woodpecker/.next.yaml @@ -0,0 +1,55 @@ +depends_on: + - test + +when: + branch: + exclude: + - master + +pipeline: + buildNext: + image: woopeckerci/plugin-docker-buildx + settings: + dry_run: true + repo: ocram85/blog + dockerfile: Dockerfile + tags: "next" + build_args: + - NODE_BASE=lts-buster-slim + - NGINX_BASE=1.21.6-alpine + username: + from_secret: hub_user + password: + from_secret: hub_passwd + when: + event: + - pull_request + + trivy: + 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