Compare commits
13 Commits
Author | SHA1 | Date |
---|---|---|
Robert Kaussow | 9aa96cc5f1 | |
Renovator Bot | 41f484661a | |
Renovator Bot | 139adc8927 | |
Renovator Bot | 59942ee789 | |
Robert Kaussow | 8b2944a068 | |
Renovator Bot | 2d411f28e0 | |
Robert Kaussow | efadb76ce4 | |
Renovator Bot | d7437dad77 | |
Robert Kaussow | 97ae0b89a0 | |
Renovator Bot | 4d4c2a94e2 | |
Renovator Bot | b49a2f8111 | |
Renovator Bot | 85763a00bc | |
Renovator Bot | a602cf1dea |
|
@ -6,13 +6,9 @@
|
||||||
{{ range .CommitGroups -}}
|
{{ range .CommitGroups -}}
|
||||||
### {{ .Title }}
|
### {{ .Title }}
|
||||||
|
|
||||||
{{ $subjects := list }}
|
|
||||||
{{ range .Commits -}}
|
{{ range .Commits -}}
|
||||||
{{ if not (has .Subject $subjects) -}}
|
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") | trim }}
|
||||||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
|
||||||
{{ $subjects = append $subjects .Subject -}}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if .NoteGroups -}}
|
{{- if .NoteGroups -}}
|
||||||
|
|
304
.drone.yml
304
.drone.yml
|
@ -7,16 +7,16 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: markdownlint
|
- name: markdownlint
|
||||||
image: thegeeklab/markdownlint-cli
|
image: thegeeklab/markdownlint-cli
|
||||||
commands:
|
commands:
|
||||||
- markdownlint 'README.md'
|
- markdownlint 'README.md'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -27,116 +27,116 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: binary
|
- name: binary
|
||||||
image: clux/muslrust:nightly-2021-04-14
|
image: clux/muslrust:nightly-2021-04-14
|
||||||
commands:
|
commands:
|
||||||
- make build
|
- make build
|
||||||
environment:
|
environment:
|
||||||
BUILD_VERSION: ${DRONE_TAG%-*}
|
BUILD_VERSION: ${DRONE_TAG%-*}
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: thegeeklab/drone-docker-buildx:20
|
image: thegeeklab/drone-docker-buildx:20
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
dry_run: true
|
dry_run: true
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- binary
|
- binary
|
||||||
|
|
||||||
- name: tags
|
- name: tags
|
||||||
image: thegeeklab/docker-autotag
|
image: thegeeklab/docker-autotag
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTOTAG_FORCE_LATEST: True
|
DOCKER_AUTOTAG_FORCE_LATEST: True
|
||||||
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
|
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
|
||||||
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
|
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
|
||||||
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
|
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
- name: changelog-generate
|
- name: changelog-generate
|
||||||
image: thegeeklab/git-chglog
|
image: thegeeklab/git-chglog
|
||||||
commands:
|
commands:
|
||||||
- git fetch -tq
|
- git fetch -tq
|
||||||
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
|
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
|
||||||
depends_on:
|
depends_on:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
- name: changelog-format
|
- name: changelog-format
|
||||||
image: thegeeklab/alpine-tools
|
image: thegeeklab/alpine-tools
|
||||||
commands:
|
commands:
|
||||||
- prettier CHANGELOG.md
|
- prettier CHANGELOG.md
|
||||||
- prettier -w CHANGELOG.md
|
- prettier -w CHANGELOG.md
|
||||||
depends_on:
|
depends_on:
|
||||||
- changelog-generate
|
- changelog-generate
|
||||||
|
|
||||||
- name: publish-dockerhub
|
- name: publish-dockerhub
|
||||||
image: thegeeklab/drone-docker-buildx:20
|
image: thegeeklab/drone-docker-buildx:20
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- changelog-format
|
- changelog-format
|
||||||
|
|
||||||
- name: publish-quay
|
- name: publish-quay
|
||||||
image: thegeeklab/drone-docker-buildx:20
|
image: thegeeklab/drone-docker-buildx:20
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
password:
|
password:
|
||||||
from_secret: quay_password
|
from_secret: quay_password
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||||
username:
|
username:
|
||||||
from_secret: quay_username
|
from_secret: quay_username
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- changelog-format
|
- changelog-format
|
||||||
|
|
||||||
- name: publish-gitea
|
- name: publish-gitea
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
base_url: https://gitea.rknet.org
|
base_url: https://gitea.rknet.org
|
||||||
note: CHANGELOG.md
|
note: CHANGELOG.md
|
||||||
overwrite: true
|
overwrite: true
|
||||||
title: ${DRONE_TAG}
|
title: ${DRONE_TAG}
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- publish-dockerhub
|
- publish-dockerhub
|
||||||
- publish-quay
|
- publish-quay
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -147,63 +147,63 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: pushrm-dockerhub
|
- name: pushrm-dockerhub
|
||||||
pull: always
|
pull: always
|
||||||
image: chko/docker-pushrm:1
|
image: chko/docker-pushrm:1
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASS:
|
DOCKER_PASS:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
DOCKER_USER:
|
DOCKER_USER:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
PUSHRM_FILE: README.md
|
PUSHRM_FILE: README.md
|
||||||
PUSHRM_SHORT: Custom image for the Vaultwarden LDAP connector
|
PUSHRM_SHORT: Custom image for the Vaultwarden LDAP connector
|
||||||
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
|
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
|
|
||||||
- name: pushrm-quay
|
- name: pushrm-quay
|
||||||
pull: always
|
pull: always
|
||||||
image: chko/docker-pushrm:1
|
image: chko/docker-pushrm:1
|
||||||
environment:
|
environment:
|
||||||
APIKEY__QUAY_IO:
|
APIKEY__QUAY_IO:
|
||||||
from_secret: quay_token
|
from_secret: quay_token
|
||||||
PUSHRM_FILE: README.md
|
PUSHRM_FILE: README.md
|
||||||
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
|
|
||||||
- name: matrix
|
- name: matrix
|
||||||
image: plugins/matrix
|
image: thegeeklab/drone-matrix
|
||||||
settings:
|
settings:
|
||||||
homeserver:
|
homeserver:
|
||||||
from_secret: matrix_homeserver
|
from_secret: matrix_homeserver
|
||||||
password:
|
password:
|
||||||
from_secret: matrix_password
|
from_secret: matrix_password
|
||||||
roomid:
|
roomid:
|
||||||
from_secret: matrix_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 }}"
|
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
|
||||||
username:
|
username:
|
||||||
from_secret: matrix_username
|
from_secret: matrix_username
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-container
|
- build-container
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: b03e655c89137813302453a422df07b0d905cbd6cdfe9d0719cf45e167f7ea75
|
hmac: f23406441a2cf3872a1990a14e60a888b375ef31f75ea455fe4d2aa5dfe850be
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM thegeeklab/alpine:latest@sha256:3de659c1a479d9d80e9c3924227981450af3a068087545a47360cfc2e70a91cc
|
FROM thegeeklab/alpine:latest@sha256:4361bc72c04bea35bb620d3641e73d7794246fac35b94e12049ba166d171d5bd
|
||||||
|
|
||||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
|
|
|
@ -1,40 +1,39 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# shellcheck disable=SC3040
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /usr/local/lib/log.sh
|
||||||
|
|
||||||
/usr/local/bin/gomplate -o /app/config.toml -f /etc/templates/config.toml.tmpl
|
/usr/local/bin/gomplate -o /app/config.toml -f /etc/templates/config.toml.tmpl
|
||||||
|
|
||||||
if [ -z "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ] || [ -z "$VAULTWARDEN_LDAP_HOST" ]
|
if [ -z "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ] || [ -z "$VAULTWARDEN_LDAP_HOST" ]; then
|
||||||
then
|
log_error "Error: Vaultwarden and/or LDAP server not configured, exiting"
|
||||||
printf "Error: Vaultwarden and/or LDAP server not configured. Exiting ...\n"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ]
|
if [ -n "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ]; then
|
||||||
then
|
|
||||||
WAITFOR_BW_SCHEME=$(/usr/local/bin/url-parser scheme --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
WAITFOR_BW_SCHEME=$(/usr/local/bin/url-parser scheme --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
||||||
WAITFOR_BW_HOST=$(/usr/local/bin/url-parser host --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
WAITFOR_BW_HOST=$(/usr/local/bin/url-parser host --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
||||||
WAITFOR_BW_PORT=$(/usr/local/bin/url-parser port --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
WAITFOR_BW_PORT=$(/usr/local/bin/url-parser port --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
|
||||||
|
|
||||||
if [ -z "$WAITFOR_BW_PORT" ]
|
if [ -z "$WAITFOR_BW_PORT" ]; then
|
||||||
then
|
|
||||||
[ "$WAITFOR_BW_SCHEME" = "https" ] && WAITFOR_BW_PORT=433 || WAITFOR_BW_PORT=80
|
[ "$WAITFOR_BW_SCHEME" = "https" ] && WAITFOR_BW_PORT=433 || WAITFOR_BW_PORT=80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Wait for vaultwarden server on '%s:%s'...\n" "${WAITFOR_BW_HOST}" "${WAITFOR_BW_PORT}"
|
log_info "Wait for Vaultwarden server on '${WAITFOR_BW_HOST}:${WAITFOR_BW_PORT}'"
|
||||||
/usr/local/bin/wait-for "${WAITFOR_BW_HOST}":"${WAITFOR_BW_PORT}"
|
/usr/local/bin/wait-for "${WAITFOR_BW_HOST}":"${WAITFOR_BW_PORT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$VAULTWARDEN_LDAP_HOST" ]
|
if [ -n "$VAULTWARDEN_LDAP_HOST" ]; then
|
||||||
then
|
|
||||||
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.Bool }}')
|
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.Bool }}')
|
||||||
|
|
||||||
if [ -z "$VAULTWARDEN_LDAP_PORT" ]
|
if [ -z "$VAULTWARDEN_LDAP_PORT" ]; then
|
||||||
then
|
|
||||||
[ "$WAITFOR_LDAP_SSL" = true ] && VAULTWARDEN_LDAP_PORT=636 || VAULTWARDEN_LDAP_PORT=389
|
[ "$WAITFOR_LDAP_SSL" = true ] && VAULTWARDEN_LDAP_PORT=636 || VAULTWARDEN_LDAP_PORT=389
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Wait for ldap server on '%s:%s'...\n" "${VAULTWARDEN_LDAP_HOST}" "${VAULTWARDEN_LDAP_PORT}"
|
log_info "Wait for LDAP server on '${VAULTWARDEN_LDAP_HOST}:${VAULTWARDEN_LDAP_PORT}'"
|
||||||
/usr/local/bin/wait-for "${VAULTWARDEN_LDAP_HOST}":"${VAULTWARDEN_LDAP_PORT}"
|
/usr/local/bin/wait-for "${VAULTWARDEN_LDAP_HOST}":"${VAULTWARDEN_LDAP_PORT}"
|
||||||
|
|
||||||
# TODO: add delay to minimize connection errors
|
# TODO: add delay to minimize connection errors
|
||||||
|
|
Reference in New Issue