Skip to content

Commit 3d8bb63

Browse files
authored
Merge pull request #34 from joshwbrick/master
Updates To Use New ddclient Repo on GitHub
2 parents 555d9db + b581ccf commit 3d8bb63

File tree

7 files changed

+43
-29
lines changed

7 files changed

+43
-29
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN \
1717
wget && \
1818
echo "**** install runtime packages ****" && \
1919
apk add --no-cache \
20-
curl \
20+
curl \
2121
inotify-tools \
2222
jq \
2323
perl \
@@ -32,14 +32,14 @@ RUN \
3232
JSON::Any && \
3333
echo "**** install ddclient ****" && \
3434
if [ -z ${DDCLIENT_VERSION+x} ]; then \
35-
DDCLIENT_VERSION=$(curl -sL 'http://sourceforge.net/projects/ddclient/best_release.json' \
36-
| jq -r '.platform_releases.linux.filename' | awk -F '(ddclient-|.zip)' '{print $3}'); \
35+
DDCLIENT_VERSION=$(curl -sX GET "https://api.github.com/repos/ddclient/ddclient/releases/latest" \
36+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3737
fi && \
3838
mkdir -p \
3939
/tmp/ddclient && \
4040
curl -o \
4141
/tmp/ddclient.tar.gz -L \
42-
"https://sourceforge.net/projects/ddclient/files/ddclient/ddclient-${DDCLIENT_VERSION}/ddclient-${DDCLIENT_VERSION}.tar.gz/download" && \
42+
"https://github.com/ddclient/ddclient/archive/${DDCLIENT_VERSION}.tar.gz" && \
4343
tar xf \
4444
/tmp/ddclient.tar.gz -C \
4545
/tmp/ddclient --strip-components=1 && \

Dockerfile.aarch64

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN \
1717
wget && \
1818
echo "**** install runtime packages ****" && \
1919
apk add --no-cache \
20-
curl \
20+
curl \
2121
inotify-tools \
2222
jq \
2323
perl \
@@ -32,14 +32,14 @@ RUN \
3232
JSON::Any && \
3333
echo "**** install ddclient ****" && \
3434
if [ -z ${DDCLIENT_VERSION+x} ]; then \
35-
DDCLIENT_VERSION=$(curl -sL 'http://sourceforge.net/projects/ddclient/best_release.json' \
36-
| jq -r '.platform_releases.linux.filename' | awk -F '(ddclient-|.zip)' '{print $3}'); \
35+
DDCLIENT_VERSION=$(curl -sX GET "https://api.github.com/repos/ddclient/ddclient/releases/latest" \
36+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3737
fi && \
3838
mkdir -p \
3939
/tmp/ddclient && \
4040
curl -o \
4141
/tmp/ddclient.tar.gz -L \
42-
"https://sourceforge.net/projects/ddclient/files/ddclient/ddclient-${DDCLIENT_VERSION}/ddclient-${DDCLIENT_VERSION}.tar.gz/download" && \
42+
"https://github.com/ddclient/ddclient/archive/${DDCLIENT_VERSION}.tar.gz" && \
4343
tar xf \
4444
/tmp/ddclient.tar.gz -C \
4545
/tmp/ddclient --strip-components=1 && \

Dockerfile.armhf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN \
1717
wget && \
1818
echo "**** install runtime packages ****" && \
1919
apk add --no-cache \
20-
curl \
20+
curl \
2121
inotify-tools \
2222
jq \
2323
perl \
@@ -32,14 +32,14 @@ RUN \
3232
JSON::Any && \
3333
echo "**** install ddclient ****" && \
3434
if [ -z ${DDCLIENT_VERSION+x} ]; then \
35-
DDCLIENT_VERSION=$(curl -sL 'http://sourceforge.net/projects/ddclient/best_release.json' \
36-
| jq -r '.platform_releases.linux.filename' | awk -F '(ddclient-|.zip)' '{print $3}'); \
35+
DDCLIENT_VERSION=$(curl -sX GET "https://api.github.com/repos/ddclient/ddclient/releases/latest" \
36+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3737
fi && \
3838
mkdir -p \
3939
/tmp/ddclient && \
4040
curl -o \
4141
/tmp/ddclient.tar.gz -L \
42-
"https://sourceforge.net/projects/ddclient/files/ddclient/ddclient-${DDCLIENT_VERSION}/ddclient-${DDCLIENT_VERSION}.tar.gz/download" && \
42+
"https://github.com/ddclient/ddclient/archive/${DDCLIENT_VERSION}.tar.gz" && \
4343
tar xf \
4444
/tmp/ddclient.tar.gz -C \
4545
/tmp/ddclient --strip-components=1 && \

Jenkinsfile

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ pipeline {
1616
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
1717
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
1818
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
19+
EXT_GIT_BRANCH = 'master'
20+
EXT_USER = 'ddclient'
21+
EXT_REPO = 'ddclient'
1922
BUILD_VERSION_ARG = 'DDCLIENT_VERSION'
2023
LS_USER = 'linuxserver'
2124
LS_REPO = 'docker-ddclient'
@@ -98,16 +101,23 @@ pipeline {
98101
/* ########################
99102
External Release Tagging
100103
######################## */
101-
// If this is a custom command to determine version use that command
102-
stage("Set tag custom bash"){
103-
steps{
104-
script{
105-
env.EXT_RELEASE = sh(
106-
script: ''' curl -sL 'http://sourceforge.net/projects/ddclient/best_release.json' | jq -r '.platform_releases.linux.filename' | awk -F '(ddclient-|.zip)' '{print $3}' ''',
107-
returnStdout: true).trim()
108-
env.RELEASE_LINK = 'custom_command'
109-
}
110-
}
104+
// If this is a stable github release use the latest endpoint from github to determine the ext tag
105+
stage("Set ENV github_stable"){
106+
steps{
107+
script{
108+
env.EXT_RELEASE = sh(
109+
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
110+
returnStdout: true).trim()
111+
}
112+
}
113+
}
114+
// If this is a stable or devel github release generate the link for the build message
115+
stage("Set ENV github_link"){
116+
steps{
117+
script{
118+
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
119+
}
120+
}
111121
}
112122
// Sanitize the release tag and strip illegal docker or github characters
113123
stage("Sanitize tag"){
@@ -671,11 +681,11 @@ pipeline {
671681
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
672682
echo "Pushing New release for Tag"
673683
sh '''#! /bin/bash
674-
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
684+
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
675685
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
676686
"target_commitish": "master",\
677687
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
678-
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
688+
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
679689
printf '","draft": false,"prerelease": false}' >> releasebody.json
680690
paste -d'\\0' start releasebody.json > releasebody.json.done
681691
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Find us at:
3636
[![Build Status](https://ci.linuxserver.io/view/all/job/Docker-Pipeline-Builders/job/docker-ddclient/job/master/badge/icon?style=flat-square)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ddclient/job/master/)
3737
[![](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/ddclient/latest/badge.svg)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/ddclient/latest/index.html)
3838

39-
[Ddclient](https://sourceforge.net/p/ddclient/wiki/Home/) is a Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Service Provider. It was originally written by Paul Burry and is now mostly by wimpunk. It has the capability to update more than just dyndns and it can fetch your WAN-ipaddress in a few different ways.
39+
[Ddclient](https://github.com/ddclient/ddclient) is a Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Service Provider. It was originally written by Paul Burry and is now mostly by wimpunk. It has the capability to update more than just dyndns and it can fetch your WAN-ipaddress in a few different ways.
4040

41-
[![ddclient](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/ddclient-logo.png)](https://sourceforge.net/p/ddclient/wiki/Home/)
41+
[![ddclient](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/ddclient-logo.png)](https://github.com/ddclient/ddclient)
4242

4343
## Supported Architectures
4444

@@ -201,6 +201,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
201201

202202
## Versions
203203

204+
* **08.02.20:** - Ingest from Github.
204205
* **06.02.19:** - Fix permissions.
205206
* **19.12.19:** - Rebasing to alpine 3.11.
206207
* **28.06.19:** - Rebasing to alpine 3.10.

jenkins-vars.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
# jenkins variables
44
project_name: docker-ddclient
5-
external_type: na
6-
custom_version_command: "curl -sL 'http://sourceforge.net/projects/ddclient/best_release.json' | jq -r '.platform_releases.linux.filename' | awk -F '(ddclient-|.zip)' '{print $3}'"
5+
external_type: github_stable
76
release_type: stable
87
release_tag: latest
98
ls_branch: master
109
repo_vars:
10+
- EXT_GIT_BRANCH = 'master'
11+
- EXT_USER = 'ddclient'
12+
- EXT_REPO = 'ddclient'
1113
- BUILD_VERSION_ARG = 'DDCLIENT_VERSION'
1214
- LS_USER = 'linuxserver'
1315
- LS_REPO = 'docker-ddclient'

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# project information
44
project_name: ddclient
5-
project_url: "https://sourceforge.net/p/ddclient/wiki/Home/"
5+
project_url: "https://github.com/ddclient/ddclient"
66
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/ddclient-logo.png"
77
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
88
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Service Provider. It was originally written by Paul Burry and is now mostly by wimpunk. It has the capability to update more than just dyndns and it can fetch your WAN-ipaddress in a few different ways."
@@ -46,6 +46,7 @@ app_setup_block: |
4646
4747
# changelog
4848
changelogs:
49+
- { date: "08.02.20:", desc: "Ingest from Github." }
4950
- { date: "06.02.19:", desc: "Fix permissions." }
5051
- { date: "19.12.19:", desc: "Rebasing to alpine 3.11." }
5152
- { date: "28.06.19:", desc: "Rebasing to alpine 3.10." }

0 commit comments

Comments
 (0)