Skip to content

Commit 6b17459

Browse files
authored
Merge branch 'master' into patch-1
2 parents 3ffa4aa + 9c5ae4f commit 6b17459

12 files changed

Lines changed: 269 additions & 259 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ RUN \
114114
certbot-dns-google \
115115
certbot-dns-he \
116116
certbot-dns-hetzner \
117+
certbot-dns-hetzner-cloud \
117118
certbot-dns-infomaniak \
118119
certbot-dns-inwx \
119120
certbot-dns-ionos \

Dockerfile.aarch64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ RUN \
114114
certbot-dns-google \
115115
certbot-dns-he \
116116
certbot-dns-hetzner \
117+
certbot-dns-hetzner-cloud \
117118
certbot-dns-infomaniak \
118119
certbot-dns-inwx \
119120
certbot-dns-ionos \

Jenkinsfile

Lines changed: 86 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pipeline {
7676
'''
7777
script{
7878
env.EXIT_STATUS = ''
79+
env.CI_TEST_ATTEMPTED = ''
7980
env.LS_RELEASE = sh(
8081
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
8182
returnStdout: true).trim()
@@ -283,7 +284,7 @@ pipeline {
283284
-v ${WORKSPACE}:/mnt \
284285
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
285286
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
286-
ghcr.io/linuxserver/baseimage-alpine:3 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
287+
ghcr.io/linuxserver/baseimage-alpine:3.23 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
287288
apk add --no-cache python3 && \
288289
python3 -m venv /lsiopy && \
289290
pip install --no-cache-dir -U pip && \
@@ -871,6 +872,7 @@ pipeline {
871872
script{
872873
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
873874
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
875+
env.CI_TEST_ATTEMPTED = 'true'
874876
}
875877
sh '''#! /bin/bash
876878
set -e
@@ -1073,98 +1075,13 @@ EOF
10731075
) '''
10741076
}
10751077
}
1076-
// If this is a Pull request send the CI link as a comment on it
1077-
stage('Pull Request Comment') {
1078-
when {
1079-
not {environment name: 'CHANGE_ID', value: ''}
1080-
environment name: 'EXIT_STATUS', value: ''
1081-
}
1082-
steps {
1083-
sh '''#! /bin/bash
1084-
# Function to retrieve JSON data from URL
1085-
get_json() {
1086-
local url="$1"
1087-
local response=$(curl -s "$url")
1088-
if [ $? -ne 0 ]; then
1089-
echo "Failed to retrieve JSON data from $url"
1090-
return 1
1091-
fi
1092-
local json=$(echo "$response" | jq .)
1093-
if [ $? -ne 0 ]; then
1094-
echo "Failed to parse JSON data from $url"
1095-
return 1
1096-
fi
1097-
echo "$json"
1098-
}
1099-
1100-
build_table() {
1101-
local data="$1"
1102-
1103-
# Get the keys in the JSON data
1104-
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1105-
1106-
# Check if keys are empty
1107-
if [ -z "$keys" ]; then
1108-
echo "JSON report data does not contain any keys or the report does not exist."
1109-
return 1
1110-
fi
1111-
1112-
# Build table header
1113-
local header="| Tag | Passed |\\n| --- | --- |\\n"
1114-
1115-
# Loop through the JSON data to build the table rows
1116-
local rows=""
1117-
for build in $keys; do
1118-
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1119-
if [ "$status" = "true" ]; then
1120-
status="✅"
1121-
else
1122-
status="❌"
1123-
fi
1124-
local row="| "$build" | "$status" |\\n"
1125-
rows="${rows}${row}"
1126-
done
1127-
1128-
local table="${header}${rows}"
1129-
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1130-
echo "$escaped_table"
1131-
}
1132-
1133-
if [[ "${CI}" = "true" ]]; then
1134-
# Retrieve JSON data from URL
1135-
data=$(get_json "$CI_JSON_URL")
1136-
# Create table from JSON data
1137-
table=$(build_table "$data")
1138-
echo -e "$table"
1139-
1140-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1141-
-H "Accept: application/vnd.github.v3+json" \
1142-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1143-
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1144-
else
1145-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1146-
-H "Accept: application/vnd.github.v3+json" \
1147-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1148-
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1149-
fi
1150-
'''
1151-
1152-
}
1153-
}
11541078
}
11551079
/* ######################
1156-
Send status to Discord
1080+
Comment on PR and Send status to Discord
11571081
###################### */
11581082
post {
11591083
always {
1160-
sh '''#!/bin/bash
1161-
rm -rf /config/.ssh/id_sign
1162-
rm -rf /config/.ssh/id_sign.pub
1163-
git config --global --unset gpg.format
1164-
git config --global --unset user.signingkey
1165-
git config --global --unset commit.gpgsign
1166-
'''
1167-
script{
1084+
script {
11681085
env.JOB_DATE = sh(
11691086
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
11701087
returnStdout: true).trim()
@@ -1207,6 +1124,87 @@ EOF
12071124
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
12081125
}
12091126
}
1127+
script {
1128+
if (env.GITHUBIMAGE =~ /lspipepr/){
1129+
if (env.CI_TEST_ATTEMPTED == "true"){
1130+
sh '''#! /bin/bash
1131+
# Function to retrieve JSON data from URL
1132+
get_json() {
1133+
local url="$1"
1134+
local response=$(curl -s "$url")
1135+
if [ $? -ne 0 ]; then
1136+
echo "Failed to retrieve JSON data from $url"
1137+
return 1
1138+
fi
1139+
local json=$(echo "$response" | jq .)
1140+
if [ $? -ne 0 ]; then
1141+
echo "Failed to parse JSON data from $url"
1142+
return 1
1143+
fi
1144+
echo "$json"
1145+
}
1146+
1147+
build_table() {
1148+
local data="$1"
1149+
1150+
# Get the keys in the JSON data
1151+
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1152+
1153+
# Check if keys are empty
1154+
if [ -z "$keys" ]; then
1155+
echo "JSON report data does not contain any keys or the report does not exist."
1156+
return 1
1157+
fi
1158+
1159+
# Build table header
1160+
local header="| Tag | Passed |\\n| --- | --- |\\n"
1161+
1162+
# Loop through the JSON data to build the table rows
1163+
local rows=""
1164+
for build in $keys; do
1165+
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1166+
if [ "$status" = "true" ]; then
1167+
status="✅"
1168+
else
1169+
status="❌"
1170+
fi
1171+
local row="| "$build" | "$status" |\\n"
1172+
rows="${rows}${row}"
1173+
done
1174+
1175+
local table="${header}${rows}"
1176+
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1177+
echo "$escaped_table"
1178+
}
1179+
1180+
if [[ "${CI}" = "true" ]]; then
1181+
# Retrieve JSON data from URL
1182+
data=$(get_json "$CI_JSON_URL")
1183+
# Create table from JSON data
1184+
table=$(build_table "$data")
1185+
echo -e "$table"
1186+
1187+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1188+
-H "Accept: application/vnd.github.v3+json" \
1189+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1190+
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1191+
else
1192+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1193+
-H "Accept: application/vnd.github.v3+json" \
1194+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1195+
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1196+
fi
1197+
'''
1198+
}
1199+
}
1200+
}
1201+
sh '''#!/bin/bash
1202+
rm -rf /config/.ssh/id_sign
1203+
rm -rf /config/.ssh/id_sign.pub
1204+
git config --global --unset gpg.format
1205+
git config --global --unset user.signingkey
1206+
git config --global --unset commit.gpgsign
1207+
'''
12101208
}
12111209
cleanup {
12121210
sh '''#! /bin/bash

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ This image can be run with a read-only container filesystem. For details please
170170
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
171171

