This commit is contained in:
commit
2b132c46db
144
.drone.jsonnet
Normal file
144
.drone.jsonnet
Normal file
@ -0,0 +1,144 @@
|
||||
local PipelineBuild(arch='amd64') = {
|
||||
kind: 'pipeline',
|
||||
name: 'build-' + arch,
|
||||
platform: {
|
||||
os: 'linux',
|
||||
arch: arch,
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: 'dryrun',
|
||||
image: 'plugins/docker',
|
||||
settings: {
|
||||
dry_run: true,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
build_args: [],
|
||||
},
|
||||
when: {
|
||||
ref: [
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'publish',
|
||||
image: 'plugins/docker',
|
||||
settings: {
|
||||
auto_tag: true,
|
||||
auto_tag_suffix: arch,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
build_args: [],
|
||||
},
|
||||
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',
|
||||
overwrite: true,
|
||||
title: '${DRONE_TAG}',
|
||||
note: 'CHANGELOG.md',
|
||||
},
|
||||
when: {
|
||||
ref: ['refs/tags/**'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
local PipelineNotifications(depends_on=[]) = {
|
||||
kind: 'pipeline',
|
||||
name: 'notifications',
|
||||
platform: {
|
||||
os: 'linux',
|
||||
arch: 'amd64',
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
image: 'plugins/manifest',
|
||||
name: 'manifest',
|
||||
settings: {
|
||||
ignore_missing: true,
|
||||
tags: [
|
||||
'${DRONE_TAG}',
|
||||
'${DRONE_TAG%-*}',
|
||||
'${DRONE_TAG%.*}',
|
||||
'${DRONE_TAG%%.*}',
|
||||
],
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
spec: 'manifest.tmpl',
|
||||
},
|
||||
when: {
|
||||
status: [
|
||||
'success',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'readme',
|
||||
image: 'sheogorath/readme-to-dockerhub',
|
||||
environment: {
|
||||
DOCKERHUB_USERNAME: { from_secret: 'docker_username' },
|
||||
DOCKERHUB_PASSWORD: { from_secret: 'docker_password' },
|
||||
DOCKERHUB_REPO_PREFIX: 'xoxys',
|
||||
DOCKERHUB_REPO_NAME: '${DRONE_REPO_NAME}',
|
||||
README_PATH: 'README.md',
|
||||
SHORT_DESCRIPTION: 'Rootless NGINX - High-performance HTTP server and reverse proxy',
|
||||
},
|
||||
when: {
|
||||
status: [
|
||||
'success',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'matrix',
|
||||
image: 'plugins/matrix',
|
||||
settings: {
|
||||
homeserver: { from_secret: 'matrix_homeserver' },
|
||||
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' },
|
||||
password: { from_secret: 'matrix_password' },
|
||||
},
|
||||
when: {
|
||||
status: [
|
||||
'success',
|
||||
'failure',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
ref: [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
],
|
||||
status: [
|
||||
'success',
|
||||
'failure',
|
||||
],
|
||||
},
|
||||
depends_on: depends_on,
|
||||
};
|
||||
|
||||
[
|
||||
PipelineBuild(arch='amd64'),
|
||||
PipelineNotifications(depends_on=[
|
||||
'build-amd64',
|
||||
]),
|
||||
]
|
127
.drone.yml
Normal file
127
.drone.yml
Normal file
@ -0,0 +1,127 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: build-amd64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: dryrun
|
||||
image: plugins/docker
|
||||
settings:
|
||||
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: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
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: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: manifest.tmpl
|
||||
tags:
|
||||
- ${DRONE_TAG}
|
||||
- ${DRONE_TAG%-*}
|
||||
- ${DRONE_TAG%.*}
|
||||
- ${DRONE_TAG%%.*}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- 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: Rootless NGINX - High-performance HTTP server and reverse proxy
|
||||
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-amd64
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 217dfce73cdcafb0d08226885c4a2bf400d5295fcb729be0e59055aa686b955d
|
||||
|
||||
...
|
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM alpine:3.11
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
|
||||
org.label-schema.name="alpine" \
|
||||
org.label-schema.vcs-url="https://gitea.rknet.org/docker/molecule" \
|
||||
org.label-schema.vendor="Robert Kaussow" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN addgroup -g 101 -S app && \
|
||||
adduser -S -D -H -u 101 -h /app -s /sbin/nologin -G app -g app app && \
|
||||
apk --update add --virtual .build-deps curl && \
|
||||
curl -SsL -o /usr/local/bin/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.5.0/gomplate_linux-amd64-slim && \
|
||||
curl -SsL -o /usr/local/bin/supercronic https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-amd64 && \
|
||||
curl -SsL -o /usr/local/bin/url-parser https://github.com/xoxys/url-parser/releases/download/v0.1.0/url-parser-0.1.0-linux-amd64 && \
|
||||
curl -SsL -o /usr/local/bin/wait-for https://raw.githubusercontent.com/xoxys/wait-for/master/wait-for && \
|
||||
chmod 755 /usr/local/bin/gomplate && \
|
||||
chmod 755 /usr/local/bin/supercronic && \
|
||||
chmod 755 /usr/local/bin/url-parser && \
|
||||
chmod 755 /usr/local/bin/wait-for && \
|
||||
apk del .build-deps && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ADD overlay/ /
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
CMD []
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# alpine
|
||||
|
||||
[![Build Status](https://drone.rknet.org/api/badges/docker/alpine/status.svg)](https://drone.rknet.org/docker/alpine/)
|
||||
|
||||
Rootless alpine base image..
|
||||
|
||||
The pre-configured non-root user is a system user named `app` with the UID `101`. There is also a primary group with the same values.
|
12
manifest.tmpl
Normal file
12
manifest.tmpl
Normal file
@ -0,0 +1,12 @@
|
||||
image: xoxys/nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: xoxys/nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
0
overlay/.keep
Normal file
0
overlay/.keep
Normal file
Loading…
Reference in New Issue
Block a user