Skip to content

Commit 479dfa1

Browse files
committed
develop tag initial release
1 parent d5be2f3 commit 479dfa1

File tree

8 files changed

+54
-42
lines changed

8 files changed

+54
-42
lines changed

.github/workflows/external_trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fi
1919
echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_PYLOAD_NG_MAIN\". ****"
2020
echo "**** Retrieving external version ****"
21-
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/pyload-ng/json" |jq -r '. | .info.version')
21+
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/pyload/pyload/commits/develop" | jq -r '. | .sha' | cut -c1-8)
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
2424
FAILURE_REASON="Can't retrieve external version for pyload-ng branch main"

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.15
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG PYLOAD_VERSION
6+
ARG PYLOAD_COMMIT
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

@@ -15,6 +15,7 @@ RUN \
1515
build-base \
1616
cargo \
1717
curl-dev \
18+
git \
1819
libffi-dev \
1920
libjpeg-turbo-dev \
2021
openssl-dev \
@@ -40,14 +41,13 @@ RUN \
4041
mkdir -p /usr/share/licenses/unrar && \
4142
mv license.txt /usr/share/licenses/unrar/ && \
4243
echo "**** install pyload ****" && \
43-
if [ -z ${PYLOAD_VERSION+x} ]; then \
44-
PYLOAD="pyload-ng[all]"; \
45-
else \
46-
PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \
44+
if [ -z ${PYLOAD_COMMIT+x} ]; then \
45+
PYLOAD_COMMIT=$(curl -sX GET "https://api.github.com/repos/pyload/pyload/branches/develop" \
46+
| awk '/sha/{print $4;exit}' FS='[""]'); \
4747
fi && \
4848
pip3 install -U pip setuptools wheel && \
4949
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
50-
"${PYLOAD}" && \
50+
"git+git://github.com/pyload/pyload.git@${PYLOAD_COMMIT}" && \
5151
echo "**** cleanup ****" && \
5252
apk del --purge \
5353
build-dependencies && \

Dockerfile.aarch64

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG PYLOAD_VERSION
6+
ARG PYLOAD_COMMIT
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

@@ -15,6 +15,7 @@ RUN \
1515
build-base \
1616
cargo \
1717
curl-dev \
18+
git \
1819
libffi-dev \
1920
libjpeg-turbo-dev \
2021
openssl-dev \
@@ -40,14 +41,13 @@ RUN \
4041
mkdir -p /usr/share/licenses/unrar && \
4142
mv license.txt /usr/share/licenses/unrar/ && \
4243
echo "**** install pyload ****" && \
43-
if [ -z ${PYLOAD_VERSION+x} ]; then \
44-
PYLOAD="pyload-ng[all]"; \
45-
else \
46-
PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \
44+
if [ -z ${PYLOAD_COMMIT+x} ]; then \
45+
PYLOAD_COMMIT=$(curl -sX GET "https://api.github.com/repos/pyload/pyload/branches/develop" \
46+
| awk '/sha/{print $4;exit}' FS='[""]'); \
4747
fi && \
4848
pip3 install -U pip setuptools wheel && \
4949
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
50-
"${PYLOAD}" && \
50+
"git+git://github.com/pyload/pyload.git@${PYLOAD_COMMIT}" && \
5151
echo "**** cleanup ****" && \
5252
apk del --purge \
5353
build-dependencies && \

Dockerfile.armhf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG PYLOAD_VERSION
6+
ARG PYLOAD_COMMIT
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

@@ -15,6 +15,7 @@ RUN \
1515
build-base \
1616
cargo \
1717
curl-dev \
18+
git \
1819
libffi-dev \
1920
libjpeg-turbo-dev \
2021
openssl-dev \
@@ -40,14 +41,13 @@ RUN \
4041
mkdir -p /usr/share/licenses/unrar && \
4142
mv license.txt /usr/share/licenses/unrar/ && \
4243
echo "**** install pyload ****" && \
43-
if [ -z ${PYLOAD_VERSION+x} ]; then \
44-
PYLOAD="pyload-ng[all]"; \
45-
else \
46-
PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \
44+
if [ -z ${PYLOAD_COMMIT+x} ]; then \
45+
PYLOAD_COMMIT=$(curl -sX GET "https://api.github.com/repos/pyload/pyload/branches/develop" \
46+
| awk '/sha/{print $4;exit}' FS='[""]'); \
4747
fi && \
4848
pip3 install -U pip setuptools wheel && \
4949
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
50-
"${PYLOAD}" && \
50+
"git+git://github.com/pyload/pyload.git@${PYLOAD_COMMIT}" && \
5151
echo "**** cleanup ****" && \
5252
apk del --purge \
5353
build-dependencies && \

