initial commit
This commit is contained in:
commit
1f17b44614
123
.drone.yml
Normal file
123
.drone.yml
Normal file
@ -0,0 +1,123 @@
|
||||
---
|
||||
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: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
|
||||
- name: tags
|
||||
image: xoxys/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/**
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
build_args:
|
||||
- BUILD_VERSION=${DRONE_TAG%-*}
|
||||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/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/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: readme
|
||||
image: sheogorath/readme-to-dockerhub
|
||||
environment:
|
||||
DOCKERHUB_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKERHUB_REPO_NAME: ${DRONE_REPO_NAME}
|
||||
DOCKERHUB_REPO_PREFIX: xoxys
|
||||
DOCKERHUB_USERNAME:
|
||||
from_secret: docker_username
|
||||
README_PATH: README.md
|
||||
SHORT_DESCRIPTION: link-validator - Simple broken-link-checker wrapper made for CI
|
||||
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: 481cc5c3443cd199617fc9418ffbe01ed478aafa8340d382f9f6e011a1c44671
|
||||
|
||||
...
|
0
CHANGELOG.md
Normal file
0
CHANGELOG.md
Normal file
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@ -0,0 +1,37 @@
|
||||
FROM node:10-alpine
|
||||
# due to https://github.com/http-party/http-server/issues/537
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
|
||||
org.label-schema.name="link-validator" \
|
||||
org.label-schema.vcs-url="https://gitea.rknet.org/docker/link-validator" \
|
||||
org.label-schema.vendor="Robert Kaussow" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ARG BUILD_VERSION=latest
|
||||
|
||||
ENV BLC_VERSION="${BUILD_VERSION:-latest}" \
|
||||
LINK_VALIDATOR_BASE_DIR=/drone/src \
|
||||
LINK_VALIDATOR_SERVER_ADDRESS=127.0.0.1 \
|
||||
LINK_VALIDATOR_SERVER_PORT=8000 \
|
||||
FORCE_COLOR=true \
|
||||
NPM_CONFIG_LOGLEVEL=error
|
||||
|
||||
COPY overlay/ /
|
||||
|
||||
RUN echo "Installing requirements ..." && \
|
||||
npm install -g http-server && \
|
||||
BLC_VERSION="${BLC_VERSION##v}" && \
|
||||
BLC_MAJOR="${BLC_VERSION%%.*}" && \
|
||||
if [ -z "${BLC_MAJOR//[0-9]}" ] && [ -n "$BLC_MAJOR" ]; then \
|
||||
echo "Installing link-checker version '$BLC_VERSION' ..." && \
|
||||
npm install -g broken-link-checker@"$BLC_VERSION"; \
|
||||
else \
|
||||
echo "Installing latest link-checker ..." && \
|
||||
npm install -g broken-link-checker; \
|
||||
fi && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
USER root
|
||||
CMD []
|
||||
ENTRYPOINT ["/bin/link-validator"]
|
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# [link-validator](https://gitea.rknet.org/docker/link-validator)
|
||||
|
||||
[![Build Status](https://img.shields.io/drone/build/docker/link-validator?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/link-validator)
|
||||
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/link-validator)
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/link-validator/src/branch/master/LICENSE)
|
||||
|
||||
Simple wrapper for [broken-link-checker](https://github.com/stevenvachon/broken-link-checker) optimized for CI.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/link-validator/src/branch/master/LICENSE) file for details.
|
||||
|
||||
## Maintainers and Contributors
|
||||
|
||||
[Robert Kaussow](https://gitea.rknet.org/xoxys)
|
5
overlay/bin/link-validator
Executable file
5
overlay/bin/link-validator
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eo pipefail
|
||||
|
||||
/usr/local/bin/http-server "$LINK_VALIDATOR_BASE_DIR" -p "$LINK_VALIDATOR_SERVER_PORT" -a "$LINK_VALIDATOR_SERVER_ADDRESS" -s &
|
||||
exec /usr/local/bin/broken-link-checker "$@" http://"$LINK_VALIDATOR_SERVER_ADDRESS":"$LINK_VALIDATOR_SERVER_PORT"
|
Reference in New Issue
Block a user