Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add download history management and other improvements #59

Open
wants to merge 580 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
580 commits
Select commit Hold shift + click to select a range
ffc3172
Update dependency starlette to v0.29.0
Jul 13, 2023
94f354a
Update dependency starlette to v0.30.0
Jul 14, 2023
306936a
Update dependency eslint to v8.45.0
Jul 15, 2023
f399086
Update dependency vite to v4.4.4
Jul 15, 2023
64c4a18
Show number of workers
nbr23 Jul 15, 2023
75ee703
Update dependency uvicorn to v0.23.0
Jul 15, 2023
6bc3e58
Update stats helper
nbr23 Jul 15, 2023
7ae1905
Update dependency PyYAML to v6.0.1
Jul 18, 2023
b3a33cf
Update dependency uvicorn to v0.23.1
Jul 19, 2023
c53f03c
Update dependency vite to v4.4.5
Jul 21, 2023
f06efd3
Update dependency vite to v4.4.6
Jul 21, 2023
14a7fb1
Update dependency vite to v4.4.7
Jul 26, 2023
67999a3
Update dependency starlette to v0.31.0
Jul 26, 2023
ae992fa
Update dependency bootstrap to v5.3.1
Jul 28, 2023
ecd9507
Update dependency eslint to v8.46.0
Jul 28, 2023
ad0f643
Update dependency eslint-plugin-vue to v9.16.0
Jul 29, 2023
16f81a9
Update dependency eslint-plugin-vue to v9.16.1
Jul 31, 2023
ef04de9
Update dependency uvicorn to v0.23.2
Jul 31, 2023
d030644
Update dependency vite to v4.4.8
Aug 2, 2023
e647056
Update dependency vite to v4.4.9
Aug 8, 2023
5cb6d4c
Update dependency eslint-plugin-vue to v9.17.0
Aug 11, 2023
a192a3e
Update dependency aiofiles to v23.2.1
Aug 11, 2023
67346fe
Update dependency eslint to v8.47.0
Aug 11, 2023
f313785
Update dependency @vitejs/plugin-vue to v4.3.1
Aug 17, 2023
a194824
Update dependency @vitejs/plugin-vue to v4.3.2
Aug 21, 2023
ec08fc8
Update dependency @vitejs/plugin-vue to v4.3.3
Aug 22, 2023
680813c
Update dependency eslint to v8.48.0
Aug 26, 2023
a0e17ef
Update dependency starlette to v0.31.1
Aug 27, 2023
a764063
Update dependency @vitejs/plugin-vue to v4.3.4
Aug 30, 2023
6e93fdf
Update dependency eslint to v8.49.0
Sep 14, 2023
9b1a405
Update dependency bootstrap to v5.3.2
Sep 15, 2023
a4d88e5
Update dependency yt-dlp to v2023.9.24
Sep 24, 2023
0ef3f36
Update dependency vue-router to v4.2.5
Sep 24, 2023
29ea831
Update dependency eslint to v8.50.0
Sep 24, 2023
4b04265
Update dependency vite to v4.4.10 (#68)
Oct 3, 2023
f7d9316
Update dependency @vitejs/plugin-vue to v4.4.0 (#67)
Oct 3, 2023
a9eba53
Add reference to ytdl-k8s
droopy4096 Oct 4, 2023
7283fe6
Update dependency vite to v4.4.11 (#69)
Oct 6, 2023
197933f
Update dependency yt-dlp to v2023.10.7 (#71)
Oct 7, 2023
bc0a8d9
Update dependency eslint to v8.51.0
Oct 7, 2023
00e8ff4
Update dependency yt-dlp to v2023.10.13
Oct 14, 2023
b51a882
Merge pull request #105 from droopy4096/ytdl-k8s-reference
nbr23 Oct 15, 2023
47721b7
Update dependency vite to v4.5.0 (#73)
Oct 18, 2023
100ff81
Update dependency eslint to v8.52.0 (#76)
Oct 21, 2023
bee01bc
Update dependency vue to v3.3.6 (#75)
Oct 21, 2023
f853ba2
Update dependency eslint-plugin-vue to v9.18.0 (#77)
Oct 24, 2023
701e45e
Update dependency vue to v3.3.7 (#78)
Oct 26, 2023
af9fadc
update frontend to handle multiple urls
nbr23 Oct 26, 2023
da5711e
Support multiple urls
nbr23 Oct 26, 2023
074d7b5
handle process killing better
nbr23 Oct 26, 2023
339a52c
nicer metadata display
nbr23 Oct 26, 2023
4f7d2dd
update metadata dialog
nbr23 Oct 26, 2023
8b68d99
node 21
nbr23 Oct 26, 2023
83b606e
metadata dialog
nbr23 Oct 26, 2023
3eeec07
trim input
nbr23 Oct 26, 2023
6ceb785
cleanup extractor list
nbr23 Oct 26, 2023
4f5c70d
update metadata list
nbr23 Oct 26, 2023
9e12e4e
Update dependency eslint-plugin-vue to v9.18.1
Oct 28, 2023
357a951
Update dependency uvicorn to v0.24.0 (#82)
Nov 5, 2023
f027279
Update dependency eslint to v8.53.0 (#80)
Nov 5, 2023
2e8305c
Update dependency starlette to v0.32.0
Nov 5, 2023
9fd8361
npm up
nbr23 Oct 26, 2023
e5ae7d7
bump alpine image
nbr23 Nov 6, 2023
49fda92
Show log details when clicked
nbr23 Nov 6, 2023
356d505
Update dependency vue to v3.3.8
Nov 7, 2023
b753667
Update dependency @vitejs/plugin-vue to v4.4.1
Nov 9, 2023
8bebd29
Update dependency yt-dlp to v2023.11.14
Nov 15, 2023
1fd0d69
Fix builds
nbr23 Nov 15, 2023
ec62b47
Bump yt-dlp
nbr23 Nov 16, 2023
c6a74cc
Fix armv7 builds
nbr23 Nov 16, 2023
fbc77f0
Update dependency vite to v5
Nov 16, 2023
3754831
Update dependency @vitejs/plugin-vue to v4.5.0
Nov 16, 2023
63044c2
Update dependency eslint to v8.54.0
Nov 18, 2023
7721101
Merge branch 'renovate/vite-5.x'
nbr23 Nov 18, 2023
3058ffd
Merge branch 'renovate/vitejs-plugin-vue-4.x-lockfile'
nbr23 Nov 18, 2023
1370a66
Update dependency vite to v5
Nov 18, 2023
6352b29
Update dependency vite to v5.0.2
Nov 22, 2023
3f31f91
Update dependency starlette to v0.33.0
Dec 3, 2023
5d991ed
Update dependency eslint-plugin-vue to v9.19.2
Dec 3, 2023
e1d5a6d
Update dependency eslint to v8.55.0
Dec 3, 2023
d05c27b
Update dependency @vitejs/plugin-vue to v4.5.1
Dec 3, 2023
aaa7791
Update dependency vite to v5.0.4
Dec 3, 2023
54314be
Update dependency vue to v3.3.9
Dec 3, 2023
15f2227
Update dependency vue to v3.3.11
Dec 10, 2023
cc32938
Update dependency vite to v5.0.7
Dec 10, 2023
07a580c
Update dependency @vitejs/plugin-vue to v4.5.2
Dec 10, 2023
eb4a32e
lint
nbr23 Dec 10, 2023
7e567d2
add profiles to config
nbr23 Dec 10, 2023
8664175
support profiles
nbr23 Dec 13, 2023
81b5deb
permit abort/retry in log modal
nbr23 Dec 13, 2023
d534d91
Handle errors better
nbr23 Dec 16, 2023
63cdee6
Update dependency starlette to v0.34.0
Dec 17, 2023
fe2c9c5
Update dependency uvicorn to v0.25.0
Dec 20, 2023
4d056b6
Update dependency yt-dlp to v2023.12.30
Dec 31, 2023
2c21026
Update dependency vue to v3.4.3
Jan 1, 2024
66db79b
Update dependency @vitejs/plugin-vue to v4.6.2
Jan 1, 2024
0385f73
Update dependency @vitejs/plugin-vue to v5
Jan 2, 2024
e0ec392
Update dependency eslint to v8.56.0
Jan 2, 2024
60f266a
Update dependency starlette to v0.35.1
Jan 12, 2024
f957cce
Update dependency Jinja2 to v3.1.3
Jan 12, 2024
dd8b059
Update dependency uvicorn to v0.26.0
Jan 19, 2024
b558ee5
Update dependency uvicorn to v0.27.0
Jan 23, 2024
090663e
Update dependency starlette to v0.36.0
Jan 23, 2024
1db6bd2
Update dependency starlette to v0.36.1
Jan 23, 2024
5bfa17f
npm bump
nbr23 Jan 23, 2024
c760a8c
show log updates in log detail modal
nbr23 Feb 3, 2024
93bed4d
Update dependency uvicorn to v0.27.0.post1
Feb 3, 2024
e796188
Update dependency eslint-plugin-vue to v9.21.1
Feb 3, 2024
5316e28
Filter jobs by status + add hotlinks to specific status
nbr23 Feb 3, 2024
ad8382a
bump starlette
nbr23 Feb 3, 2024
67c48c7
Improve log filtering by status
nbr23 Feb 4, 2024
a017eb7
add log entry delete
nbr23 Feb 4, 2024
f36fdca
Update dependency vue to v3.4.18
Feb 9, 2024
439625c
Update dependency starlette to v0.37.1
Feb 10, 2024
f8831b7
Update dependency uvicorn to v0.27.1
Feb 10, 2024
3b4ebbf
Add stats link
nbr23 Feb 15, 2024
de313ab
empty log placeholder
nbr23 Feb 15, 2024
494a732
bumps
nbr23 Feb 15, 2024
ed11a65
Add pretty spinner
nbr23 Feb 17, 2024
43e81b6
fix dependencies
nbr23 Feb 18, 2024
ea8c590
consolidate dockerfile
nbr23 Feb 18, 2024
567b765
Update readme
nbr23 Feb 18, 2024
453b200
Fix dockerfile
nbr23 Feb 18, 2024
de8dc1e
permit searching extractors
nbr23 Feb 18, 2024
1d711d3
Add clearer "inspect" button
nbr23 Feb 18, 2024
1761b34
add home route
nbr23 Feb 18, 2024
d98395d
bump
nbr23 Feb 21, 2024
9facbc6
cleanups
nbr23 Feb 22, 2024
1bce96e
Better output_playlist default in config.yml
nbr23 Mar 1, 2024
9c372d1
README cleanup
nbr23 Mar 9, 2024
168f2ea
Update dependency uvicorn to v0.28.0
Mar 10, 2024
11766cb
Update dependency yt-dlp to v2024
Mar 12, 2024
2573ecd
Add doc about profiles
nbr23 Mar 23, 2024
d1e0ed6
missing screenshot
nbr23 Mar 23, 2024
dbd5047
dependency bumps
nbr23 Mar 23, 2024
7265f6d
Fix log detail links
nbr23 Mar 29, 2024
73f0055
bump npm stuff
nbr23 Mar 29, 2024
d859d13
use vue router for log status links
nbr23 Apr 6, 2024
53f3a62
bump yt-dlp 2024.4.09
nbr23 Apr 10, 2024
2546fb5
handle profiles better
nbr23 Apr 10, 2024
4fd2978
queue items from inspect popup
nbr23 Apr 10, 2024
26c31a3
npm bumps
nbr23 Apr 10, 2024
0dfe6e9
prettier format display
nbr23 Apr 11, 2024
9bd46ab
handle cherry picking audio
nbr23 Apr 12, 2024
4848ae7
cleanup
nbr23 Apr 13, 2024
5a1c794
use proper ydl module name in ui
nbr23 Apr 13, 2024
92991ce
Fix audio
nbr23 Apr 14, 2024
51ce1a0
node 22
Apr 28, 2024
be15c31
Add missing python-multipart dependency
nbr23 May 10, 2024
4011a5b
Update dependency Jinja2 to v3.1.4
May 12, 2024
45ed6de
add backwards comport for metadata post as form
nbr23 May 13, 2024
5634188
handle db migrations better
nbr23 May 21, 2024
55f970a
Update dependency yt-dlp to v2024.5.26
May 26, 2024
7e52fc5
npm bumps
nbr23 May 26, 2024
774ef62
don't show NaN size
nbr23 May 27, 2024
e6167e3
Update dependency yt-dlp to v2024.5.27
May 28, 2024
039f2f8
Update dependency uvicorn to v0.30.0
May 28, 2024
ac8d373
Update dependency eslint to v9.4.0
Jun 2, 2024
76a493f
Update dependency vite to v5.2.12
Jun 2, 2024
5fbcd9d
Update dependency @vitejs/plugin-vue to v5.0.5
Jun 2, 2024
0246d12
Update dependency uvicorn to v0.30.1
Jun 2, 2024
2deac93
Update Dockerfile
edekeijzer Jun 6, 2024
c38aa1a
Update dependency vite to v5.2.13
Jun 9, 2024
9da21e1
Update dependency vue-router to v4.3.3
Jun 13, 2024
34ac391
Update dependency vite to v5.3.0
Jun 14, 2024
dff30ed
Update dependency vite to v5.3.1
Jun 15, 2024
16c7e70
Update dependency vue to v3.4.29
Jun 15, 2024
b7b718a
Update dependency eslint to v9.5.0
Jun 15, 2024
fc440a6
Update dependency vue-router to v4.4.0
Jun 22, 2024
8d75f68
Update dependency vue to v3.4.30
Jun 23, 2024
8339d19
Update dependency yt-dlp to v2024.7.1
Jul 2, 2024
a934189
lint
nbr23 Jul 2, 2024
c787d9f
cleanup + bumps
nbr23 Jul 2, 2024
33aad02
Update dependency yt-dlp to v2024.7.2
Jul 4, 2024
f244db5
Update dependency yt-dlp to v2024.7.7
Jul 7, 2024
b598b51
Update dependency yt-dlp to v2024.7.8
Jul 9, 2024
82e6c77
Update dependency vue to v3.4.31
Jul 9, 2024
15a7a92
Update dependency eslint-plugin-vue to v9.27.0
Jul 9, 2024
79613c8
Update dependency eslint to v9.6.0
Jul 9, 2024
68c0781
Update dependency yt-dlp to v2024.7.9
Jul 10, 2024
05328b2
Update dependency vite to v5.3.3
Jul 9, 2024
249cecb
Update dependency yt-dlp to v2024.7.16
Jul 16, 2024
c60c33a
fix linting
nbr23 Jul 17, 2024
ced3279
Update dependency uvicorn to v0.30.3
Jul 20, 2024
0d511a7
Update dependency starlette to v0.38.0
Jul 20, 2024
0c3c582
Update dependency eslint to v9.7.0
Jul 21, 2024
35c6b28
Update dependency vue to v3.4.34
Jul 24, 2024
ee9413e
Update dependency yt-dlp to v2024.7.25
Jul 25, 2024
756e212
Update dependency starlette to v0.38.1
Jul 24, 2024
35822b8
Update dependency vite to v5.3.5
Jul 27, 2024
05a594f
Update dependency @vitejs/plugin-vue to v5.1.1
Jul 27, 2024
a977ab2
Update dependency eslint to v9.8.0
Jul 27, 2024
c1395eb
Update dependency starlette to v0.38.2
Jul 27, 2024
7581fcf
Update dependency uvicorn to v0.30.4
Jul 31, 2024
1ff5a37
Update dependency yt-dlp to v2024.8.1
Aug 1, 2024
2bf374a
Update dependency uvicorn to v0.30.5
Aug 2, 2024
527e2ef
Update dependency vue to v3.4.35
Aug 3, 2024
d5f6097
Update dependency vue-router to v4.4.2
Aug 3, 2024
fbb847d
Update dependency yt-dlp to v2024.8.6
Aug 6, 2024
6ec2314
Update dependency PyYAML to v6.0.2
Aug 6, 2024
8b43538
Update dependency vue to v3.4.36
Aug 6, 2024
64c8181
Update dependency vue-router to v4.4.3
Aug 6, 2024
0942803
Update dependency vite to v5.4.0
Aug 7, 2024
ac84fc1
Update dependency @vitejs/plugin-vue to v5.1.2
Aug 7, 2024
b2b29e0
Update dependency uvicorn to v0.30.6
Aug 13, 2024
4cfd62b
Update dependency eslint to v9.9.0
Aug 9, 2024
84e43e0
Update dependency vue to v3.4.37
Aug 8, 2024
ee5f333
Update dependency starlette to v0.38.4
Sep 1, 2024
9b1e9d9
Update dependency vue to v3.4.38
Sep 2, 2024
64cd4dc
Update dependency vite to v5.4.2
Sep 2, 2024
0553152
Update dependency @vitejs/plugin-vue to v5.1.3
Sep 2, 2024
0f4d728
Update dependency eslint to v9.9.1
Sep 2, 2024
2baac2c
Update dependency vue to v3.5.0
Sep 3, 2024
1b7cafa
Update dependency vite to v5.4.3
Sep 3, 2024
b3d3dfc
Update dependency starlette to v0.38.5
Sep 8, 2024
5251d34
Update dependency vite to v5.4.8
Sep 25, 2024
c3ff1a2
Update dependency python-multipart to v0.0.10
Sep 21, 2024
c469723
Update dependency starlette to v0.39.1
Sep 25, 2024
0242d71
Update dependency vue to v3.5.9
Sep 26, 2024
61a4177
Update dependency vue-router to v4.4.5
Sep 13, 2024
3691d10
Update dependency @vitejs/plugin-vue to v5.1.4
Sep 18, 2024
5a7b46b
Update dependency yt-dlp to v2024.9.27
Sep 28, 2024
b5c87cc
Update dependency uvicorn to v0.31.0
Sep 27, 2024
411d5c4
Update dependency starlette to v0.39.2
Sep 30, 2024
5da16e4
Update dependency python-multipart to v0.0.12
Sep 30, 2024
1918a3a
Update dependency vue to v3.5.10
Sep 30, 2024
8ebba56
Update dependency vue to v3.5.11
Oct 3, 2024
3e95081
Bump rollup from 4.21.2 to 4.24.0 in /front
dependabot[bot] Oct 6, 2024
bdb3bc6
Update dependency yt-dlp to v2024.10.7
Oct 8, 2024
8c91a05
handle bad app_config permissions better
nbr23 Oct 13, 2024
9e390ad
Update dependency vue to v3.5.12
Oct 13, 2024
e0d1d06
Update dependency uvicorn to v0.31.1
Oct 9, 2024
93a91e1
Update dependency starlette to v0.41.0
Oct 15, 2024
a95f2a1
Update dependency uvicorn to v0.32.0
Oct 16, 2024
d590bda
Fix handling of subfolders in finished page
nbr23 Oct 17, 2024
02dcccc
Update dependency vite to v5.4.9
Oct 17, 2024
3ba31cd
bump yt-dlp
nbr23 Oct 23, 2024
49fb2af
bump python requirements
nbr23 Oct 27, 2024
c4bac18
fix ydl url
nbr23 Oct 27, 2024
0889e47
Update dependency vite to v5.4.10
Oct 27, 2024
081f89c
fetch server info only once
nbr23 Oct 27, 2024
25ee249
fix finished files ordering
nbr23 Nov 3, 2024
0400841
bump yt-dlp
nbr23 Nov 4, 2024
23ba0f6
Fix builds
nbr23 Nov 4, 2024
678b5bf
default to yt-dlp
nbr23 Nov 13, 2024
daf1757
fix empty logs display bug
nbr23 Nov 13, 2024
26317e1
handle graceful shutdown
nbr23 Nov 15, 2024
0db775c
lint
nbr23 Nov 16, 2024
7dfe967
Update dependency yt-dlp to v2024.11.18
Nov 19, 2024
fe535b5
Update dependency starlette to v0.41.3
Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__
node_modules
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line-length = 120
67 changes: 56 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,70 @@
#
# youtube-dl Server Dockerfile
#
# https://github.com/manbearwiz/youtube-dl-server-dockerfile
# https://github.com/nbr23/youtube-dl-server
#

FROM python:alpine
ARG YOUTUBE_DL=yt-dlp
FROM --platform=$BUILDPLATFORM node:22-alpine AS nodebuild

RUN apk add --no-cache \
ffmpeg \
tzdata
WORKDIR /app
COPY ./front/package*.json /app
RUN npm ci
COPY ./front /app
RUN npm run build

FROM python:alpine AS wheels

RUN apk add --no-cache g++
COPY ./requirements.txt .
RUN pip wheel --no-cache-dir --wheel-dir /out/wheels -r <(cat ./requirements.txt| grep -v youtube-dl | grep -v yt-dlp) \
&& pip wheel --no-cache-dir --wheel-dir /out/wheels-youtube-dl -r <(cat ./requirements.txt| grep youtube-dl) \
&& pip wheel --no-cache-dir --wheel-dir /out/wheels-yt-dlp -r <(cat ./requirements.txt| grep yt-dlp)

FROM python:alpine AS base
ARG ATOMICPARSLEY=0
ARG YDLS_VERSION
ARG YDLS_RELEASE_DATE

ENV YDLS_VERSION=$YDLS_VERSION
ENV YDLS_RELEASE_DATE=$YDLS_RELEASE_DATE

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apk add --no-cache ffmpeg tzdata mailcap
RUN if [ $ATOMICPARSLEY == 1 ]; then apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing atomicparsley; ln /usr/bin/atomicparsley /usr/bin/AtomicParsley || true; fi

COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
VOLUME "/youtube-dl"
VOLUME "/app_config"

COPY . /usr/src/app
COPY --from=wheels /out/wheels /wheels
RUN pip install --no-cache /wheels/*

EXPOSE 8080
COPY ./requirements.txt /usr/src/app/

FROM base AS yt-dlp

COPY --from=wheels /out/wheels-yt-dlp /wheels
RUN pip install --no-cache /wheels/*
RUN pip install --no-cache-dir -r <(cat /usr/src/app/requirements.txt| grep -v youtube-dl)

VOLUME ["/youtube-dl"]
FROM base AS youtube-dl

COPY --from=wheels /out/wheels-youtube-dl /wheels/
RUN pip install --no-cache /wheels/*
RUN pip install --no-cache-dir -r <(cat /usr/src/app/requirements.txt| grep -v yt-dlp)

FROM ${YOUTUBE_DL}

COPY ./config.yml /usr/src/app/default_config.yml
COPY ./ydl_server /usr/src/app/ydl_server
COPY ./youtube-dl-server.py /usr/src/app/

COPY --from=nodebuild /app/dist /usr/src/app/ydl_server/static

EXPOSE 8080

ENV YOUTUBE_DL=$YOUTUBE_DL
ENV YDL_CONFIG_PATH='/app_config'
CMD [ "python", "-u", "./youtube-dl-server.py" ]

HEALTHCHECK CMD wget 127.0.0.1:8080/api/info --spider -q -Y off
86 changes: 86 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
pipeline {
agent any

options {
disableConcurrentBuilds()
}

stages {
stage('Checkout'){
steps {
checkout scm
}
}
stage('Linting') {
steps {
script {
sh "ruff check .";
}
}
}
stage('Prep buildx') {
steps {
script {
env.BUILDX_BUILDER = getBuildxBuilder();
}
}
}
stage('Build yt_dlp Image') {
steps {
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'DOCKERHUB_CREDENTIALS_USR', passwordVariable: 'DOCKERHUB_CREDENTIALS_PSW')]) {
sh 'docker login -u $DOCKERHUB_CREDENTIALS_USR -p "$DOCKERHUB_CREDENTIALS_PSW"'
}
sh """
docker buildx build \
--pull \
--builder \$BUILDX_BUILDER \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg YDLS_VERSION=`git rev-parse --short HEAD` \
--build-arg YDLS_RELEASE_DATE="`git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'`" \
--build-arg YOUTUBE_DL=yt-dlp \
--build-arg ATOMICPARSLEY=1 \
-t nbr23/youtube-dl-server:latest \
-t nbr23/youtube-dl-server:yt-dlp \
-t nbr23/youtube-dl-server:`git rev-parse --short HEAD`-yt-dlp \
-t nbr23/youtube-dl-server:${GIT_COMMIT}-`date +%s`-yt-dlp \
-t nbr23/youtube-dl-server:yt-dlp_atomicparsley \
${ "$GIT_BRANCH" == "master" ? "--push" : ""} .
"""
}
}
stage('Build Youtube-dl Image') {
steps {
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'DOCKERHUB_CREDENTIALS_USR', passwordVariable: 'DOCKERHUB_CREDENTIALS_PSW')]) {
sh 'docker login -u $DOCKERHUB_CREDENTIALS_USR -p "$DOCKERHUB_CREDENTIALS_PSW"'
}
sh """
docker buildx build \
--pull \
--builder \$BUILDX_BUILDER \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg YDLS_VERSION=`git rev-parse --short HEAD` \
--build-arg YDLS_RELEASE_DATE="`git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'`" \
--build-arg ATOMICPARSLEY=1 \
--build-arg YOUTUBE_DL=youtube-dl \
-t nbr23/youtube-dl-server:youtube-dl \
-t nbr23/youtube-dl-server:`git rev-parse --short HEAD`-youtube-dl \
-t nbr23/youtube-dl-server:${GIT_COMMIT}-`date +%s`-youtube-dl \
-t nbr23/youtube-dl-server:youtube-dl_atomicparsley \
${ "$GIT_BRANCH" == "master" ? "--push" : ""} .
"""
}
}
stage('Sync github repo') {
when { branch 'master' }
steps {
syncRemoteBranch('[email protected]:nbr23/youtube-dl-server.git', 'master')
}
}
}
post {
always {
sh 'docker buildx stop $BUILDX_BUILDER || true'
sh 'docker buildx rm $BUILDX_BUILDER || true'
}
}
}
Loading