Jenkinsfile

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ pipeline {
1717
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
1818
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
1919
SCARF_TOKEN=credentials('scarf_api_key')
20-
EXT_PIP = 'pyload-ng'
21-
BUILD_VERSION_ARG = 'PYLOAD_VERSION'
20+
EXT_GIT_BRANCH = 'develop'
21+
EXT_USER = 'pyload'
22+
EXT_REPO = 'pyload'
23+
BUILD_VERSION_ARG = 'PYLOAD_COMMIT'
2224
LS_USER = 'linuxserver'
2325
LS_REPO = 'docker-pyload'
2426
CONTAINER_NAME = 'pyload'
@@ -100,17 +102,25 @@ pipeline {
100102
/* ########################
101103
External Release Tagging
102104
######################## */
103-
// If this is a pip release set the external tag to the pip version
104-
stage("Set ENV pip_version"){
105-
steps{
106-
script{
107-
env.EXT_RELEASE = sh(
108-
script: '''curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''',
109-
returnStdout: true).trim()
110-
env.RELEASE_LINK = 'https://pypi.python.org/pypi/' + env.EXT_PIP
111-
}
112-
}
113-
} // Sanitize the release tag and strip illegal docker or github characters
105+
// If this is a github commit trigger determine the current commit at head
106+
stage("Set ENV github_commit"){
107+
steps{
108+
script{
109+
env.EXT_RELEASE = sh(
110+
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
111+
returnStdout: true).trim()
112+
}
113+
}
114+
}
115+
// If this is a github commit trigger Set the external release link
116+
stage("Set ENV commit_link"){
117+
steps{
118+
script{
119+
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE
120+
}
121+
}
122+
}
123+
// Sanitize the release tag and strip illegal docker or github characters
114124
stage("Sanitize tag"){
115125
steps{
116126
script{
@@ -909,11 +919,11 @@ pipeline {
909919
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
910920
echo "Pushing New release for Tag"
911921
sh '''#! /bin/bash
912-
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
922+
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_RELEASE_CLEAN} | jq '.commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
913923
echo '{"tag_name":"'${META_TAG}'",\
914924
"target_commitish": "main",\
915925
"name": "'${META_TAG}'",\
916-
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start
926+
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
917927
printf '","draft": false,"prerelease": false}' >> releasebody.json
918928
paste -d'\\0' start releasebody.json > releasebody.json.done
919929
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This image provides various versions that are available via tags. `latest` tag u
6565
| Tag | Description |
6666
| :----: | --- |
6767
| latest | Stable releases from pyLoad Next |
68-
| development | Releases from pyload Next development branch |
68+
| develop | Releases from pyload Next develop branch |
6969

7070
## Application Setup
7171

jenkins-vars.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
# jenkins variables
44
project_name: docker-pyload-ng
5-
external_type: pip_version
6-
release_type: stable
7-
release_tag: latest
8-
ls_branch: main
5+
external_type: github_commit
6+
release_type: prerelease
7+
release_tag: develop
8+
ls_branch: develop
99
repo_vars:
10-
- EXT_PIP = 'pyload-ng'
11-
- BUILD_VERSION_ARG = 'PYLOAD_VERSION'
10+
- EXT_GIT_BRANCH = 'develop'
11+
- EXT_USER = 'pyload'
12+
- EXT_REPO = 'pyload'
13+
- BUILD_VERSION_ARG = 'PYLOAD_COMMIT'
1214
- LS_USER = 'linuxserver'
1315
- LS_REPO = 'docker-pyload'
1416
- CONTAINER_NAME = 'pyload'

readme-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ available_architectures:
1717
development_versions: true
1818
development_versions_items:
1919
- { tag: "latest", desc: "Stable releases from pyLoad Next" }
20-
- { tag: "development", desc: "Releases from pyload Next development branch" }
20+
- { tag: "develop", desc: "Releases from pyload Next develop branch" }
2121

2222

2323
# container parameters

0 commit comments

Comments
 (0)