172172
>[!NOTE]
173-
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
173+
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
174174
175175
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
176176

@@ -254,7 +254,7 @@ Containers are configured using parameters passed at runtime (such as those abov
254254
| `-e VALIDATION=http` | Certbot validation method to use, options are `http` or `dns` (`dns` method also requires `DNSPLUGIN` variable set). |
255255
| `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this *exactly* to `wildcard` (wildcard cert is available via `dns` validation only) |
256256
| `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. |
257-
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `acmedns`, `aliyun`, `azure`, `bunny`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `dreamhost`, `duckdns`, `dynu`, `freedns`, `gandi`, `gehirn`, `glesys`, `godaddy`, `google`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `namecheap`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `rfc2136`, `route53`, `sakuracloud`, `standalone`, `transip`, and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
257+
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `acmedns`, `aliyun`, `azure`, `bunny`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `dreamhost`, `duckdns`, `dynu`, `freedns`, `gandi`, `gehirn`, `glesys`, `godaddy`, `google`, `he`, `hetzner`, `hetzner-cloud`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `namecheap`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `rfc2136`, `route53`, `sakuracloud`, `standalone`, `transip`, and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
258258
| `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. |
259259
| `-e EMAIL=` | Optional e-mail address used for cert expiration notifications (Required for ZeroSSL). |
260260
| `-e ONLY_SUBDOMAINS=false` | If you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to `true` |
@@ -433,6 +433,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
433433

434434
## Versions
435435

436+
* **23.01.26:** - Reorder init to fix proxy conf version checks.
437+
* **21.12.25:** - Add support for hetzner-cloud dns validation.
436438
* **04.11.25:** - Switch default Gandi credentials from API Key to Token, allow DNS propagation time for Azure DNS plugin.
437439
* **18.07.25:** - Rebase to Alpine 3.22 with PHP 8.4. Add QUIC support. Drop PHP bindings for mcrypt as it is no longer maintained.
438440
* **05.05.25:** - Disable Certbot's built in log rotation.

0 commit comments

Comments
 (0)