Compare commits

...

66 Commits
v0.2.0 ... main

Author SHA1 Message Date
renovate[bot] e712a9f6af
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v4 (#69)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-27 08:42:50 +01:00
renovate[bot] 8b75d58e61 chore(docker): update alpine:3.19 docker digest to c5b1261 2024-01-28 08:35:58 +00:00
renovate[bot] a1fdbd35d2
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v3 (#67)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 12:37:31 +01:00
Robert Kaussow 3a5cd76960
remove unnecessary git fetch command from ci 2024-01-04 21:54:49 +01:00
renovate[bot] 70370f7407
chore(deps): update alpine docker tag to v3.19 (#66)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 08:37:12 +01:00
Robert Kaussow e4d973ef81
ci: use git-sv to generate changelog (#65) 2023-12-07 11:38:36 +01:00
renovate[bot] bf941589d8
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v2 (#64)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 08:39:35 +01:00
renovate[bot] 2f0f46d725 chore(docker): update alpine:3.18 docker digest to 34871e7 2023-12-01 23:39:06 +00:00
renovate[bot] dbfeb75f8f
chore(docker): update alpine:3.18 docker digest to eece025 (#62)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-04 22:38:00 +01:00
Robert Kaussow 4d5fbcb449
fix github required status checks 2023-11-04 22:35:20 +01:00
renovate[bot] 22f01fba8b
chore(docker): update alpine:3.18 docker digest to 7144f7b (#61)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-22 09:39:11 +02:00
Robert Kaussow e4cd9b9bda
fix pipeline deps 2023-08-22 09:36:08 +02:00
Robert Kaussow bbabed7ceb
fix spellcheck 2023-08-22 09:34:19 +02:00
Robert Kaussow 8ee5cd001d
fix pipeline deps 2023-08-22 09:31:46 +02:00
Robert Kaussow 6b19718e32
unify ci config 2023-08-22 09:25:21 +02:00
Robert Kaussow 2195b48f64
fix gh settings name 2023-08-22 09:10:09 +02:00
Robert Kaussow 9b1ca89664
fix containerfile name 2023-08-22 09:09:07 +02:00
Robert Kaussow d10ad6d8de
ci: migrate to woodpecker 2023-08-22 09:07:13 +02:00
renovate[bot] 08ca642858 chore(docker): update alpine:3.18 docker digest to 7144f7b 2023-08-08 00:02:59 +00:00
renovate[bot] 3b55d2b615 chore(docker): update alpine:3.18 docker digest to 82d1e9d 2023-06-15 10:43:45 +00:00
renovate[bot] e569aa1272 chore(docker): update alpine:3.18 docker digest to ac03b2a 2023-06-15 05:17:51 +00:00
renovate[bot] 7811ed7497
chore(deps): update alpine docker tag to v3.18 (#57)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 15:27:53 +02:00
Robert Kaussow 768d713216
fix bare url in contribution file 2023-05-03 08:56:30 +02:00
renovate[bot] a53c1f4b63 chore(docker): update alpine:3.17 docker digest to 124c7d2 2023-03-30 00:06:58 +00:00
renovate[bot] 8a75871fab chore(docker): update alpine:3.17 docker digest to ff6bdca 2023-03-13 23:40:58 +00:00
Robert Kaussow 8cc47a9e2a
fix: fix requirements check (#54) 2023-03-02 14:04:24 +01:00
Robert Kaussow 39a235a9e0
fix: fix syntax while using bash fallbacks (#53) 2023-03-02 13:40:42 +01:00
Robert Kaussow 847108a7c9
add netcat fallback information to readme (#52) 2023-03-02 12:54:38 +01:00
Robert Kaussow 3cd05d4e3f
feat: add fallback to /dev/tcp on bash if netcat not found (#51) 2023-03-02 12:50:14 +01:00
renovate[bot] 3774a8541a chore(docker): update alpine:3.17 docker digest to 69665d0 2023-02-11 12:51:51 +00:00
renovate[bot] bb872933b3 chore(docker): update alpine:3.17 docker digest to c8deccd 2023-02-11 02:54:33 +00:00
Robert Kaussow 2a845277db
ci: bump container build plugin to drone-docker-buildx:23 (#48) 2023-02-09 19:39:54 +01:00
Robert Kaussow 1676a004d0
sign drone config 2023-02-08 21:38:26 +01:00
Robert Kaussow 6b7c59c515
fix drone-matrix template 2023-02-08 21:33:49 +01:00
Robert Kaussow 2fc8b95346
refactor: use buildx for multiarch container builds (#47) 2023-01-14 23:49:11 +01:00
renovate[bot] 672c82442b chore(docker): update docker digests 2023-01-10 00:29:39 +00:00
Robert Kaussow f4a954f3c2
chore: remove support for arm32 (#46)
BREAKING CHANGE: We dropped the arm32 platform support and builds.
2023-01-09 20:57:05 +01:00
renovate[bot] 86f9f9d42e
chore(deps): update alpine docker tag to v3.17 (#42) 2022-11-23 11:07:03 +01:00
renovate[bot] 4480818e00
chore(deps): update arm32v7/alpine docker tag to v3.17 (#43) 2022-11-23 11:06:55 +01:00
renovate[bot] c7e91d808e
chore(deps): update arm64v8/alpine docker tag to v3.17 (#44) 2022-11-23 11:06:42 +01:00
renovate[bot] 3759fab112 chore(docker): update docker digests 2022-11-23 08:46:06 +00:00
renovate[bot] 1e953050d2 chore(docker): update docker digests to bc41182 2022-08-09 23:46:34 +00:00
Robert Kaussow 217ef44582
[skip ci] adjust repo config 2022-07-21 09:54:30 +02:00
renovate[bot] 0e71669e19 chore(docker): update docker digests to 7580ece 2022-07-19 01:01:20 +00:00
Robert Kaussow 2aff7ba92c
chore: adjust script formatting 2022-07-15 09:02:45 +02:00
Robert Kaussow d86854cde4
docs: fix spelling in readme 2022-07-15 09:02:17 +02:00
renovate[bot] 1c29418e76
chore(deps): update dependency alpine to v3.16 (#36) 2022-05-24 08:54:40 +02:00
renovate[bot] 65b88c6f2e
chore(deps): update dependency arm32v7/alpine to v3.16 (#37) 2022-05-24 08:54:34 +02:00
renovate[bot] 1aefe678a6
chore(deps): update dependency arm64v8/alpine to v3.16 (#38) 2022-05-24 08:54:27 +02:00
Renovate Bot 8286a297fc chore(docker): update docker digests to 4edbd2b 2022-04-05 03:22:46 +00:00
Renovate Bot 7c84118cb2 chore(docker): update docker digests to f22945d 2022-03-29 10:54:30 +00:00
Renovate Bot 67ec2f14d9 chore(docker): update docker digests to ceeae28 2022-03-27 10:34:03 +00:00
Robert Kaussow 7c1abfc165
chore: end of the year maintenance 2021-12-21 10:29:15 +01:00
renovate[bot] 53fedfcfa8
chore(docker): update docker digests (#32)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-12 14:34:26 +01:00
renovate[bot] fb6377959f
chore(deps): update alpine docker tag to v3.15 (#28) 2021-12-12 14:03:08 +01:00
renovate[bot] 3a7af11987
chore(deps): update arm64v8/alpine docker tag to v3.15 (#29) 2021-12-12 14:03:00 +01:00
renovate[bot] cb0743ba85
chore(deps): update arm32v7/alpine docker tag to v3.15 (#30) 2021-12-12 14:02:54 +01:00
Robert Kaussow 0ef8d50723
chore: adjust changelog template to link to prs instead of issues (#31) 2021-12-12 14:02:42 +01:00
Robert Kaussow 064696b222
improve changelog template 2021-09-22 11:52:03 +02:00
Robert Kaussow b68e5cc674
improve drone-matrix template 2021-09-22 09:38:28 +02:00
Robert Kaussow e829496461
switch to drone-matrix 2021-09-19 21:32:11 +02:00
Robert Kaussow ed2bca16d9
regenerate drone config 2021-09-13 10:55:36 +02:00
Renovate Bot 25ff8498e5 chore(docker): update docker digests 2021-08-27 21:56:13 +00:00
Renovate Bot 4aaf084431 chore(deps): update alpine:3.14 docker digest 2021-08-06 22:53:23 +00:00
Renovate Bot 82cf8ff037 chore(deps): update docker digests 2021-08-06 20:13:34 +00:00
Renovate Bot 724fd5b8d1 chore(deps): update arm32v7/alpine:3.14 docker digest 2021-07-30 19:43:56 +00:00
23 changed files with 319 additions and 783 deletions

View File

@ -1,27 +0,0 @@
# Changelog
{{ range .Versions -}}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ range .CommitGroups -}}
### {{ .Title }}
{{ $subjects := list }}
{{ range .Commits -}}
{{ if not (has .Subject $subjects) -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ $subjects = append $subjects .Subject -}}
{{ end }}
{{- end }}
{{- end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

View File

@ -1,25 +0,0 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/thegeeklab/wait-for
options:
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
chore: Others
test: Testing
ci: CI Pipeline
docs: Documentation
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE

3
.dictionary Normal file
View File

@ -0,0 +1,3 @@
Netcat
synchronizer
eficode

View File

@ -1,248 +0,0 @@
local PipelineTest = {
kind: 'pipeline',
name: 'test',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'lint',
image: 'koalaman/shellcheck-alpine:stable',
commands: [
'shellcheck ./wait-for',
],
},
{
name: 'test',
image: 'bats/bats',
commands: [
'bats ./wait-for.bats',
],
},
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildPackage = {
kind: 'pipeline',
name: 'build-package',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'checksum',
image: 'alpine',
commands: [
'sha256sum wait-for > sha256sum.txt',
],
},
{
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}',
],
},
{
name: 'changelog-format',
image: 'thegeeklab/alpine-tools',
commands: [
'prettier CHANGELOG.md',
'prettier -w CHANGELOG.md',
],
},
{
name: 'publish-github',
image: 'plugins/github-release',
settings: {
overwrite: true,
api_key: { from_secret: 'github_token' },
files: ['wait-for', 'sha256sum.txt'],
title: '${DRONE_TAG}',
note: 'CHANGELOG.md',
},
when: {
ref: ['refs/tags/**'],
},
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildContainer(arch='amd64') = {
kind: 'pipeline',
name: 'build-container-' + arch,
platform: {
os: 'linux',
arch: arch,
},
steps: [
{
name: 'dryrun',
image: 'thegeeklab/drone-docker:19',
settings: {
dry_run: true,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: ['refs/pull/**'],
},
},
{
name: 'publish-dockerhub',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
},
{
name: 'publish-quay',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
registry: 'quay.io',
repo: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineNotifications = {
kind: 'pipeline',
name: 'notifications',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
image: 'plugins/manifest',
name: 'manifest-dockerhub',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'docker/manifest.tmpl',
},
when: {
status: ['success'],
},
},
{
image: 'plugins/manifest',
name: 'manifest-quay',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
spec: 'docker/manifest-quay.tmpl',
},
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: 'Poor-mans docker service synchronizer',
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' },
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'],
},
},
],
depends_on: [
'build-container-amd64',
'build-container-arm',
'build-container-arm64',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**'],
status: ['success', 'failure'],
},
};
[
PipelineTest,
PipelineBuildPackage,
PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64'),
PipelineBuildContainer(arch='arm'),
PipelineNotifications,
]

View File

@ -1,369 +0,0 @@
---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
- name: lint
image: koalaman/shellcheck-alpine:stable
commands:
- shellcheck ./wait-for
- name: test
image: bats/bats
commands:
- bats ./wait-for.bats
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
kind: pipeline
name: build-package
platform:
os: linux
arch: amd64
steps:
- name: checksum
image: alpine
commands:
- sha256sum wait-for > sha256sum.txt
- 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}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
- name: publish-github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- wait-for
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-amd64
platform:
os: linux
arch: amd64
steps:
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.amd64
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
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/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm64
platform:
os: linux
arch: arm64
steps:
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm64
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
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/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm
platform:
os: linux
arch: arm
steps:
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
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/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: manifest-dockerhub
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
when:
status:
- success
- name: manifest-quay
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: quay_password
spec: docker/manifest-quay.tmpl
username:
from_secret: quay_username
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: Poor-mans docker service synchronizer
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/main
- refs/tags/**
status:
- success
- failure
depends_on:
- build-container-amd64
- build-container-arm
- build-container-arm64
---
kind: signature
hmac: 2bf0348e9246595526e80674f998395345ba82fb9cb71b1b46daa152c6464b4b
...

12
.github/settings.yml vendored
View File

@ -1,7 +1,7 @@
repository:
name: wait-for
description: Poor-mans docker service synchronizer
topics: cli, tools, docker
description: Poor-mans service synchronizer
topics: cli, tools, oci
private: false
has_issues: true
@ -50,6 +50,10 @@ branches:
required_status_checks:
strict: false
contexts:
- continuous-integration/drone/pr
enforce_admins: null
- ci/woodpecker/pr/test
- ci/woodpecker/pr/build-package
- ci/woodpecker/pr/build-container
- ci/woodpecker/pr/docs
enforce_admins: false
required_linear_history: true
restrictions: null

47
.gitsv/config.yml Normal file
View File

@ -0,0 +1,47 @@
---
version: "1.1"
versioning:
update-major: []
update-minor: [feat]
update-patch: [fix, perf, refactor, chore, test, ci, docs]
tag:
pattern: "v%d.%d.%d"
release-notes:
sections:
- name: Features
commit-types: [feat]
section-type: commits
- name: Bug Fixes
commit-types: [fix]
section-type: commits
- name: Performance Improvements
commit-types: [perf]
section-type: commits
- name: Code Refactoring
commit-types: [refactor]
section-type: commits
- name: Others
commit-types: [chore]
section-type: commits
- name: Testing
commit-types: [test]
section-type: commits
- name: CI Pipeline
commit-types: [ci]
section-type: commits
- name: Documentation
commit-types: [docs]
section-type: commits
- name: Breaking Changes
section-type: breaking-changes
commit-message:
footer:
issue:
key: issue
add-value-prefix: "#"
issue:
regex: "#?[0-9]+"

6
.markdownlint.yml Normal file
View File

@ -0,0 +1,6 @@
---
default: True
MD013: False
MD041: False
MD004:
style: dash

View File

@ -1,2 +1,2 @@
.drone.yml
*.tpl.md
LICENSE

View File

@ -0,0 +1,72 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
dryrun:
image: quay.io/thegeeklab/wp-docker-buildx:4
settings:
containerfile: Containerfile.multiarch
dry_run: true
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
- linux/arm/v6
provenance: false
repo: thegeeklab/${CI_REPO_NAME}
when:
- event: [pull_request]
publish-dockerhub:
group: build
image: quay.io/thegeeklab/wp-docker-buildx:4
settings:
auto_tag: true
containerfile: Containerfile.multiarch
password:
from_secret: docker_password
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
- linux/arm/v6
provenance: false
repo: thegeeklab/${CI_REPO_NAME}
username:
from_secret: docker_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
publish-quay:
group: build
image: quay.io/thegeeklab/wp-docker-buildx:4
settings:
auto_tag: true
containerfile: Containerfile.multiarch
password:
from_secret: quay_password
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
- linux/arm/v6
provenance: false
registry: quay.io
repo: quay.io/thegeeklab/${CI_REPO_NAME}
username:
from_secret: quay_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
depends_on:
- test

View File

@ -0,0 +1,36 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
checksum:
image: quay.io/thegeeklab/alpine-tools
commands:
- sha256sum wait-for > sha256sum.txt
changelog:
image: quay.io/thegeeklab/git-sv
commands:
- git sv current-version
- git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
- cat CHANGELOG.md
publish-github:
image: docker.io/plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- wait-for
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${CI_COMMIT_TAG}
when:
- event: [tag]
depends_on:
- test

55
.woodpecker/docs.yml Normal file
View File

@ -0,0 +1,55 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
markdownlint:
image: quay.io/thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md' 'CONTRIBUTING.md'
spellcheck:
image: quay.io/thegeeklab/alpine-tools
commands:
- spellchecker --files 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls
environment:
FORCE_COLOR: "true"
NPM_CONFIG_LOGLEVEL: "error"
pushrm-dockerhub:
image: docker.io/chko/docker-pushrm:1
secrets:
- source: docker_password
target: DOCKER_PASS
- source: docker_username
target: DOCKER_USER
environment:
PUSHRM_FILE: README.md
PUSHRM_SHORT: Poor-mans service synchronizer
PUSHRM_TARGET: ${CI_REPO}
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
status: [success]
pushrm-quay:
image: docker.io/chko/docker-pushrm:1
secrets:
- source: quay_token
target: APIKEY__QUAY_IO
environment:
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/${CI_REPO}
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
status: [success]
depends_on:
- build-package
- build-container

26
.woodpecker/notify.yml Normal file
View File

@ -0,0 +1,26 @@
---
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
runs_on: [success, failure]
steps:
matrix:
image: quay.io/thegeeklab/wp-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
when:
- status: [success, failure]
depends_on:
- docs

25
.woodpecker/test.yml Normal file
View File

@ -0,0 +1,25 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
lint:
group: test
image: docker.io/koalaman/shellcheck-alpine:stable
commands:
- shellcheck ./wait-for
test-ncat:
group: test
image: docker.io/bats/bats
commands:
- bats ./wait-for.bats
test-bash:
image: docker.io/bats/bats
commands:
- rm -rf /usr/bin/nc
- bats ./wait-for.bats

View File

@ -3,7 +3,7 @@
## Security
If you think you have found a **security issue**, please do not mention it in this repository.
Instead, send an email to security@thegeeklab.de with as many details as possible so it can be handled confidential.
Instead, send an email to `security@thegeeklab.de` with as many details as possible so it can be handled confidential.
## Bug Reports and Feature Requests

View File

@ -1,4 +1,4 @@
FROM amd64/alpine:3.14@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d
FROM alpine:3.19@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021 Robert Kaussow <mail@geeklabor.de>
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,15 +1,15 @@
# wait-for
Poor-mans docker service synchronizer
Poor-mans service synchronizer
[![Build Status](https://img.shields.io/drone/build/thegeeklab/wait-for?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/wait-for)
[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/wait-for/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/wait-for)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/wait-for)
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/wait-for)
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/wait-for)](https://github.com/thegeeklab/wait-for/graphs/contributors)
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/wait-for)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/wait-for)](https://github.com/thegeeklab/wait-for/blob/main/LICENSE)
wait-for is a script designed to synchronize services like docker containers. It is [sh](https://en.wikipedia.org/wiki/Bourne_shell) and [alpine](https://alpinelinux.org/) compatible and was forked from [eficode/wait-for](https://github.com/eficode/wait-for).
wait-for is a script designed to synchronize services like containers. It is [sh](https://en.wikipedia.org/wiki/Bourne_shell) and [alpine](https://alpinelinux.org/) compatible and was forked from [eficode/wait-for](https://github.com/eficode/wait-for).
When using this tool, you only need to pick the `wait-for` file as part of your project.
@ -19,7 +19,7 @@ When using this tool, you only need to pick the `wait-for` file as part of your
$ wait-for --help
usage: wait-for host:port [-t timeout] [-- command args]
Synchronize services like docker containers and wait for readiness.
Synchronize services like containers and wait for readiness.
optional arguments:
-q | --quiet Do not output any status messages
@ -29,7 +29,7 @@ optional arguments:
## Dependencies
- Installed Netcat
- Installed Netcat or Bash (to use `/dev/tcp`)
## Examples
@ -59,8 +59,7 @@ services:
## Contributors
Special thanks goes to all [contributors](https://github.com/thegeeklab/wait-for/graphs/contributors). If you would like to contribute,
please see the [instructions](https://github.com/thegeeklab/wait-for/blob/main/CONTRIBUTING.md).
Special thanks to all [contributors](https://github.com/thegeeklab/wait-for/graphs/contributors). If you would like to contribute, please see the [instructions](https://github.com/thegeeklab/wait-for/blob/main/CONTRIBUTING.md).
## License

View File

@ -1,16 +0,0 @@
FROM arm32v7/alpine:3.14@sha256:8d99168167baa6a6a0d7851b9684625df9c1455116a9601835c2127df2aaa2f5
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="wait-for"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/wait-for"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/wait-for"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/wait-for"
ADD wait-for /usr/local/bin/wait-for
RUN apk --no-cache add netcat-openbsd
USER root
CMD []
ENTRYPOINT ["/usr/local/bin/wait-for"]

View File

@ -1,16 +0,0 @@
FROM arm64v8/alpine:3.14@sha256:53b74ddfc6225e3c8cc84d7985d0f34666e4e8b0b6892a9b2ad1f7516bc21b54
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="wait-for"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/wait-for"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/wait-for"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/wait-for"
ADD wait-for /usr/local/bin/wait-for
RUN apk --no-cache add netcat-openbsd
USER root
CMD []
ENTRYPOINT ["/usr/local/bin/wait-for"]

View File

@ -1,24 +0,0 @@
image: quay.io/thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: quay.io/thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: quay.io/thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: quay.io/thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

View File

@ -1,24 +0,0 @@
image: thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: thegeeklab/wait-for:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

View File

@ -9,10 +9,10 @@ echoerr() {
usage() {
exitcode="$1"
cat << USAGE >&2
cat <<USAGE >&2
usage: wait-for host:port [-t timeout] [-- command args]
Synchronize services like docker containers and wait for readiness.
Synchronize services like containers and wait for readiness.
optional arguments:
-q | --quiet Do not output any status messages
@ -23,12 +23,17 @@ USAGE
}
wait_for() {
for _ in $(seq "$WAITFOR_TIMEOUT") ; do
nc -w 1 -z "$WAITFOR_HOST" "$WAITFOR_PORT" > /dev/null 2>&1
for _ in $(seq "$WAITFOR_TIMEOUT"); do
if [ "$HAS_NC" = 1 ]; then
nc -w 1 -z "$WAITFOR_HOST" "$WAITFOR_PORT" >/dev/null 2>&1
elif [ "$HAS_BASH" = 1 ]; then
# shellcheck disable=SC3025
bash -c "</dev/tcp/$WAITFOR_HOST/$WAITFOR_PORT" >/dev/null 2>&1
fi
result=$?
if [ $result -eq 0 ] ; then
if [ $# -gt 0 ] ; then
if [ $result -eq 0 ]; then
if [ $# -gt 0 ]; then
exec "$@"
fi
exit 0
@ -39,43 +44,50 @@ wait_for() {
exit 1
}
while [ $# -gt 0 ]
do
while [ $# -gt 0 ]; do
case "$1" in
*:* )
WAITFOR_HOST=$(printf "%s\n" "$1"| cut -d : -f 1)
WAITFOR_PORT=$(printf "%s\n" "$1"| cut -d : -f 2)
*:*)
WAITFOR_HOST=$(printf "%s\n" "$1" | cut -d : -f 1)
WAITFOR_PORT=$(printf "%s\n" "$1" | cut -d : -f 2)
shift 1
;;
-q | --quiet)
-q | --quiet)
WAITFOR_QUIET=1
shift 1
;;
-t)
-t)
WAITFOR_TIMEOUT="$2"
if [ "$WAITFOR_TIMEOUT" = "" ]; then break; fi
shift 2
;;
--timeout=*)
--timeout=*)
WAITFOR_TIMEOUT="${1#*=}"
shift 1
;;
--)
--)
shift
break
;;
--help)
--help)
usage 0
;;
*)
*)
echoerr "unknown argument: $1"
usage 1
;;
esac
done
if ! [ -x "$(command -v nc)" ]; then
echoerr "error: netcat is required for wait-for to run"
if [ -x "$(command -v nc)" ]; then
HAS_NC=1
fi
if [ -x "$(command -v bash)" ]; then
HAS_BASH=1
fi
if [ "$HAS_NC" != 1 ] && [ "$HAS_BASH" != 1 ]; then
echoerr "error: netcat or bash is required for wait-for to run"
exit 1
fi