1
0

Compare commits

..

5 Commits

Author SHA1 Message Date
0fe71a0fe7 bump version
Some checks failed
ci/woodpecker/push/build Pipeline failed
2025-07-17 13:16:40 +03:00
0cd9c05a6e go: 1.24 2025-07-17 13:16:40 +03:00
1061c392d9 bump instruments 2025-07-17 13:16:40 +03:00
3527e35649 remove references to personal image registry
it's gone for a while
2025-07-17 13:16:39 +03:00
4091bba6b5 bump copyright years 2025-07-17 13:16:39 +03:00
17 changed files with 55 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
unset GOAMD64 GOARM GOPPC64 GOMIPS GOMIPS64

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
## shifty-nifty shell goodies :)

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
## setup image registry authentication

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
. .ci/envsh.registry

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv

View File

@@ -1,17 +1,18 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv
: "${IMAGE_NAME:?}" "${EXT_IMAGE_NAME:?}"
: "${IMAGE_NAME:?}"
[ -n "${EXTRA_TAGS}" ] || exit 0
. .ci/envsh.common
. .ci/envsh.registry
image_src="docker://${IMAGE_NAME}"
image_dst="docker://${EXT_IMAGE_NAME}"
oci_dir="${PWD}/oci-layers"
image_interim="oci:${oci_dir}:$(basename "${IMAGE_NAME}"):${IMAGE_TAG}"
@@ -33,20 +34,12 @@ while : ; do
img_copy "${image_src}:${IMAGE_TAG}" "${image_interim}" || r=$?
[ "$r" = 0 ] || break
echo " -> ${image_dst}:${IMAGE_TAG}"
img_copy "${image_interim}" "${image_dst}:${IMAGE_TAG}" || r=$?
[ "$r" = 0 ] || break
for tag in ${EXTRA_TAGS} ; do
[ -n "${tag}" ] || continue
echo " -> ${image_src}:${tag}"
img_copy "${image_interim}" "${image_src}:${tag}" || r=$?
[ "$r" = 0 ] || break
echo " -> ${image_dst}:${tag}"
img_copy "${image_interim}" "${image_dst}:${tag}" || r=$?
[ "$r" = 0 ] || break
done
break

View File

@@ -1,16 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
set -ef
[ -z "${CI_DEBUG}" ] || set -xv
: "${IMAGE_NAME:?}" "${EXT_IMAGE_NAME:?}" "${LATEST_TAG:?}"
: "${IMAGE_NAME:?}" "${LATEST_TAG:?}"
. .ci/envsh.registry
image_src="docker://${IMAGE_NAME}"
image_dst="docker://${EXT_IMAGE_NAME}"
oci_dir="${PWD}/oci-layers"
image_interim="oci:${oci_dir}:$(basename "${IMAGE_NAME}"):${LATEST_TAG}"
@@ -36,10 +35,6 @@ while : ; do
img_copy "${image_interim}" "${image_src}:latest" || r=$?
[ "$r" = 0 ] || break
echo " -> ${image_dst}:latest"
img_copy "${image_interim}" "${image_dst}:latest" || r=$?
[ "$r" = 0 ] || break
break
done

View File

@@ -3,12 +3,11 @@ when:
evaluate: 'LATEST_TAG == ""'
variables:
- &image_name 'quay.krd.sh/krd/rngpotd'
- &ext_image_name 'docker.io/rockdrilla/rngpotd'
- &buildah_image 'quay.krd.sh/quay_io/containers/buildah:v1.37.3'
- &skopeo_image 'quay.krd.sh/quay_io/containers/skopeo:v1.16.1'
- &go_image 'quay.krd.sh/golang:1.23.2-bookworm'
- &base_image 'quay.krd.sh/gcr_io/distroless/static-debian12:nonroot'
- &image_name 'docker.io/rockdrilla/rngpotd'
- &buildah_image 'quay.io/containers/buildah:v1.40.1'
- &skopeo_image 'quay.io/containers/skopeo:v1.19.0'
- &go_image 'docker.io/library/golang:1.24.5-bookworm'
- &base_image 'gcr.io/distroless/static-debian12:nonroot'
## value list depends on base image
## ref: https://github.com/GoogleContainerTools/distroless#debian-12
- &target_platforms 'linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x'
@@ -23,16 +22,15 @@ steps:
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
secrets: [ REGISTRY_AUTH ]
##
REGISTRY_AUTH:
from_secret: REGISTRY_AUTH
commands:
- .ci/registry-login.sh quay.krd.sh docker.io
- .ci/registry-login.sh docker.io
- name: build-all
image: *go_image
environment:
GOPROXY: "${GOPROXY},direct"
GOSUMDB: "${GOSUMDB}"
GOPRIVATE: "${GOPRIVATE}"
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
##
@@ -62,7 +60,6 @@ steps:
MALLOC_ARENA_MAX: "4"
##
IMAGE_NAME: *image_name
EXT_IMAGE_NAME: *ext_image_name
commands:
- .ci/sync-all.sh

