From 309253921eed7a2cf20bef60d9ce6ab1b35e7950 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 2 Feb 2024 12:45:17 +0100 Subject: [PATCH] first commit --- .woodpecker/build.yml | 31 +++++++++++++++++++++++++++++++ .woodpecker/lint.yml | 35 +++++++++++++++++++++++++++++++++++ Dockerfile | 3 +++ 3 files changed, 69 insertions(+) create mode 100644 .woodpecker/build.yml create mode 100644 .woodpecker/lint.yml create mode 100644 Dockerfile diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml new file mode 100644 index 0000000..f14bbf8 --- /dev/null +++ b/.woodpecker/build.yml @@ -0,0 +1,31 @@ +--- +depends_on: + - lint +steps: + selfhosted_tag: + image: plugins/docker@sha256:2f157400c2cb7de1b309b0f044f119375108218e54d38e1340e00b9f93abdefb + settings: + dockerfile: Dockerfile + repo: registry.mgrote.net/httpd + registry: registry.mgrote.net + tags: + - ${CI_COMMIT_TAG} + when: + event: + - tag + + selfhosted_push: + image: plugins/docker@sha256:2f157400c2cb7de1b309b0f044f119375108218e54d38e1340e00b9f93abdefb + settings: + dockerfile: Dockerfile + repo: registry.mgrote.net/httpd + registry: registry.mgrote.net + tags: + - ${CI_COMMIT_SHA:0:8} + - ${CI_COMMIT_BRANCH} + - latest + when: + event: + exclude: + - pull_request + - tag diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..a6a680a --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,35 @@ +--- +steps: + gitleaks: + image: zricethezav/gitleaks:v8.18.1 + commands: + - gitleaks detect --no-git --verbose --source $CI_WORKSPACE + when: + event: + exclude: + - tag + + hadolint: + image: pipelinecomponents/hadolint:0.26.0 + commands: + - hadolint Dockerfile + when: + event: + exclude: + - tag + + shellcheck: + image: registry.mgrote.net/allzweckcontainer:latest + commands: + - | + find . -type f -not -path './.git/*' -not -path './collections/*' -exec file {} \; | while IFS= read -r line; do + if echo "$line" | grep -q "shell script"; then + file_path=$(echo "$line" | awk -F':' '{print $1}') + shellcheck "$file_path" + fi + done + when: + event: + exclude: + - tag +... diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..32b533f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM httpd:2.4.57-alpine + +RUN apk add --no-cache curl wget