Compare commits

...

13 Commits

Author SHA1 Message Date
Robert Kaussow 9aa96cc5f1 feat: add container library (#38)
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Reviewed-on: docker/vaultwarden-ldap#38
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
2021-10-10 15:25:53 +02:00
Renovator Bot 41f484661a chore(docker): update thegeeklab/alpine:latest docker digest to 4361bc7
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-10-09 20:37:22 +00:00
Renovator Bot 139adc8927 chore(docker): update thegeeklab/alpine:latest docker digest to 46ee7e2
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-25 00:02:22 +00:00
Renovator Bot 59942ee789 chore(docker): update thegeeklab/alpine:latest docker digest to 7ab3a1d
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-22 10:02:18 +00:00
Robert Kaussow 8b2944a068
improve changelog template
continuous-integration/drone/push Build is passing Details
2021-09-22 11:45:42 +02:00
Renovator Bot 2d411f28e0 chore(docker): update thegeeklab/alpine:latest docker digest to 95d772b
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-22 08:02:20 +00:00
Robert Kaussow efadb76ce4
improve drone-matrix template
continuous-integration/drone/push Build is passing Details
2021-09-22 09:22:40 +02:00
Renovator Bot d7437dad77 chore(docker): update thegeeklab/alpine:latest docker digest to 9567c60
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-19 20:02:39 +00:00
Robert Kaussow 97ae0b89a0
ci: switch to drone-matrix plugin
continuous-integration/drone/push Build is passing Details
2021-09-19 21:48:26 +02:00
Renovator Bot 4d4c2a94e2 chore(docker): update thegeeklab/alpine:latest docker digest to 7cc5b84
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-27 22:02:17 +00:00
Renovator Bot b49a2f8111 chore(docker): update thegeeklab/alpine:latest docker digest to 2b60511
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-27 20:02:16 +00:00
Renovator Bot 85763a00bc chore(docker): update thegeeklab/alpine:latest docker digest to 3da2629
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-24 14:09:06 +00:00
Renovator Bot a602cf1dea chore(deps): update thegeeklab/alpine:latest docker digest
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-07-31 21:48:12 +00:00
4 changed files with 166 additions and 171 deletions

View File

@ -6,13 +6,9 @@
{{ range .CommitGroups -}}
### {{ .Title }}
{{ $subjects := list }}
{{ range .Commits -}}
{{ if not (has .Subject $subjects) -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ $subjects = append $subjects .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") | trim }}
{{ end }}
{{- end }}
{{- end -}}
{{- if .NoteGroups -}}

View File

@ -7,16 +7,16 @@ platform:
arch: amd64
steps:
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md'
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md'
trigger:
ref:
- refs/heads/main
- refs/pull/**
- refs/tags/**
- refs/heads/main
- refs/pull/**
- refs/tags/**
---
kind: pipeline
@ -27,116 +27,116 @@ platform:
arch: amd64
steps:
- name: binary
image: clux/muslrust:nightly-2021-04-14
commands:
- make build
environment:
BUILD_VERSION: ${DRONE_TAG%-*}
- name: binary
image: clux/muslrust:nightly-2021-04-14
commands:
- make build
environment:
BUILD_VERSION: ${DRONE_TAG%-*}
- name: dryrun
image: thegeeklab/drone-docker-buildx:20
settings:
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- binary
- name: dryrun
image: thegeeklab/drone-docker-buildx:20
settings:
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- binary
- 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/main
- refs/tags/**
depends_on:
- dryrun
- 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/main
- refs/tags/**
depends_on:
- dryrun
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on:
- tags
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on:
- tags
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
depends_on:
- changelog-generate
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
depends_on:
- changelog-generate
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20
settings:
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20
settings:
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-quay
image: thegeeklab/drone-docker-buildx:20
settings:
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/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-quay
image: thegeeklab/drone-docker-buildx:20
settings:
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/main
- refs/tags/**
depends_on:
- changelog-format
- 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
- 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/main
- refs/pull/**
- refs/tags/**
- refs/heads/main
- refs/pull/**
- refs/tags/**
depends_on:
- test
- test
---
kind: pipeline
@ -147,63 +147,63 @@ platform:
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 the Vaultwarden LDAP connector
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- 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 the Vaultwarden LDAP connector
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: 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
- name: matrix
image: thegeeklab/drone-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 }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/heads/main
- refs/tags/**
status:
- success
- failure
- success
- failure
depends_on:
- build-container
- build-container
---
kind: signature
hmac: b03e655c89137813302453a422df07b0d905cbd6cdfe9d0719cf45e167f7ea75
hmac: f23406441a2cf3872a1990a14e60a888b375ef31f75ea455fe4d2aa5dfe850be
...

View File

@ -1,4 +1,4 @@
FROM thegeeklab/alpine:latest@sha256:3de659c1a479d9d80e9c3924227981450af3a068087545a47360cfc2e70a91cc
FROM thegeeklab/alpine:latest@sha256:4361bc72c04bea35bb620d3641e73d7794246fac35b94e12049ba166d171d5bd
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"

View File

@ -1,40 +1,39 @@
#!/usr/bin/env sh
# shellcheck disable=SC3040
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
if [ -z "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ] || [ -z "$VAULTWARDEN_LDAP_HOST" ]
then
printf "Error: Vaultwarden and/or LDAP server not configured. Exiting ...\n"
if [ -z "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ] || [ -z "$VAULTWARDEN_LDAP_HOST" ]; then
log_error "Error: Vaultwarden and/or LDAP server not configured, exiting"
exit 1
fi
if [ -n "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ]
then
if [ -n "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ]; then
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_PORT=$(/usr/local/bin/url-parser port --url "$VAULTWARDEN_LDAP_VAULTWARDEN_URL")
if [ -z "$WAITFOR_BW_PORT" ]
then
if [ -z "$WAITFOR_BW_PORT" ]; then
[ "$WAITFOR_BW_SCHEME" = "https" ] && WAITFOR_BW_PORT=433 || WAITFOR_BW_PORT=80
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}"
fi
if [ -n "$VAULTWARDEN_LDAP_HOST" ]
then
if [ -n "$VAULTWARDEN_LDAP_HOST" ]; then
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.Bool }}')
if [ -z "$VAULTWARDEN_LDAP_PORT" ]
then
if [ -z "$VAULTWARDEN_LDAP_PORT" ]; then
[ "$WAITFOR_LDAP_SSL" = true ] && VAULTWARDEN_LDAP_PORT=636 || VAULTWARDEN_LDAP_PORT=389
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}"
# TODO: add delay to minimize connection errors