Initial plugin source.
This commit is contained in:
parent
c68a062929
commit
db835da368
16 changed files with 744 additions and 0 deletions
38
.woodpecker/build.yaml
Normal file
38
.woodpecker/build.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
when:
|
||||
event: [manual, push, pull_request]
|
||||
branch: main
|
||||
path: [.woodpecker/build.yaml, .woodpecker/push.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
matrix:
|
||||
PLATFORM: [amd64, arm64]
|
||||
labels:
|
||||
platform: linux/${PLATFORM}
|
||||
|
||||
steps:
|
||||
|
||||
build:
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
commands: /kaniko/executor
|
||||
--context=$CI_WORKSPACE
|
||||
--destination=ci-registry.schnabel.org/kokuwaio/markdownlint:$CI_PIPELINE_NUMBER-$PLATFORM
|
||||
--reproducible
|
||||
--cache
|
||||
--cache-copy-layers
|
||||
--cache-run-layers
|
||||
--cache-repo=$DOCKER_CACHE/cache/kokuwaio/markdownlint
|
||||
--insecure-registry=$DOCKER_CACHE
|
||||
--insecure-registry=$DOCKER_MIRROR
|
||||
--registry-mirror=$DOCKER_MIRROR
|
||||
--skip-default-registry-fallback
|
||||
--label=org.opencontainers.image.title="Markdownlint Plugin"
|
||||
--label=org.opencontainers.image.description="A Woodpecker CI plugin for markdownlint-cli to lint markdown files."
|
||||
--label=org.opencontainers.image.url=$CI_REPO_URL
|
||||
--label=org.opencontainers.image.documentation=$CI_REPO_URL
|
||||
--label=org.opencontainers.image.source=$CI_REPO_CLONE_URL
|
||||
--label=org.opencontainers.image.vendor=kokuwa.io
|
||||
--label=org.opencontainers.image.licenses=GPL-3.0-or-later
|
||||
--label=org.opencontainers.image.version=0.43.0
|
||||
|
||||
test:
|
||||
image: ci-registry.schnabel.org/kokuwaio/markdownlint:${CI_PIPELINE_NUMBER}-${PLATFORM}
|
||||
pull: true
|
17
.woodpecker/dockerhub.yaml
Normal file
17
.woodpecker/dockerhub.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
when:
|
||||
instance: ci.schnabel.org
|
||||
repo: kokuwaio/markdownlint
|
||||
event: push
|
||||
branch: main
|
||||
path: README.md
|
||||
|
||||
steps:
|
||||
|
||||
metadata:
|
||||
image: kokuwaio/dockerhub-metadata
|
||||
settings:
|
||||
repository: kokuwaio/markdownlint
|
||||
description-short: A Woodpecker CI plugin for markdownlint-cli to lint markdown files.
|
||||
categories: [developer-tools, integration-and-delivery]
|
||||
username: {from_secret: DOCKERHUB_USERNAME}
|
||||
password: {from_secret: DOCKERHUB_PASSWORD}
|
31
.woodpecker/lint.yaml
Normal file
31
.woodpecker/lint.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
when:
|
||||
event: [cron, manual, push, pull_request]
|
||||
branch: main
|
||||
path: [.woodpecker/lint.yaml, renovate.json, "**/*.yaml", "**/*.md", "**/*.sh", "**/Dockerfile"]
|
||||
|
||||
steps:
|
||||
|
||||
renovate:
|
||||
image: kokuwaio/renovate-config-validator
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, renovate.json]]
|
||||
|
||||
yaml:
|
||||
image: kokuwaio/yamllint
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, .yamllint.yaml, "**/*.yaml"]]
|
||||
|
||||
markdown:
|
||||
image: kokuwaio/markdownlint
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, .markdownlint.yaml, "**/*.md"]]
|
||||
|
||||
dockerfile:
|
||||
image: kokuwaio/hadolint
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, .hadolint.yaml, "**/Dockerfile"]]
|
||||
|
||||
shellcheck:
|
||||
image: kokuwaio/shellcheck
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, "**/*.sh"]]
|
39
.woodpecker/push.yaml
Normal file
39
.woodpecker/push.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
when:
|
||||
instance: ci.schnabel.org
|
||||
repo: kokuwaio/markdownlint
|
||||
event: push
|
||||
branch: main
|
||||
path: [.woodpecker/build.yaml, .woodpecker/push.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
depends_on: [build]
|
||||
skip_clone: true
|
||||
|
||||
steps:
|
||||
|
||||
manifest:
|
||||
image: mplatform/manifest-tool:alpine-v2.1.9
|
||||
commands: manifest-tool push from-args
|
||||
--platforms=linux/amd64,linux/arm64
|
||||
--template=ci-registry.schnabel.org/kokuwaio/markdownlint:$CI_PIPELINE_NUMBER-ARCH
|
||||
--target=ci-registry.schnabel.org/kokuwaio/markdownlint:$CI_PIPELINE_NUMBER
|
||||
|
||||
docker.io: &push
|
||||
image: quay.io/skopeo/stable:v1.17.0
|
||||
depends_on: [manifest]
|
||||
commands:
|
||||
- echo "$AUTH" > /tmp/auth.json
|
||||
- skopeo copy --all --preserve-digests --dest-precompute-digests
|
||||
docker://ci-registry.schnabel.org/kokuwaio/markdownlint:$CI_PIPELINE_NUMBER
|
||||
docker://$URL/kokuwaio/markdownlint:0.43.0
|
||||
- skopeo copy --all --preserve-digests --dest-precompute-digests
|
||||
docker://ci-registry.schnabel.org/kokuwaio/markdownlint:$CI_PIPELINE_NUMBER
|
||||
docker://$URL/kokuwaio/markdownlint:latest
|
||||
environment:
|
||||
URL: docker.io
|
||||
AUTH: {from_secret: DOCKER_IO_AUTH}
|
||||
|
||||
ghcr.io:
|
||||
<<: *push
|
||||
environment:
|
||||
URL: ghcr.io
|
||||
AUTH: {from_secret: GHCR_IO_AUTH}
|
18
.woodpecker/test.yaml
Normal file
18
.woodpecker/test.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
when:
|
||||
instance: ci.schnabel.org
|
||||
repo: kokuwaio/markdownlint
|
||||
event: push
|
||||
branch: main
|
||||
path: [.woodpecker/build.yaml, .woodpecker/push.yaml, .woodpecker/test.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
depends_on: [push]
|
||||
matrix:
|
||||
PLATFORM: [amd64, arm64]
|
||||
labels:
|
||||
platform: linux/${PLATFORM}
|
||||
|
||||
steps:
|
||||
|
||||
test:
|
||||
image: kokuwaio/markdownlint
|
||||
pull: true
|
Loading…
Add table
Add a link
Reference in a new issue