initial commit

This commit is contained in:
Robert Kaussow 2020-10-27 21:54:28 +01:00
commit dcb82f1664
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
7 changed files with 249 additions and 0 deletions

167
.drone.yml Normal file
View File

@ -0,0 +1,167 @@
---
kind: pipeline
name: build-container
platform:
os: linux
arch: amd64
steps:
- name: dryrun
image: plugins/docker
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
when:
ref:
- refs/heads/master
- refs/tags/**
depends_on:
- dryrun
- name: publish-dockerhub
image: plugins/docker
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/master
- refs/tags/**
depends_on:
- tags
- name: publish-quay
image: plugins/docker
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/master
- refs/tags/**
depends_on:
- tags
- name: publish-gitea
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.rknet.org
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
depends_on:
- publish-dockerhub
- publish-quay
trigger:
ref:
- refs/heads/master
- refs/pull/**
- refs/tags/**
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: pushrm-dockerhub
pull: always
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_SHORT: Custom image for markdownlint-cli
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
pull: always
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: matrix
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/master
- refs/tags/**
status:
- success
- failure
depends_on:
- build-container
---
kind: signature
hmac: f6bbcb393dac541e45cfc00845d0705312d017678cc865febabd740f8d600e65
...

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
.drone.yml

2
CHANGELOG.md Normal file
View File

@ -0,0 +1,2 @@
- INTERNAL
- setup renovate-bot

32
Dockerfile Normal file
View File

@ -0,0 +1,32 @@
FROM node:12-alpine
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>" \
org.label-schema.name="markdownlint-cli" \
org.label-schema.vcs-url="https://gitea.rknet.org/docker/markdownlint-cli" \
org.label-schema.vendor="Robert Kaussow" \
org.label-schema.schema-version="1.0"
ARG BUILD_VERSION
# renovate: datasource=npm depName=markdownlint-cli
ENV MARKDOWNLINT_VERSION="${BUILD_VERSION:-0.23.2}"
ENV FORCE_COLOR=true \
NPM_CONFIG_LOGLEVEL=error
COPY overlay/ /
RUN MARKDOWNLINT_VERSION="${MARKDOWNLINT_VERSION##v}" && \
MARKDOWNLINT_MAJOR="${MARKDOWNLINT_VERSION%%.*}" && \
if [ -z "${MARKDOWNLINT_MAJOR//[0-9]}" ] && [ -n "$MARKDOWNLINT_MAJOR" ]; then \
echo "Installing markdownlint-cli version '$MARKDOWNLINT_VERSION' ..." && \
npm install -g markdownlint-cli@"$MARKDOWNLINT_VERSION"; \
else \
echo "Installing latest markdownlint-cli ..." && \
npm install -g markdownlint-cli; \
fi && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
USER root
CMD []
ENTRYPOINT ["/bin/markdownlint-cli"]

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# markdownlint-cli
Custom image for markdownlint-cli
[![Build Status](https://img.shields.io/drone/build/docker/markdownlint-cli?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/markdownlint-cli)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/markdownlint-cli)
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/markdownlint-cli)
[![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/markdownlint-cli)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/markdownlint-cli/src/branch/master/LICENSE)
Custom wrapper Docker image for [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) optimized for CI.
## Usage
```Shell
docker run -v $(pwd):/drone/src markdownlint-cli
# or pass arguments to markdownlint-cli
docker run -v $(pwd):/drone/src markdownlint-cli -p .gitignore
```
## Build
```Shell
docker build -t markdownlint-cli:latest .
```
## License
This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/markdownlint-cli/src/branch/master/LICENSE) file for details.

4
overlay/bin/markdownlint-cli Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
set -eo pipefail
exec /usr/local/bin/markdownlint-cli "$@"

13
renovate.json Normal file
View File

@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"ignorePresets": [":prHourlyLimit2"],
"regexManagers": [
{
"fileMatch": ["^Dockerfile$"],
"matchStrings": [
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\nENV .*?_VERSION=\"\\${.*:-(?<currentValue>.*)}\"\\s"
]
}
]
}