View File

@@ -3,9 +3,8 @@ when:
evaluate: 'LATEST_TAG != ""'
variables:
- &image_name 'quay.krd.sh/krd/rngpotd'
- &ext_image_name 'docker.io/rockdrilla/rngpotd'
- &skopeo_image 'quay.krd.sh/quay_io/containers/skopeo:v1.16.1'
- &image_name 'docker.io/rockdrilla/rngpotd'
- &skopeo_image 'quay.io/containers/skopeo:v1.19.0'
## NB: ${variable} expressions are subject to pre-processing.
## ref: https://woodpecker-ci.org/docs/usage/environment
@@ -17,9 +16,11 @@ steps:
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
secrets: [ REGISTRY_AUTH ]
##
REGISTRY_AUTH:
from_secret: REGISTRY_AUTH
commands:
- .ci/registry-login.sh quay.krd.sh docker.io
- .ci/registry-login.sh docker.io
- name: image-sync-latest
image: *skopeo_image
@@ -28,7 +29,6 @@ steps:
MALLOC_ARENA_MAX: "4"
##
IMAGE_NAME: *image_name
EXT_IMAGE_NAME: *ext_image_name
commands:
- .ci/sync-latest.sh

View File

@@ -1,4 +1,4 @@
ARG GO_IMAGE=docker.io/library/golang:1.23.2-bookworm
ARG GO_IMAGE=docker.io/library/golang:1.24.5-bookworm
ARG BASE_IMAGE=gcr.io/distroless/static-debian12:nonroot
## ---
@@ -19,7 +19,7 @@ COPY . .
ENV GOMAXPROCS=4 \
MALLOC_ARENA_MAX=4
RUN go env | grep -F -e GOPROXY -e GOSUMDB ; \
RUN go env | grep -F -e GOPROXY -e GOSUMDB -e GOPRIVATE ; \
make OUTDIR=/go/bin ; \
make ci-clean

View File

@@ -1,6 +1,6 @@
#!/usr/bin/make -f
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
# (c) 2024-2025, Konstantin Demin
SHELL :=/bin/sh
.SHELLFLAGS :=-ec

15
go.mod
View File

@@ -1,19 +1,18 @@
module git.krd.sh/krd/rngpotd
go 1.23
go 1.24
require github.com/gofiber/fiber/v2 v2.52.5
require github.com/gofiber/fiber/v2 v2.52.8
require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.56.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/sys v0.25.0 // indirect
github.com/valyala/fasthttp v1.64.0 // indirect
golang.org/x/sys v0.34.0 // indirect
)

30
go.sum
View File

@@ -1,14 +1,13 @@
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo=
github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/gofiber/fiber/v2 v2.52.8 h1:xl4jJQ0BV5EJTA2aWiKw/VddRpHrKeZLF0QPUxqn0x4=
github.com/gofiber/fiber/v2 v2.52.8/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0=
github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
@@ -18,11 +17,10 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.56.0 h1:bEZdJev/6LCBlpdORfrLu/WOZXXxvrUQSiyniuaoW8U=
github.com/valyala/fasthttp v1.56.0/go.mod h1:sReBt3XZVnudxuLOx4J/fMrJVorWRiWY2koQKgABiVI=
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
github.com/valyala/fasthttp v1.64.0 h1:QBygLLQmiAyiXuRhthf0tuRkqAFcrC42dckN2S+N3og=
github.com/valyala/fasthttp v1.64.0/go.mod h1:dGmFxwkWXSK0NbOSJuF7AMVzU+lkHz0wQVvVITv2UQA=
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=

View File

@@ -8,9 +8,9 @@ import (
const (
appName = "rngpotd"
appVersion = "0.0.3"
appVersion = "0.0.4"
userAgent = appName + "/" + appVersion
serverAgent = "nginx/1.27.2"
serverAgent = "nginx/1.29.0"
minimumGoMaxProcs = 4
maximumGoMaxProcs = 8