mirror of
https://github.com/linuxserver/docker-flexget.git
synced 2026-06-03 09:57:36 +00:00
Compare commits
307
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e38ebcdf7 | ||
|
|
501c30107b | ||
|
|
2f5996fe5a | ||
|
|
a7edcf47f8 | ||
|
|
5d41bc55f1 | ||
|
|
ef22efda45 | ||
|
|
b9aa18d907 | ||
|
|
f6f12b51cf | ||
|
|
176aeaeb89 | ||
|
|
b18e061342 | ||
|
|
af38ae6e6d | ||
|
|
778c54e01f | ||
|
|
b561b658b3 | ||
|
|
48ae0029b9 | ||
|
|
a4d679069d | ||
|
|
6272852e0c | ||
|
|
c366cdd12d | ||
|
|
20fb197845 | ||
|
|
ad26f82cc7 | ||
|
|
c3f16a32b9 | ||
|
|
3327511b8d | ||
|
|
8602e17e27 | ||
|
|
aedb5bd94b | ||
|
|
b0a4f11b47 | ||
|
|
9381467462 | ||
|
|
b0dd1ee5cb | ||
|
|
4f63ccf6a6 | ||
|
|
932f09c065 | ||
|
|
9d4e452aca | ||
|
|
538c6e99e9 | ||
|
|
c1165f3ac3 | ||
|
|
cce280d3ee | ||
|
|
9c1cd8a5b5 | ||
|
|
644e72d1f3 | ||
|
|
a1b355399e | ||
|
|
caf1cb4293 | ||
|
|
40e3676a18 | ||
|
|
677242f24a | ||
|
|
43fd2f5aad | ||
|
|
b5a2608b3c | ||
|
|
e9a3f1b9ad | ||
|
|
6163e88586 | ||
|
|
d2fba4a247 | ||
|
|
52a4d5df27 | ||
|
|
4b001c403a | ||
|
|
c05e987fdc | ||
|
|
959469f776 | ||
|
|
574fd90b47 | ||
|
|
177b0f7e86 | ||
|
|
457d93ba66 | ||
|
|
584bd9d56c | ||
|
|
dad9ec6d21 | ||
|
|
97360ef73e | ||
|
|
ff309f320d | ||
|
|
57a12c039d | ||
|
|
0e4677c903 | ||
|
|
6611d05ada | ||
|
|
10e43e188e | ||
|
|
eb62fca596 | ||
|
|
975086ada6 | ||
|
|
508394ae55 | ||
|
|
2aca825005 | ||
|
|
1f1109d8b0 | ||
|
|
0095bef01c | ||
|
|
fe8d2f3558 | ||
|
|
1692f79634 | ||
|
|
d656d4a913 | ||
|
|
6e57548c1f | ||
|
|
bbb8f05ecb | ||
|
|
d164441da0 | ||
|
|
3fb390f265 | ||
|
|
7df62faf3c | ||
|
|
743257a224 | ||
|
|
481fc23341 | ||
|
|
0b2baa9fc3 | ||
|
|
cc8f7b6614 | ||
|
|
a4aaf57c74 | ||
|
|
9893bb6407 | ||
|
|
6475e3e423 | ||
|
|
213eb70a3b | ||
|
|
3b5210595d | ||
|
|
f69e003444 | ||
|
|
ce563eb6d1 | ||
|
|
eb41328719 | ||
|
|
804154e9ff | ||
|
|
1dc631fb06 | ||
|
|
cb13049727 | ||
|
|
b6313939d7 | ||
|
|
f4eb945573 | ||
|
|
1e6f9e6499 | ||
|
|
173c7ea35d | ||
|
|
7d491935d8 | ||
|
|
4daa3ffa2c | ||
|
|
814b85199c | ||
|
|
cf08cdd238 | ||
|
|
263ff2bf60 | ||
|
|
6a35ea4b9c | ||
|
|
bf6288a533 | ||
|
|
1b55256f14 | ||
|
|
46564c4c24 | ||
|
|
b73f5990cc | ||
|
|
6f3e0e406b | ||
|
|
66283cc09c | ||
|
|
02f03c1928 | ||
|
|
231d0ed7a8 | ||
|
|
95cb1f3406 | ||
|
|
5fc7831629 | ||
|
|
b71e593c8e | ||
|
|
ff3c210f7a | ||
|
|
b4ee744268 | ||
|
|
3446bafc4d | ||
|
|
f1e3b981cb | ||
|
|
308f406da9 | ||
|
|
b764aed863 | ||
|
|
59abf71ebf | ||
|
|
529e8bdc4a | ||
|
|
0efe522110 | ||
|
|
dbbfc2aec0 | ||
|
|
9b2c487e9f | ||
|
|
72770532a8 | ||
|
|
81d993f10f | ||
|
|
94afdab4fb | ||
|
|
52fcc4a80f | ||
|
|
a63a3f3f4b | ||
|
|
3f6a358902 | ||
|
|
7c105be64f | ||
|
|
b6fbe91fb8 | ||
|
|
ce62c3366b | ||
|
|
459800466a | ||
|
|
eed4a02b32 | ||
|
|
62a1970bc1 | ||
|
|
60da318292 | ||
|
|
e098db1281 | ||
|
|
509038ed80 | ||
|
|
5367c99d28 | ||
|
|
0b85d6f03c | ||
|
|
f1d474f522 | ||
|
|
b7eaad01be | ||
|
|
c43924b5b0 | ||
|
|
0b49e8157f | ||
|
|
35712113f0 | ||
|
|
15fd65ca85 | ||
|
|
567f4ffb5b | ||
|
|
54792dabd6 | ||
|
|
a9a6d4eb0c | ||
|
|
1df81c8d51 | ||
|
|
306f05a1d3 | ||
|
|
43c8f134c7 | ||
|
|
1a358c3201 | ||
|
|
7ef4e81d34 | ||
|
|
aeeed33345 | ||
|
|
e315add450 | ||
|
|
9ce3afacef | ||
|
|
b4be92bd5a | ||
|
|
92eae020b0 | ||
|
|
47d3dd3a5f | ||
|
|
9854689145 | ||
|
|
359652caf3 | ||
|
|
5d56c7e272 | ||
|
|
542020c4bf | ||
|
|
38a7cae4f8 | ||
|
|
b3a23a9daf | ||
|
|
41f31f1f3e | ||
|
|
e4a26597f0 | ||
|
|
f331164ad5 | ||
|
|
020ed4527b | ||
|
|
ec6ef7b08f | ||
|
|
560c9ef79e | ||
|
|
d5a264eb96 | ||
|
|
cde2d209fe | ||
|
|
a770fa43f3 | ||
|
|
76bd2b25d1 | ||
|
|
2943f8d5be | ||
|
|
e1fb028b06 | ||
|
|
142fe7139b | ||
|
|
ecfb75cb6e | ||
|
|
a59230af1b | ||
|
|
b10dca5863 | ||
|
|
43f124e323 | ||
|
|
d207db9c58 | ||
|
|
78c4ff8006 | ||
|
|
809d55725c | ||
|
|
f6f94a0165 | ||
|
|
fcfc023325 | ||
|
|
7a8a849c57 | ||
|
|
416839a05f | ||
|
|
e6d2e12bf1 | ||
|
|
be8bc847cb | ||
|
|
10c9f62d63 | ||
|
|
30eea04d07 | ||
|
|
95dba1da00 | ||
|
|
a978f2c412 | ||
|
|
a30f8174ce | ||
|
|
5f0f9b43d4 | ||
|
|
c1dd4b7ade | ||
|
|
ebab1894d9 | ||
|
|
8370bd1ed7 | ||
|
|
0801c345dc | ||
|
|
ed9a88fcf4 | ||
|
|
39a6d79f6b | ||
|
|
ce827fb0e3 | ||
|
|
d26ab76118 | ||
|
|
6abd0f4d8f | ||
|
|
161e1853bf | ||
|
|
df6357089a | ||
|
|
22561580e2 | ||
|
|
0e31103657 | ||
|
|
6df317ac40 | ||
|
|
a36ef59629 | ||
|
|
a249d5cb0f | ||
|
|
9dcb6db2f8 | ||
|
|
0a55cfe085 | ||
|
|
489502c496 | ||
|
|
df59ebb3b3 | ||
|
|
1c33490318 | ||
|
|
6d9fc56ff8 | ||
|
|
8f250328a4 | ||
|
|
2ca523aab8 | ||
|
|
6b4b50a9cd | ||
|
|
b17f83edd7 | ||
|
|
3c88b4d44b | ||
|
|
f073d04e63 | ||
|
|
7de3bd4ae9 | ||
|
|
ec923e9963 | ||
|
|
efcabb3fe8 | ||
|
|
b92e513d3c | ||
|
|
afb3cf426f | ||
|
|
ab3600388c | ||
|
|
6ff7b69d43 | ||
|
|
79c62d8c9f | ||
|
|
14ac74a555 | ||
|
|
c7c2961bf7 | ||
|
|
fbca4133ad | ||
|
|
cf15dc721f | ||
|
|
0331a6c53b | ||
|
|
07da56dc0c | ||
|
|
1cc0c62a0b | ||
|
|
90dd469d8b | ||
|
|
4b368726ea | ||
|
|
0e4864253e | ||
|
|
1bde41304b | ||
|
|
1d32efdb69 | ||
|
|
4106fbe464 | ||
|
|
6d00e66d22 | ||
|
|
007d0bdcd1 | ||
|
|
e8c71452ad | ||
|
|
c70a19eb29 | ||
|
|
124c23fe98 | ||
|
|
713dae12ab | ||
|
|
90575d0a98 | ||
|
|
47b0a869d7 | ||
|
|
36c4dac523 | ||
|
|
88652fcff9 | ||
|
|
bd93807e0c | ||
|
|
78c63ebea8 | ||
|
|
afa9f0ea08 | ||
|
|
b48c13aec6 | ||
|
|
f480a00b67 | ||
|
|
f346a90913 | ||
|
|
4ae1107d98 | ||
|
|
8f8505aa05 | ||
|
|
808b40483e | ||
|
|
b08392b7b9 | ||
|
|
cddf610994 | ||
|
|
65b5b3d2e3 | ||
|
|
0b814db7f6 | ||
|
|
62192d83c9 | ||
|
|
0c6e93aa67 | ||
|
|
c77b064cc0 | ||
|
|
d433468c18 | ||
|
|
9194e9344a | ||
|
|
aa0a5f3a4b | ||
|
|
7cb6f46b47 | ||
|
|
6012321262 | ||
|
|
cfa2fe9418 | ||
|
|
7f5750860b | ||
|
|
c6762ac3c0 | ||
|
|
92a82efa66 | ||
|
|
c8133265d9 | ||
|
|
6cb72d6220 | ||
|
|
a519a68ac8 | ||
|
|
b74d7f5ef9 | ||
|
|
b1ce17e619 | ||
|
|
dee61a29e9 | ||
|
|
3c33086e7c | ||
|
|
b7255a6557 | ||
|
|
536b60bac7 | ||
|
|
f3b5c3a2f1 | ||
|
|
fc41bbdc89 | ||
|
|
99c58fd27d | ||
|
|
f24b8c726a | ||
|
|
f3f6853f56 | ||
|
|
51f656d835 | ||
|
|
9fb505b200 | ||
|
|
7e682953a7 | ||
|
|
9147bb4f6f | ||
|
|
624a2767ec | ||
|
|
94bc8f8a7a | ||
|
|
f8ed76b6d5 | ||
|
|
ef37fbf225 | ||
|
|
f0c79201a0 | ||
|
|
110b0d5ca2 | ||
|
|
cc70423014 | ||
|
|
9d3e129167 | ||
|
|
b641e63fd8 | ||
|
|
723b07fe5e | ||
|
|
7210d45aa6 |
@@ -6,7 +6,7 @@
|
||||
* Read, and fill the Pull Request template
|
||||
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
|
||||
|
||||
## Common files
|
||||
|
||||
@@ -105,10 +105,10 @@ docker build \
|
||||
-t linuxserver/flexget:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord chat support
|
||||
url: https://discord.gg/YWrKVTn
|
||||
url: https://linuxserver.io/discord
|
||||
about: Realtime support / chat with the community and the team.
|
||||
|
||||
- name: Discourse discussion forum
|
||||
|
||||
@@ -8,6 +8,9 @@ on:
|
||||
pull_request_review:
|
||||
types: [submitted,edited,dismissed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
manage-project:
|
||||
permissions:
|
||||
|
||||
@@ -4,6 +4,9 @@ on:
|
||||
- cron: '1 14 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
|
||||
@@ -3,6 +3,9 @@ name: External Trigger Main
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
external-trigger-main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -11,18 +14,31 @@ jobs:
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_FLEXGET_MAIN }}" ]; then
|
||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_FLEXGET_MAIN is set; skipping trigger. ****"
|
||||
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_FLEXGET_MAIN\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
printf "# External trigger for docker-flexget\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^flexget_main_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`flexget_main_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
||||
elif grep -q "^flexget_main" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`flexget_main\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_FLEXGET_MAIN\". ****"
|
||||
echo "External trigger running off of main branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_FLEXGET_MAIN\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**** Retrieving external version ****"
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> External trigger running off of main branch. To disable this trigger, add \`flexget_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/flexget/flexget/releases/latest" | jq -r '. | .tag_name')
|
||||
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^flexget_main_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||
echo "**** Can't retrieve external version, exiting ****"
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="Can't retrieve external version for flexget branch main"
|
||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-flexget/actions/runs/${{ github.run_id }}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
@@ -30,25 +46,43 @@ jobs:
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
exit 1
|
||||
fi
|
||||
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||
echo "**** External version: ${EXT_RELEASE} ****"
|
||||
echo "External version: ${EXT_RELEASE}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**** Retrieving last pushed version ****"
|
||||
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
||||
image="linuxserver/flexget"
|
||||
tag="latest"
|
||||
token=$(curl -sX GET \
|
||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fflexget%3Apull" \
|
||||
| jq -r '.token')
|
||||
multidigest=$(curl -s \
|
||||
multidigest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Accept: application/vnd.oci.image.index.v1+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}")
|
||||
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
||||
# If there's a layer element it's a single-arch manifest so just get that digest
|
||||
digest=$(jq -r '.config.digest' <<< "${multidigest}")
|
||||
else
|
||||
# Otherwise it's multi-arch or has manifest annotations
|
||||
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
||||
# Check for manifest annotations and delete if found
|
||||
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
|
||||
fi
|
||||
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
|
||||
# If there's still more than one digest, it's multi-arch
|
||||
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
|
||||
else
|
||||
# Otherwise it's single arch
|
||||
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
|
||||
fi
|
||||
if digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||
| jq -r 'first(.manifests[].digest)')
|
||||
digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
||||
| jq -r '.config.digest')
|
||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
|
||||
digest=$(jq -r '.config.digest' <<< "${digest}");
|
||||
fi
|
||||
fi
|
||||
image_info=$(curl -sL \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
||||
@@ -60,45 +94,54 @@ jobs:
|
||||
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
|
||||
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
|
||||
if [ -z "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Can't retrieve last pushed version, exiting ****"
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="Can't retrieve last pushed version for flexget tag latest"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
exit 1
|
||||
fi
|
||||
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
||||
echo "Last pushed version: ${IMAGE_VERSION}" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||
echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
||||
echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
||||
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
else
|
||||
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||
echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/main/buildWithParameters?PACKAGE_CHECK=false \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**** Attempting to change the Jenkins job description ****"
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for flexget tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if [[ "${artifacts_found}" == "false" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="New version ${EXT_RELEASE} for flexget tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
else
|
||||
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||
if [[ "${artifacts_found}" == "true" ]]; then
|
||||
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/main/buildWithParameters?PACKAGE_CHECK=false \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for flexget tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -5,6 +5,9 @@ on:
|
||||
- cron: '48 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
external-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -15,31 +18,31 @@ jobs:
|
||||
|
||||
- name: External Trigger Scheduler
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
printf "# External trigger scheduler for docker-flexget\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
|
||||
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
if [[ "${br}" == "HEAD" ]]; then
|
||||
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
continue
|
||||
fi
|
||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/jenkins-vars.yml)
|
||||
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
||||
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
||||
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
||||
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
|
||||
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-flexget/actions/workflows/external_trigger.yml/dispatches
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} is either a dev branch, or has no external version; skipping trigger. ****"
|
||||
echo "Skipping branch ${br} due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
||||
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -2,8 +2,14 @@ name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Package Trigger Main
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_FLEXGET_MAIN }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_FLEXGET_MAIN is set; skipping trigger. ****"
|
||||
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_FLEXGET_MAIN\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of main branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_FLEXGET_MAIN\". ****"
|
||||
echo "Package trigger running off of main branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_FLEXGET_MAIN\`" >> $GITHUB_STEP_SUMMARY
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/main/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**** Attempting to change the Jenkins job description ****"
|
||||
curl -iX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
@@ -5,6 +5,9 @@ on:
|
||||
- cron: '4 19 * * 4'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
package-trigger-scheduler:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -14,37 +17,87 @@ jobs:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Package Trigger Scheduler
|
||||
env:
|
||||
SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }}
|
||||
run: |
|
||||
echo "**** Branches found: ****"
|
||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||
printf "# Package trigger scheduler for docker-flexget\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
|
||||
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
|
||||
do
|
||||
br=$(echo "$br" | sed 's|origin/||g')
|
||||
echo "**** Evaluating branch ${br} ****"
|
||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/jenkins-vars.yml | yq -r '.ls_branch')
|
||||
if [ "${br}" == "${ls_branch}" ]; then
|
||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
triggered_branches="${triggered_branches}${br} "
|
||||
curl -iX POST \
|
||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||
https://api.github.com/repos/linuxserver/docker-flexget/actions/workflows/package_trigger.yml/dispatches
|
||||
sleep 30
|
||||
if [[ "${br}" == "HEAD" ]]; then
|
||||
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
continue
|
||||
fi
|
||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/jenkins-vars.yml)
|
||||
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/Jenkinsfile >/dev/null 2>&1; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-flexget/${br}/readme-vars.yml)
|
||||
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif grep -q "^flexget_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`flexget_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
else
|
||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
printf "> To disable, add \`flexget_%s\` into the Github organizational variable \`SKIP_PACKAGE_TRIGGER\`.\n\n" "${br}" >> $GITHUB_STEP_SUMMARY
|
||||
triggered_branches="${triggered_branches}${br} "
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-flexget/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
if [[ -z "${response}" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Jenkins build could not be triggered. Skipping branch."
|
||||
continue
|
||||
fi
|
||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
sleep 10
|
||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||
buildurl="${buildurl%$'\r'}"
|
||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||
if ! curl -ifX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Unable to change the Jenkins job description."
|
||||
fi
|
||||
sleep 20
|
||||
fi
|
||||
else
|
||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
done
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) Triggered for flexget** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-flexget/activity/"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
||||
if [[ -n "${triggered_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
||||
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-flexget/activity/ \n"
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
fi
|
||||
if [[ -n "${skipped_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
|
||||
fi
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) for flexget** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
fi
|
||||
|
||||
@@ -5,6 +5,8 @@ on:
|
||||
- '**/run'
|
||||
- '**/finish'
|
||||
- '**/check'
|
||||
- 'root/migrations/*'
|
||||
|
||||
jobs:
|
||||
permission_check:
|
||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||
|
||||
+23
-20
@@ -1,10 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/unrar:latest as unrar
|
||||
FROM ghcr.io/linuxserver/unrar:latest AS unrar
|
||||
|
||||
FROM ghcr.io/by275/libtorrent:2-alpine3.19 as libtorrent
|
||||
FROM ghcr.io/by275/libtorrent:2-alpine3.22 AS libtorrent
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.19
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.9.8 /uv /uvx /bin/
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
@@ -15,7 +17,11 @@ LABEL maintainer="thespad"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config" \
|
||||
PYTHONIOENCODING=utf-8
|
||||
PYTHONIOENCODING=utf-8 \
|
||||
TMPDIR=/run/flexget-temp \
|
||||
UV_PROJECT_ENVIRONMENT=/lsiopy \
|
||||
UV_COMPILE_BYTECODE=1 \
|
||||
UV_LINK_MODE=copy
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
@@ -25,8 +31,8 @@ RUN \
|
||||
python3-dev && \
|
||||
apk add -U --update --no-cache \
|
||||
7zip \
|
||||
boost1.82-system \
|
||||
boost1.82-python3 \
|
||||
boost1.84-system \
|
||||
boost1.84-python3 \
|
||||
libstdc++ \
|
||||
nodejs \
|
||||
python3 && \
|
||||
@@ -35,23 +41,20 @@ RUN \
|
||||
FLEXGET_VERSION=$(curl -s https://api.github.com/repos/flexget/flexget/releases/latest \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
mkdir -p /tmp/flexget && \
|
||||
mkdir -p /run/flexget-temp /data && \
|
||||
mkdir -p /app/flexget && \
|
||||
curl -o \
|
||||
/tmp/flexget.tar.gz -L \
|
||||
"https://github.com/flexget/flexget/releases/download/${FLEXGET_VERSION}/FlexGet-${FLEXGET_VERSION#v}.tar.gz" && \
|
||||
"https://github.com/Flexget/Flexget/archive/refs/tags/${FLEXGET_VERSION}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/flexget.tar.gz -C \
|
||||
/tmp/flexget --strip-components=1 && \
|
||||
cd /tmp/flexget && \
|
||||
python3 -m venv /lsiopy && \
|
||||
pip install -U --no-cache-dir \
|
||||
pip \
|
||||
wheel && \
|
||||
pip install -U --no-cache --find-links https://wheel-index.linuxserver.io/alpine-3.19/ \
|
||||
click \
|
||||
flexget==${FLEXGET_VERSION#v} \
|
||||
requests \
|
||||
-r requirements-docker.txt && \
|
||||
/app/flexget --strip-components=1 && \
|
||||
cd /app/flexget && \
|
||||
uv venv /lsiopy && \
|
||||
uv run scripts/bundle_webui.py && \
|
||||
uv sync --frozen --no-dev --no-cache --group=all && \
|
||||
uv pip install pip && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
@@ -61,7 +64,7 @@ RUN \
|
||||
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/
|
||||
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.11 /lsiopy/lib/python3.11
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
+23
-20
@@ -1,10 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/unrar:arm64v8-latest as unrar
|
||||
FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar
|
||||
|
||||
FROM ghcr.io/by275/libtorrent:2-alpine3.19 as libtorrent
|
||||
FROM ghcr.io/by275/libtorrent:2-alpine3.22 AS libtorrent
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.22
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.9.8 /uv /uvx /bin/
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
@@ -15,7 +17,11 @@ LABEL maintainer="thespad"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config" \
|
||||
PYTHONIOENCODING=utf-8
|
||||
PYTHONIOENCODING=utf-8 \
|
||||
TMPDIR=/run/flexget-temp \
|
||||
UV_PROJECT_ENVIRONMENT=/lsiopy \
|
||||
UV_COMPILE_BYTECODE=1 \
|
||||
UV_LINK_MODE=copy
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
@@ -25,8 +31,8 @@ RUN \
|
||||
python3-dev && \
|
||||
apk add -U --update --no-cache \
|
||||
7zip \
|
||||
boost1.82-system \
|
||||
boost1.82-python3 \
|
||||
boost1.84-system \
|
||||
boost1.84-python3 \
|
||||
libstdc++ \
|
||||
nodejs \
|
||||
python3 && \
|
||||
@@ -35,23 +41,20 @@ RUN \
|
||||
FLEXGET_VERSION=$(curl -s https://api.github.com/repos/flexget/flexget/releases/latest \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
mkdir -p /tmp/flexget && \
|
||||
mkdir -p /run/flexget-temp /data && \
|
||||
mkdir -p /app/flexget && \
|
||||
curl -o \
|
||||
/tmp/flexget.tar.gz -L \
|
||||
"https://github.com/flexget/flexget/releases/download/${FLEXGET_VERSION}/FlexGet-${FLEXGET_VERSION#v}.tar.gz" && \
|
||||
"https://github.com/Flexget/Flexget/archive/refs/tags/${FLEXGET_VERSION}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/flexget.tar.gz -C \
|
||||
/tmp/flexget --strip-components=1 && \
|
||||
cd /tmp/flexget && \
|
||||
python3 -m venv /lsiopy && \
|
||||
pip install -U --no-cache-dir \
|
||||
pip \
|
||||
wheel && \
|
||||
pip install -U --no-cache --find-links https://wheel-index.linuxserver.io/alpine-3.19/ \
|
||||
click \
|
||||
flexget==${FLEXGET_VERSION#v} \
|
||||
requests \
|
||||
-r requirements-docker.txt && \
|
||||
/app/flexget --strip-components=1 && \
|
||||
cd /app/flexget && \
|
||||
uv venv /lsiopy && \
|
||||
uv run scripts/bundle_webui.py && \
|
||||
uv sync --frozen --no-dev --no-cache --group=all && \
|
||||
uv pip install pip && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
@@ -61,7 +64,7 @@ RUN \
|
||||
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/
|
||||
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.11 /lsiopy/lib/python3.11
|
||||
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
Vendored
+481
-248
@@ -8,7 +8,7 @@ pipeline {
|
||||
}
|
||||
// Input to determine if this is a package check
|
||||
parameters {
|
||||
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
|
||||
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
|
||||
}
|
||||
// Configuration for the variables used for this specific repo
|
||||
environment {
|
||||
@@ -17,6 +17,8 @@ pipeline {
|
||||
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
|
||||
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
|
||||
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
|
||||
EXT_GIT_BRANCH = 'master'
|
||||
EXT_USER = 'flexget'
|
||||
EXT_REPO = 'flexget'
|
||||
@@ -34,22 +36,50 @@ pipeline {
|
||||
CI_PORT='5050'
|
||||
CI_SSL='false'
|
||||
CI_DELAY='120'
|
||||
CI_DOCKERENV='TZ=US/Pacific'
|
||||
CI_AUTH='user:password'
|
||||
CI_DOCKERENV='TZ=Europe/London'
|
||||
CI_AUTH=''
|
||||
CI_WEBPATH=''
|
||||
}
|
||||
stages {
|
||||
stage("Set git config"){
|
||||
steps{
|
||||
sh '''#!/bin/bash
|
||||
cat ${GIT_SIGNING_KEY} > /config/.ssh/id_sign
|
||||
chmod 600 /config/.ssh/id_sign
|
||||
ssh-keygen -y -f /config/.ssh/id_sign > /config/.ssh/id_sign.pub
|
||||
echo "Using $(ssh-keygen -lf /config/.ssh/id_sign) to sign commits"
|
||||
git config --global gpg.format ssh
|
||||
git config --global user.signingkey /config/.ssh/id_sign
|
||||
git config --global commit.gpgsign true
|
||||
'''
|
||||
}
|
||||
}
|
||||
// Setup all the basic environment variables needed for the build
|
||||
stage("Set ENV Variables base"){
|
||||
steps{
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
sh '''#! /bin/bash
|
||||
containers=$(docker ps -aq)
|
||||
echo "Pruning builder"
|
||||
docker builder prune -f --builder container || :
|
||||
containers=$(docker ps -q)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
||||
for container in ${containers}; do
|
||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
||||
echo "skipping buildx container in docker stop"
|
||||
else
|
||||
echo "Stopping container ${container}"
|
||||
docker stop ${container}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
docker system prune -af --volumes || : '''
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.CI_TEST_ATTEMPTED = ''
|
||||
env.PUSH_ATTEMPTED = ''
|
||||
env.LS_RELEASE = sh(
|
||||
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' || : ''',
|
||||
returnStdout: true).trim()
|
||||
@@ -68,8 +98,12 @@ pipeline {
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||
env.PULL_REQUEST = env.CHANGE_ID
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml ./root/donate.txt'
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./root/donate.txt'
|
||||
if ( env.SYFT_IMAGE_TAG == null ) {
|
||||
env.SYFT_IMAGE_TAG = 'latest'
|
||||
}
|
||||
}
|
||||
echo "Using syft image tag ${SYFT_IMAGE_TAG}"
|
||||
sh '''#! /bin/bash
|
||||
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
|
||||
script{
|
||||
@@ -185,6 +219,8 @@ pipeline {
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
env.CITEST_IMAGETAG = 'latest'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +245,8 @@ pipeline {
|
||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
env.CITEST_IMAGETAG = 'develop'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,6 +271,8 @@ pipeline {
|
||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
env.CITEST_IMAGETAG = 'develop'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +295,7 @@ pipeline {
|
||||
-v ${WORKSPACE}:/mnt \
|
||||
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
||||
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
||||
ghcr.io/linuxserver/baseimage-alpine:3.19 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||
ghcr.io/linuxserver/baseimage-alpine:3.23 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||
apk add --no-cache python3 && \
|
||||
python3 -m venv /lsiopy && \
|
||||
pip install --no-cache-dir -U pip && \
|
||||
@@ -305,7 +345,7 @@ pipeline {
|
||||
echo "Jenkinsfile is up to date."
|
||||
fi
|
||||
echo "Starting Stage 2 - Delete old templates"
|
||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml Dockerfile.armhf"
|
||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml .github/workflows/package_trigger.yml"
|
||||
for i in ${OLD_TEMPLATES}; do
|
||||
if [[ -f "${i}" ]]; then
|
||||
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||
@@ -329,6 +369,35 @@ pipeline {
|
||||
else
|
||||
echo "No templates to delete"
|
||||
fi
|
||||
echo "Starting Stage 2.5 - Update init diagram"
|
||||
if ! grep -q 'init_diagram:' readme-vars.yml; then
|
||||
echo "Adding the key 'init_diagram' to readme-vars.yml"
|
||||
sed -i '\\|^#.*changelog.*$|d' readme-vars.yml
|
||||
sed -i 's|^changelogs:|# init diagram\\ninit_diagram:\\n\\n# changelog\\nchangelogs:|' readme-vars.yml
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/d2
|
||||
docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:latest
|
||||
ls -al ${TEMPDIR}/d2
|
||||
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-latest.d2\\")" readme-vars.yml
|
||||
if [[ $(md5sum readme-vars.yml | cut -c1-8) != $(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/readme-vars.yml | cut -c1-8) ]]; then
|
||||
echo "'init_diagram' has been updated. Updating repo and exiting build, new one will trigger based on commit."
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f main
|
||||
cp ${WORKSPACE}/readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/readme-vars.yml
|
||||
git add readme-vars.yml
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
exit 0
|
||||
else
|
||||
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Init diagram is unchanged"
|
||||
fi
|
||||
echo "Starting Stage 3 - Update templates"
|
||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
@@ -362,7 +431,7 @@ pipeline {
|
||||
fi
|
||||
echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub"
|
||||
mkdir -p ${TEMPDIR}/docs
|
||||
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
|
||||
git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
|
||||
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
|
||||
cd ${TEMPDIR}/docs/docker-documentation
|
||||
@@ -380,8 +449,8 @@ pipeline {
|
||||
echo "Docs update not needed, skipping"
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/unraid
|
||||
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
|
||||
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||
git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
|
||||
git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
|
||||
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
|
||||
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
|
||||
@@ -391,16 +460,14 @@ pipeline {
|
||||
echo "Updating Unraid template"
|
||||
cd ${TEMPDIR}/unraid/templates/
|
||||
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
|
||||
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||
if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
|
||||
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add -u unraid/${CONTAINER_NAME}.xml
|
||||
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||
else
|
||||
echo "Image is on the ignore list, but no template exist, skipping deprecation"
|
||||
fi
|
||||
if grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
|
||||
echo "Image is on the ignore list, and already in the deprecation folder."
|
||||
elif grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add -u unraid/${CONTAINER_NAME}.xml
|
||||
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||
else
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add unraid/${CONTAINER_NAME}.xml
|
||||
@@ -488,10 +555,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
/* #######################
|
||||
GitLab Mirroring
|
||||
GitLab Mirroring and Quay.io Repo Visibility
|
||||
####################### */
|
||||
// Ping into Gitlab to mirror this repo and have a registry endpoint
|
||||
stage("GitLab Mirror"){
|
||||
// Ping into Gitlab to mirror this repo and have a registry endpoint & mark this repo on Quay.io as public
|
||||
stage("GitLab Mirror and Quay.io Visibility"){
|
||||
when {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
@@ -507,6 +574,8 @@ pipeline {
|
||||
"visibility":"public"}' '''
|
||||
sh '''curl -H "Private-Token: ${GITLAB_TOKEN}" -X PUT "https://gitlab.com/api/v4/projects/Linuxserver.io%2F${LS_REPO}" \
|
||||
-d "mirror=true&import_url=https://github.com/linuxserver/${LS_REPO}.git" '''
|
||||
sh '''curl -H "Content-Type: application/json" -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" -X POST "https://quay.io/api/v1/repository${QUAYIMAGE/quay.io/}/changevisibility" \
|
||||
-d '{"visibility":"public"}' ||: '''
|
||||
}
|
||||
}
|
||||
/* ###############
|
||||
@@ -537,7 +606,45 @@ pipeline {
|
||||
--label \"org.opencontainers.image.title=Flexget\" \
|
||||
--label \"org.opencontainers.image.description=[Flexget](http://flexget.com/) is a multipurpose automation tool for all of your media.\" \
|
||||
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
declare -A pids
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
pids[$!]="$i"
|
||||
done
|
||||
for p in "${!pids[@]}"; do
|
||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Build MultiArch Docker containers for push to LS Repo
|
||||
@@ -568,7 +675,45 @@ pipeline {
|
||||
--label \"org.opencontainers.image.title=Flexget\" \
|
||||
--label \"org.opencontainers.image.description=[Flexget](http://flexget.com/) is a multipurpose automation tool for all of your media.\" \
|
||||
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
declare -A pids
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
pids[$!]="$i"
|
||||
done
|
||||
for p in "${!pids[@]}"; do
|
||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build ARM64') {
|
||||
@@ -577,10 +722,6 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
echo 'Logging into Github'
|
||||
sh '''#! /bin/bash
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
'''
|
||||
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
|
||||
sh "docker buildx build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
@@ -596,17 +737,52 @@ pipeline {
|
||||
--label \"org.opencontainers.image.title=Flexget\" \
|
||||
--label \"org.opencontainers.image.description=[Flexget](http://flexget.com/) is a multipurpose automation tool for all of your media.\" \
|
||||
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
retry(5) {
|
||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
declare -A pids
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
pids[$!]="$i"
|
||||
done
|
||||
for p in "${!pids[@]}"; do
|
||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
sh '''#! /bin/bash
|
||||
containers=$(docker ps -aq)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
fi
|
||||
docker system prune -af --volumes || : '''
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -631,7 +807,7 @@ pipeline {
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-v ${TEMPDIR}:/tmp \
|
||||
ghcr.io/anchore/syft:latest \
|
||||
ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \
|
||||
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
|
||||
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
||||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||
@@ -707,21 +883,31 @@ pipeline {
|
||||
script{
|
||||
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
||||
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
|
||||
env.CI_TEST_ATTEMPTED = 'true'
|
||||
}
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
docker pull ghcr.io/linuxserver/ci:latest
|
||||
if grep -q 'docker-baseimage' <<< "${LS_REPO}"; then
|
||||
echo "Detected baseimage, setting LSIO_FIRST_PARTY=true"
|
||||
if [ -n "${CI_DOCKERENV}" ]; then
|
||||
CI_DOCKERENV="LSIO_FIRST_PARTY=true|${CI_DOCKERENV}"
|
||||
else
|
||||
CI_DOCKERENV="LSIO_FIRST_PARTY=true"
|
||||
fi
|
||||
fi
|
||||
docker pull ghcr.io/linuxserver/ci:${CITEST_IMAGETAG}
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
|
||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||
fi
|
||||
docker run --rm \
|
||||
--shm-size=1gb \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e IMAGE=\"${IMAGE}\" \
|
||||
-e DELAY_START=\"${CI_DELAY}\" \
|
||||
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
|
||||
-e TAGS=\"${CI_TAGS}\" \
|
||||
-e META_TAG=\"${META_TAG}\" \
|
||||
-e RELEASE_TAG=\"latest\" \
|
||||
-e PORT=\"${CI_PORT}\" \
|
||||
-e SSL=\"${CI_SSL}\" \
|
||||
-e BASE=\"${DIST_IMAGE}\" \
|
||||
@@ -731,7 +917,11 @@ pipeline {
|
||||
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
||||
-e WEB_AUTH=\"${CI_AUTH}\" \
|
||||
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||
-t ghcr.io/linuxserver/ci:latest \
|
||||
-e NODE_NAME=\"${NODE_NAME}\" \
|
||||
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
|
||||
-e COMMIT_SHA=\"${COMMIT_SHA}\" \
|
||||
-e BUILD_NUMBER=\"${BUILD_NUMBER}\" \
|
||||
-t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \
|
||||
python3 test_build.py'''
|
||||
}
|
||||
}
|
||||
@@ -746,37 +936,28 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry(5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
docker push ${PUSHIMAGE}:latest
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
script{
|
||||
env.PUSH_ATTEMPTED = 'true'
|
||||
}
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
for PUSHIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
[[ ${PUSHIMAGE%%/*} =~ \\. ]] && PUSHIMAGEPLUS="${PUSHIMAGE}" || PUSHIMAGEPLUS="docker.io/${PUSHIMAGE}"
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
if [[ "${PUSHIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:latest -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -787,79 +968,48 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry(5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [ "${CI}" == "false" ]; then
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||
script{
|
||||
env.PUSH_ATTEMPTED = 'true'
|
||||
}
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
if [[ "${MANIFESTIMAGE%%/*}" =~ \\. ]]; then
|
||||
MANIFESTIMAGEPLUS="${MANIFESTIMAGE}"
|
||||
else
|
||||
MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
|
||||
fi
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-latest
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
||||
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||
fi
|
||||
token=$(curl -sX GET "https://ghcr.io/token?scope=repository%3Alinuxserver%2F${CONTAINER_NAME}%3Apull" | jq -r '.token')
|
||||
digest=$(curl -s \
|
||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--header "Authorization: Bearer ${token}" \
|
||||
"https://ghcr.io/v2/linuxserver/${CONTAINER_NAME}/manifests/arm32v7-latest")
|
||||
if [[ $(echo "$digest" | jq -r '.layers') != "null" ]]; then
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-latest || :
|
||||
docker manifest create ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:amd64-latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-latest
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||
fi
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-latest -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-latest -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
fi
|
||||
done
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -874,23 +1024,41 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
echo "Pushing New tag for current commit ${META_TAG}"
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "main",\
|
||||
"name": "'${META_TAG}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||
echo "Auto-generating release notes"
|
||||
if [ "$(git tag --points-at HEAD)" != "" ]; then
|
||||
echo "Existing tag points to current commit, suggesting no new LS changes"
|
||||
AUTO_RELEASE_NOTES="No changes"
|
||||
else
|
||||
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
|
||||
-d '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "main"}' \
|
||||
| jq -r '.body' | sed 's|## What.s Changed||')
|
||||
fi
|
||||
echo "Pushing New tag for current commit ${META_TAG}"
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
|
||||
echo "Pushing New release for Tag"
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json
|
||||
jq -n \
|
||||
--arg tag_name "$META_TAG" \
|
||||
--arg target_commitish "main" \
|
||||
--arg ci_url "${CI_URL:-N/A}" \
|
||||
--arg ls_notes "$AUTO_RELEASE_NOTES" \
|
||||
--arg remote_notes "$(cat releasebody.json)" \
|
||||
'{
|
||||
"tag_name": $tag_name,
|
||||
"target_commitish": $target_commitish,
|
||||
"name": $tag_name,
|
||||
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
|
||||
"draft": false,
|
||||
"prerelease": false }' > releasebody.json.done
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
|
||||
'''
|
||||
}
|
||||
}
|
||||
// Add protection to the release branch
|
||||
@@ -928,116 +1096,181 @@ EOF
|
||||
) '''
|
||||
}
|
||||
}
|
||||
// If this is a Pull request send the CI link as a comment on it
|
||||
stage('Pull Request Comment') {
|
||||
when {
|
||||
not {environment name: 'CHANGE_ID', value: ''}
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
# Function to retrieve JSON data from URL
|
||||
get_json() {
|
||||
local url="$1"
|
||||
local response=$(curl -s "$url")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to retrieve JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
local json=$(echo "$response" | jq .)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to parse JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
echo "$json"
|
||||
}
|
||||
|
||||
build_table() {
|
||||
local data="$1"
|
||||
|
||||
# Get the keys in the JSON data
|
||||
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
|
||||
|
||||
# Check if keys are empty
|
||||
if [ -z "$keys" ]; then
|
||||
echo "JSON report data does not contain any keys or the report does not exist."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build table header
|
||||
local header="| Tag | Passed |\\n| --- | --- |\\n"
|
||||
|
||||
# Loop through the JSON data to build the table rows
|
||||
local rows=""
|
||||
for build in $keys; do
|
||||
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
|
||||
if [ "$status" = "true" ]; then
|
||||
status="✅"
|
||||
else
|
||||
status="❌"
|
||||
fi
|
||||
local row="| "$build" | "$status" |\\n"
|
||||
rows="${rows}${row}"
|
||||
done
|
||||
|
||||
local table="${header}${rows}"
|
||||
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
|
||||
echo "$escaped_table"
|
||||
}
|
||||
|
||||
if [[ "${CI}" = "true" ]]; then
|
||||
# Retrieve JSON data from URL
|
||||
data=$(get_json "$CI_JSON_URL")
|
||||
# Create table from JSON data
|
||||
table=$(build_table "$data")
|
||||
echo -e "$table"
|
||||
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
|
||||
else
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
|
||||
fi
|
||||
'''
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ######################
|
||||
Send status to Discord
|
||||
Comment on PR and Send status to Discord
|
||||
###################### */
|
||||
post {
|
||||
always {
|
||||
script{
|
||||
script {
|
||||
env.JOB_DATE = sh(
|
||||
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
|
||||
returnStdout: true).trim()
|
||||
if (env.EXIT_STATUS == "ABORTED"){
|
||||
sh 'echo "build aborted"'
|
||||
}
|
||||
else if (currentBuild.currentResult == "SUCCESS"){
|
||||
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\
|
||||
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
|
||||
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
|
||||
}
|
||||
else {
|
||||
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\
|
||||
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
|
||||
}else{
|
||||
if (currentBuild.currentResult == "SUCCESS"){
|
||||
if (env.GITHUBIMAGE =~ /lspipepr/){
|
||||
env.JOB_WEBHOOK_STATUS='Success'
|
||||
env.JOB_WEBHOOK_COLOUR=3957028
|
||||
env.JOB_WEBHOOK_FOOTER='PR Build'
|
||||
}else if (env.GITHUBIMAGE =~ /lsiodev/){
|
||||
env.JOB_WEBHOOK_STATUS='Success'
|
||||
env.JOB_WEBHOOK_COLOUR=3957028
|
||||
env.JOB_WEBHOOK_FOOTER='Dev Build'
|
||||
}else{
|
||||
env.JOB_WEBHOOK_STATUS='Success'
|
||||
env.JOB_WEBHOOK_COLOUR=1681177
|
||||
env.JOB_WEBHOOK_FOOTER='Live Build'
|
||||
}
|
||||
}else{
|
||||
if (env.GITHUBIMAGE =~ /lspipepr/){
|
||||
env.JOB_WEBHOOK_STATUS='Failure'
|
||||
env.JOB_WEBHOOK_COLOUR=12669523
|
||||
env.JOB_WEBHOOK_FOOTER='PR Build'
|
||||
}else if (env.GITHUBIMAGE =~ /lsiodev/){
|
||||
env.JOB_WEBHOOK_STATUS='Failure'
|
||||
env.JOB_WEBHOOK_COLOUR=12669523
|
||||
env.JOB_WEBHOOK_FOOTER='Dev Build'
|
||||
}else{
|
||||
env.JOB_WEBHOOK_STATUS='Failure'
|
||||
env.JOB_WEBHOOK_COLOUR=16711680
|
||||
env.JOB_WEBHOOK_FOOTER='Live Build'
|
||||
}
|
||||
}
|
||||
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"'color'": '${JOB_WEBHOOK_COLOUR}',\
|
||||
"footer": {"text" : "'"${JOB_WEBHOOK_FOOTER}"'"},\
|
||||
"timestamp": "'${JOB_DATE}'",\
|
||||
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** '${JOB_WEBHOOK_STATUS}'\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
|
||||
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
|
||||
}
|
||||
}
|
||||
script {
|
||||
if (env.GITHUBIMAGE =~ /lspipepr/){
|
||||
if (env.CI_TEST_ATTEMPTED == "true" || env.PUSH_ATTEMPTED == "true"){
|
||||
sh '''#! /bin/bash
|
||||
# Function to retrieve JSON data from URL
|
||||
get_json() {
|
||||
local url="$1"
|
||||
local response=$(curl -s "$url")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to retrieve JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
local json=$(echo "$response" | jq .)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to parse JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
echo "$json"
|
||||
}
|
||||
|
||||
build_table() {
|
||||
local data="$1"
|
||||
|
||||
# Get the keys in the JSON data
|
||||
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
|
||||
|
||||
# Check if keys are empty
|
||||
if [ -z "$keys" ]; then
|
||||
echo "JSON report data does not contain any keys or the report does not exist."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build table header
|
||||
local header="| Tag | Passed |\\n| --- | --- |\\n"
|
||||
|
||||
# Loop through the JSON data to build the table rows
|
||||
local rows=""
|
||||
for build in $keys; do
|
||||
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
|
||||
if [ "$status" = "true" ]; then
|
||||
status="✅"
|
||||
else
|
||||
status="❌"
|
||||
fi
|
||||
local row="| "$build" | "$status" |\\n"
|
||||
rows="${rows}${row}"
|
||||
done
|
||||
|
||||
local table="${header}${rows}"
|
||||
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
|
||||
echo "$escaped_table"
|
||||
}
|
||||
|
||||
if [[ "${CI}" = "true" ]]; then
|
||||
# Retrieve JSON data from URL
|
||||
data=$(get_json "$CI_JSON_URL")
|
||||
# Create table from JSON data
|
||||
table=$(build_table "$data")
|
||||
echo -e "$table"
|
||||
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR for commit ${COMMIT_SHA:0:7} : \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
|
||||
else
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR for commit ${COMMIT_SHA:0:7} : \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
|
||||
fi
|
||||
'''
|
||||
} else {
|
||||
sh '''#! /bin/bash
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, the build for PR commit ${COMMIT_SHA:0:7} failed and as a result no CI test was attempted and no images were pushed.\\"}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
sh '''#!/bin/bash
|
||||
rm -rf /config/.ssh/id_sign
|
||||
rm -rf /config/.ssh/id_sign.pub
|
||||
git config --global --unset gpg.format
|
||||
git config --global --unset user.signingkey
|
||||
git config --global --unset commit.gpgsign
|
||||
'''
|
||||
}
|
||||
cleanup {
|
||||
sh '''#! /bin/bash
|
||||
echo "Performing docker system prune!!"
|
||||
containers=$(docker ps -aq)
|
||||
echo "Pruning builder!!"
|
||||
docker builder prune -f --builder container || :
|
||||
containers=$(docker ps -q)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
||||
for container in ${containers}; do
|
||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
||||
echo "skipping buildx container in docker stop"
|
||||
else
|
||||
echo "Stopping container ${container}"
|
||||
docker stop ${container}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
docker system prune -af --volumes || :
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def retry_backoff(int max_attempts, int power_base, Closure c) {
|
||||
int n = 0
|
||||
while (n < max_attempts) {
|
||||
try {
|
||||
c()
|
||||
return
|
||||
} catch (err) {
|
||||
if ((n + 1) >= max_attempts) {
|
||||
throw err
|
||||
}
|
||||
sleep(power_base ** n)
|
||||
n++
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
[](https://linuxserver.io)
|
||||
|
||||
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
||||
[](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
|
||||
[](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
|
||||
[](https://discourse.linuxserver.io "post on our community forum.")
|
||||
[](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
|
||||
[](https://github.com/linuxserver "view the source for all of our repositories.")
|
||||
[](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
|
||||
|
||||
@@ -20,15 +19,14 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r
|
||||
Find us at:
|
||||
|
||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
||||
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
|
||||
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
|
||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
||||
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
|
||||
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
||||
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
||||
|
||||
# [linuxserver/flexget](https://github.com/linuxserver/docker-flexget)
|
||||
|
||||
[](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fflexget)
|
||||
[](https://scarf.sh)
|
||||
[](https://github.com/linuxserver/docker-flexget)
|
||||
[](https://github.com/linuxserver/docker-flexget/releases)
|
||||
[](https://github.com/linuxserver/docker-flexget/packages)
|
||||
@@ -55,7 +53,6 @@ The architectures supported by this image are:
|
||||
| :----: | :----: | ---- |
|
||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||
| armhf | ❌ | |
|
||||
|
||||
## Application Setup
|
||||
|
||||
@@ -65,16 +62,21 @@ See the [FlexGet website](https://flexget.com/) for more information.
|
||||
|
||||
### Download folders
|
||||
|
||||
We have set `/data` as an ***optional path***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content.
|
||||
We have set `/data` as an ***optional path***, this is because it is the easiest way to get started.
|
||||
|
||||
Use the optional paths if you don't understand, or don't want hardlinks/atomic moves.
|
||||
|
||||
The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this.
|
||||
## Read-Only Operation
|
||||
|
||||
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
|
||||
|
||||
## Usage
|
||||
|
||||
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
|
||||
|
||||
>[!NOTE]
|
||||
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
|
||||
|
||||
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
```yaml
|
||||
@@ -124,7 +126,7 @@ Containers are configured using parameters passed at runtime (such as those abov
|
||||
|
||||
| Parameter | Function |
|
||||
| :----: | --- |
|
||||
| `-p 5050` | HTTP port for the WebUI. |
|
||||
| `-p 5050:5050` | HTTP port for the WebUI. |
|
||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
|
||||
@@ -134,6 +136,7 @@ Containers are configured using parameters passed at runtime (such as those abov
|
||||
| `-e FG_WEBUI_PASSWORD=info` | Set the FlexGet webui password. Pay attention to Bash/YAML reserved characters. |
|
||||
| `-v /config` | Local path for FlexGet config files. |
|
||||
| `-v /data` | Default path for downloads. |
|
||||
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
@@ -271,7 +274,8 @@ Below are the instructions for updating containers:
|
||||
|
||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
||||
|
||||
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
>[!TIP]
|
||||
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
|
||||
## Building locally
|
||||
|
||||
@@ -286,16 +290,21 @@ docker build \
|
||||
-t lscr.io/linuxserver/flexget:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Versions
|
||||
|
||||
* **10.11.25:** - Rebase to Alpine 3.22.
|
||||
* **17.10.25:** - Add pip to enable [universal-package-install mod](https://github.com/linuxserver/docker-mods/tree/universal-package-install).
|
||||
* **18.09.24:** - Suppress creation of empty log file when WebUI password is set.
|
||||
* **17.08.24:** - Revert to Alpine 3.20 due to 1st party plugin incompatibility with Python 3.12.
|
||||
* **19.06.24:** - Rebase to Alpine 3.20.
|
||||
* **20.03.24:** - Rebase to Alpine 3.19.
|
||||
* **07.10.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar).
|
||||
* **10.08.23:** - Bump unrar to 6.2.10.
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@ external_type: github_stable
|
||||
release_type: stable
|
||||
release_tag: latest
|
||||
ls_branch: main
|
||||
build_armhf: false
|
||||
repo_vars:
|
||||
- EXT_GIT_BRANCH = 'master'
|
||||
- EXT_USER = 'flexget'
|
||||
@@ -25,8 +24,8 @@ repo_vars:
|
||||
- CI_PORT='5050'
|
||||
- CI_SSL='false'
|
||||
- CI_DELAY='120'
|
||||
- CI_DOCKERENV='TZ=US/Pacific'
|
||||
- CI_AUTH='user:password'
|
||||
- CI_DOCKERENV='TZ=Europe/London'
|
||||
- CI_AUTH=''
|
||||
- CI_WEBPATH=''
|
||||
sponsor_links:
|
||||
- { name: "FlexGet", url: "https://github.com/sponsors/gazpachoking/" }
|
||||
|
||||
+225
-162
@@ -1,162 +1,225 @@
|
||||
NAME VERSION TYPE
|
||||
7zip 23.01-r0 apk
|
||||
APScheduler 3.10.4 python
|
||||
Brotli 1.1.0 python
|
||||
CherryPy 18.9.0 python
|
||||
Flask 3.0.0 python
|
||||
Flask-Compress 1.14 python
|
||||
Flask-Cors 4.0.1 python
|
||||
Flask-Login 0.6.3 python
|
||||
FlexGet 3.11.32 python
|
||||
Jinja2 3.1.4 python
|
||||
MarkupSafe 2.1.3 python
|
||||
PyRSS2Gen 1.1 python
|
||||
PyYAML 6.0.1 python
|
||||
Pygments 2.17.2 python
|
||||
SQLAlchemy 2.0.24 python
|
||||
Simple Launcher 1.1.0.14 dotnet (+5 duplicates)
|
||||
Werkzeug 3.0.3 python
|
||||
ada-libs 2.7.4-r0 apk
|
||||
alpine-baselayout 3.4.3-r2 apk
|
||||
alpine-baselayout-data 3.4.3-r2 apk
|
||||
alpine-keys 2.4-r1 apk
|
||||
alpine-release 3.19.1-r0 apk
|
||||
aniso8601 9.0.1 python
|
||||
annotated-types 0.6.0 python
|
||||
anyio 4.3.0 python
|
||||
apk-tools 2.14.4-r0 apk
|
||||
attrs 23.2.0 python
|
||||
autocommand 2.2.2 python
|
||||
babelfish 0.6.0 python
|
||||
bash 5.2.21-r0 apk
|
||||
beautifulsoup4 4.12.2 python
|
||||
blinker 1.7.0 python
|
||||
boost1.82-python3 1.82.0-r3 apk
|
||||
boost1.82-system 1.82.0-r3 apk
|
||||
brotli-libs 1.1.0-r1 apk
|
||||
busybox 1.36.1-r15 apk
|
||||
busybox-binsh 1.36.1-r15 apk
|
||||
c-ares 1.27.0-r0 apk
|
||||
ca-certificates 20240226-r0 apk
|
||||
ca-certificates-bundle 20240226-r0 apk
|
||||
certifi 2023.11.17 python
|
||||
charset-normalizer 3.3.2 python
|
||||
cheroot 10.0.0 python
|
||||
click 8.1.7 python
|
||||
cloudscraper 1.2.71 python
|
||||
colorama 0.4.6 python
|
||||
coreutils 9.4-r2 apk
|
||||
coreutils-env 9.4-r2 apk
|
||||
coreutils-fmt 9.4-r2 apk
|
||||
coreutils-sha512sum 9.4-r2 apk
|
||||
curl 8.5.0-r0 apk
|
||||
deluge-client 1.9.0 python
|
||||
feedparser 6.0.11 python
|
||||
findutils 4.9.0-r5 apk
|
||||
flask-restx 1.3.0 python
|
||||
gdbm 1.23-r1 apk
|
||||
greenlet 3.0.3 python
|
||||
guessit 3.8.0 python
|
||||
h11 0.14.0 python
|
||||
html5lib 1.1 python
|
||||
httpcore 1.0.4 python
|
||||
httpx 0.27.0 python
|
||||
icu-data-en 74.1-r0 apk
|
||||
icu-libs 74.1-r0 apk
|
||||
idna 3.6 python
|
||||
importlib-resources 6.1.1 python
|
||||
inflect 7.0.0 python
|
||||
itsdangerous 2.1.2 python
|
||||
jaraco.collections 5.0.0 python
|
||||
jaraco.context 4.3.0 python
|
||||
jaraco.functools 4.0.0 python
|
||||
jaraco.text 3.12.0 python
|
||||
jq 1.7.1-r0 apk
|
||||
jsonschema 4.20.0 python
|
||||
jsonschema-specifications 2023.12.1 python
|
||||
libacl 2.3.1-r4 apk
|
||||
libattr 2.5.1-r5 apk
|
||||
libbase64 0.5.0-r0 apk
|
||||
libbsd 0.11.7-r3 apk
|
||||
libbz2 1.0.8-r6 apk
|
||||
libc-utils 0.7.2-r5 apk
|
||||
libcrypto3 3.1.4-r6 apk
|
||||
libcurl 8.5.0-r0 apk
|
||||
libexpat 2.6.2-r0 apk
|
||||
libffi 3.4.4-r3 apk
|
||||
libgcc 13.2.1_git20231014-r0 apk
|
||||
libidn2 2.3.4-r4 apk
|
||||
libintl 0.22.3-r0 apk
|
||||
libmd 1.1.0-r0 apk
|
||||
libncursesw 6.4_p20231125-r0 apk
|
||||
libpanelw 6.4_p20231125-r0 apk
|
||||
libproc2 4.0.4-r0 apk
|
||||
libssl3 3.1.4-r6 apk
|
||||
libstdc++ 13.2.1_git20231014-r0 apk
|
||||
libunistring 1.1-r2 apk
|
||||
linux-pam 1.5.3-r7 apk
|
||||
loguru 0.7.2 python
|
||||
markdown-it-py 3.0.0 python
|
||||
mdurl 0.1.2 python
|
||||
more-itertools 10.1.0 python
|
||||
mpdecimal 2.5.1-r2 apk
|
||||
musl 1.2.4_git20230717-r4 apk
|
||||
musl-utils 1.2.4_git20230717-r4 apk
|
||||
ncurses-terminfo-base 6.4_p20231125-r0 apk
|
||||
netcat-openbsd 1.226-r0 apk
|
||||
nghttp2-libs 1.58.0-r0 apk
|
||||
nodejs 20.12.1-r0 apk
|
||||
oniguruma 6.9.9-r0 apk
|
||||
packaging 23.2 python
|
||||
pendulum 3.0.0 python
|
||||
pip 24.0 python
|
||||
plumbum 1.8.2 python
|
||||
portend 3.2.0 python
|
||||
procps-ng 4.0.4-r0 apk
|
||||
psutil 5.9.7 python
|
||||
pyc 3.11.9-r0 apk
|
||||
pydantic 2.5.3 python
|
||||
pydantic_core 2.14.6 python
|
||||
pynzb 0.1.0 python
|
||||
pyparsing 3.1.1 python
|
||||
python-dateutil 2.8.2 python
|
||||
python-telegram-bot 21.0.1 python
|
||||
python3 3.11.9-r0 apk
|
||||
python3-pyc 3.11.9-r0 apk
|
||||
python3-pycache-pyc0 3.11.9-r0 apk
|
||||
pytz 2023.3.post1 python
|
||||
qbittorrent-api 2024.1.58 python
|
||||
readline 8.2.1-r2 apk
|
||||
rebulk 3.2.0 python
|
||||
referencing 0.32.0 python
|
||||
requests 2.31.0 python
|
||||
requests-toolbelt 1.0.0 python
|
||||
rich 13.7.0 python
|
||||
rpds-py 0.16.2 python
|
||||
rpyc 6.0.0 python
|
||||
scanelf 1.3.7-r2 apk
|
||||
setuptools 69.0.3 python
|
||||
sgmllib3k 1.0.0 python
|
||||
shadow 4.14.2-r0 apk
|
||||
six 1.16.0 python
|
||||
skalibs 2.14.0.1-r0 apk
|
||||
sniffio 1.3.1 python
|
||||
soupsieve 2.5 python
|
||||
sqlite-libs 3.44.2-r0 apk
|
||||
ssl_client 1.36.1-r15 apk
|
||||
tempora 5.5.0 python
|
||||
time-machine 2.14.1 python
|
||||
transmission-rpc 7.0.3 python
|
||||
triangular 2.5.0 npm
|
||||
typing_extensions 4.9.0 python
|
||||
tzdata 2023.4 python
|
||||
tzdata 2024a-r0 apk
|
||||
tzlocal 5.2 python
|
||||
urllib3 1.26.18 python
|
||||
utmps-libs 0.1.2.2-r0 apk
|
||||
webencodings 0.5.1 python
|
||||
wheel 0.43.0 python
|
||||
xz-libs 5.4.5-r0 apk
|
||||
zc.lockfile 3.0.post1 python
|
||||
zlib 1.3.1-r0 apk
|
||||
zxcvbn 4.4.28 python
|
||||
NAME VERSION TYPE
|
||||
7zip 24.09-r0 apk
|
||||
Simple Launcher 1.1.0.14 binary (+5 duplicates)
|
||||
acl-libs 2.3.2-r1 apk
|
||||
ada-libs 2.9.2-r4 apk
|
||||
aiofiles 24.1.0 python
|
||||
aiohappyeyeballs 2.6.1 python
|
||||
aiohttp 3.13.5 python
|
||||
aiohttp-socks 0.11.0 python
|
||||
aiosignal 1.4.0 python
|
||||
alpine-baselayout 3.7.0-r0 apk
|
||||
alpine-baselayout-data 3.7.0-r0 apk
|
||||
alpine-keys 2.5-r0 apk
|
||||
alpine-release 3.22.4-r0 apk
|
||||
aniso8601 10.0.1 python
|
||||
annotated-doc 0.0.4 python
|
||||
anyio 4.13.0 python
|
||||
apk-tools 2.14.9-r3 apk
|
||||
apscheduler 3.11.2 python
|
||||
attrs 26.1.0 python
|
||||
autocommand 2.2.2 python
|
||||
babelfish 0.6.1 python
|
||||
backports-tarfile 1.2.0 python
|
||||
backports-zstd 1.5.0 python
|
||||
bash 5.2.37-r0 apk
|
||||
bcrypt 5.0.0 python
|
||||
beautifulsoup4 4.14.3 python
|
||||
blinker 1.9.0 python
|
||||
boost1.84-python3 1.84.0-r3 apk
|
||||
boost1.84-system 1.84.0-r3 apk
|
||||
boto3 1.43.9 python
|
||||
botocore 1.43.9 python
|
||||
brotli 1.2.0 python
|
||||
brotli-libs 1.1.0-r2 apk
|
||||
busybox 1.37.0-r20 apk
|
||||
busybox-binsh 1.37.0-r20 apk
|
||||
c-ares 1.34.6-r0 apk
|
||||
ca-certificates 20260413-r0 apk
|
||||
ca-certificates-bundle 20260413-r0 apk
|
||||
catatonit 0.2.1-r0 apk
|
||||
certifi 2026.4.22 python
|
||||
cffi 2.0.0 python
|
||||
chardet 7.4.3 python
|
||||
charset-normalizer 3.4.7 python
|
||||
cheroot 11.1.2 python
|
||||
cherrypy 18.10.0 python
|
||||
cli UNKNOWN binary
|
||||
cli-32 UNKNOWN binary
|
||||
cli-64 UNKNOWN binary
|
||||
cli-arm64 UNKNOWN binary
|
||||
click 8.4.0 python
|
||||
click-option-group 0.5.9 python
|
||||
coreutils 9.7-r1 apk
|
||||
coreutils-env 9.7-r1 apk
|
||||
coreutils-fmt 9.7-r1 apk
|
||||
coreutils-sha512sum 9.7-r1 apk
|
||||
cryptography 48.0.0 python
|
||||
curl 8.14.1-r2 apk
|
||||
decorator 5.3.1 python
|
||||
defusedxml 0.7.1 python
|
||||
deluge-client 1.10.2 python
|
||||
dogpile-cache 1.5.0 python
|
||||
enzyme 0.5.2 python
|
||||
feedparser 6.0.12 python
|
||||
findutils 4.10.0-r0 apk
|
||||
flask 3.1.3 python
|
||||
flask-compress 1.24 python
|
||||
flask-cors 6.0.2 python
|
||||
flask-login 0.6.3 python
|
||||
flask-restx 1.3.2 python
|
||||
flexget 3.19.21 python
|
||||
frozenlist 1.8.0 python
|
||||
ftputil 5.2.0 python
|
||||
gdbm 1.24-r0 apk
|
||||
greenlet 3.5.0 python
|
||||
guessit 3.8.0 python
|
||||
gui UNKNOWN binary
|
||||
gui-32 UNKNOWN binary
|
||||
gui-64 UNKNOWN binary
|
||||
gui-arm64 UNKNOWN binary
|
||||
h11 0.16.0 python
|
||||
h2 4.3.0 python
|
||||
hpack 4.1.0 python
|
||||
html5lib 1.1 python
|
||||
httpcore 1.0.9 python
|
||||
httpx 0.28.1 python
|
||||
hyperframe 6.1.0 python
|
||||
icu-data-en 76.1-r1 apk
|
||||
icu-libs 76.1-r1 apk
|
||||
idna 3.15 python
|
||||
importlib-metadata 8.7.1 python
|
||||
importlib-resources 7.1.0 python
|
||||
itsdangerous 2.2.0 python
|
||||
jaraco-collections 5.2.1 python
|
||||
jaraco-context 6.1.0 python
|
||||
jaraco-context 6.1.2 python
|
||||
jaraco-functools 4.4.0 python
|
||||
jaraco-functools 4.5.0 python
|
||||
jaraco-text 4.0.0 python
|
||||
jaraco-text 4.2.0 python
|
||||
jinja2 3.1.6 python
|
||||
jmespath 1.1.0 python
|
||||
jq 1.8.1-r0 apk
|
||||
jsonschema 4.26.0 python
|
||||
jsonschema-specifications 2025.9.1 python
|
||||
knowit 0.5.11 python
|
||||
libapk2 2.14.9-r3 apk
|
||||
libattr 2.5.2-r2 apk
|
||||
libbsd 0.12.2-r0 apk
|
||||
libbz2 1.0.8-r6 apk
|
||||
libcrypto3 3.5.6-r0 apk
|
||||
libcurl 8.14.1-r2 apk
|
||||
libexpat 2.7.5-r0 apk
|
||||
libffi 3.4.8-r0 apk
|
||||
libgcc 14.2.0-r6 apk
|
||||
libidn2 2.3.7-r0 apk
|
||||
libintl 0.24.1-r0 apk
|
||||
libmd 1.1.0-r0 apk
|
||||
libncursesw 6.5_p20250503-r0 apk
|
||||
libpanelw 6.5_p20250503-r0 apk
|
||||
libproc2 4.0.4-r3 apk
|
||||
libpsl 0.21.5-r3 apk
|
||||
libssl3 3.5.6-r0 apk
|
||||
libstdc++ 14.2.0-r6 apk
|
||||
libunistring 1.3-r0 apk
|
||||
linux-pam 1.7.0-r4 apk
|
||||
loguru 0.7.3 python
|
||||
markdown-it-py 4.2.0 python
|
||||
markupsafe 3.0.3 python
|
||||
matrix-nio 0.25.2 python
|
||||
mdurl 0.1.2 python
|
||||
more-itertools 10.8.0 python
|
||||
more-itertools 11.0.2 python
|
||||
mpdecimal 4.0.1-r0 apk
|
||||
multidict 6.7.1 python
|
||||
musl 1.2.5-r12 apk
|
||||
musl-utils 1.2.5-r12 apk
|
||||
ncurses-terminfo-base 6.5_p20250503-r0 apk
|
||||
netcat-openbsd 1.229.1-r0 apk
|
||||
nghttp2-libs 1.69.0-r0 apk
|
||||
nodejs 22.22.2-r0 apk
|
||||
oniguruma 6.9.10-r0 apk
|
||||
packaging 26.0 python
|
||||
packaging 26.2 python
|
||||
paramiko 3.5.1 python
|
||||
pendulum 3.2.0 python
|
||||
pip 26.1.1 python
|
||||
platformdirs 4.4.0 python
|
||||
platformdirs 4.9.6 python
|
||||
plexapi 4.18.1 python
|
||||
plumbum 1.10.0 python
|
||||
portend 3.2.1 python
|
||||
procps-ng 4.0.4-r3 apk
|
||||
propcache 0.5.2 python
|
||||
psutil 7.2.2 python
|
||||
pyc 3.12.13-r0 apk
|
||||
pycparser 3.0 python
|
||||
pycryptodome 3.23.0 python
|
||||
pygments 2.20.0 python
|
||||
pymediainfo 7.0.1 python
|
||||
pynacl 1.6.2 python
|
||||
pynzb 0.1.0 python
|
||||
pyparsing 3.3.2 python
|
||||
pyrss2gen 1.1 python
|
||||
pysftp 0.2.9 python
|
||||
pysubs2 1.8.1 python
|
||||
python-dateutil 2.9.0.post0 python
|
||||
python-socks 2.8.1 python
|
||||
python-telegram-bot 22.7 python
|
||||
python3 3.12.13-r0 apk
|
||||
python3-pyc 3.12.13-r0 apk
|
||||
python3-pycache-pyc0 3.12.13-r0 apk
|
||||
pyyaml 6.0.3 python
|
||||
qbittorrent-api 2025.11.1 python
|
||||
rarfile 4.2 python
|
||||
readline 8.2.13-r1 apk
|
||||
rebulk 3.2.0 python
|
||||
referencing 0.37.0 python
|
||||
requests 2.34.2 python
|
||||
rich 15.0.0 python
|
||||
rpds-py 0.30.0 python
|
||||
rpyc 6.0.2 python
|
||||
s3transfer 0.17.0 python
|
||||
scanelf 1.3.8-r1 apk
|
||||
setuptools 82.0.1 python
|
||||
sgmllib3k 1.0.0 python
|
||||
shadow 4.17.3-r0 apk
|
||||
shellingham 1.5.4 python
|
||||
simdjson 3.12.0-r0 apk
|
||||
simdutf 7.2.1-r0 apk
|
||||
six 1.17.0 python
|
||||
skalibs-libs 2.14.4.0-r0 apk
|
||||
socksio 1.0.0 python
|
||||
soupsieve 2.8.3 python
|
||||
sqlalchemy 2.0.49 python
|
||||
sqlite-libs 3.49.2-r1 apk
|
||||
srt 3.5.3 python
|
||||
ssl_client 1.37.0-r20 apk
|
||||
stevedore 5.8.0 python
|
||||
subliminal 2.6.0 python
|
||||
tempora 5.9.0 python
|
||||
tomli 2.4.0 python
|
||||
tomlkit 0.15.0 python
|
||||
trakit 0.2.5 python
|
||||
transmission-rpc 7.0.11 python
|
||||
triangular 2.5.0 npm
|
||||
typer 0.25.1 python
|
||||
typer-slim 0.24.0 python
|
||||
typing-extensions 4.15.0 python
|
||||
tzdata 2026.2 python
|
||||
tzdata 2026b-r0 apk
|
||||
tzlocal 5.3.1 python
|
||||
unpaddedbase64 2.1.0 python
|
||||
urllib3 2.7.0 python
|
||||
utmps-libs 0.1.3.1-r0 apk
|
||||
webencodings 0.5.1 python
|
||||
werkzeug 3.1.8 python
|
||||
wheel 0.46.3 python
|
||||
xz-libs 5.8.3-r0 apk
|
||||
yarl 1.23.0 python
|
||||
zc-lockfile 4.0 python
|
||||
zipp 3.23.0 python
|
||||
zlib 1.3.2-r0 apk
|
||||
zstd-libs 1.5.7-r0 apk
|
||||
zxcvbn 4.5.0 python
|
||||
|
||||
+62
-26
@@ -6,40 +6,33 @@ project_url: "http://flexget.com/"
|
||||
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/flexget-banner.png"
|
||||
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a multipurpose automation tool for all of your media."
|
||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||
project_blurb_optional_extras_enabled: false
|
||||
|
||||
project_categories: "Downloaders"
|
||||
# supported architectures
|
||||
available_architectures:
|
||||
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||
|
||||
# development version
|
||||
development_versions: false
|
||||
|
||||
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
||||
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
||||
# container parameters
|
||||
common_param_env_vars_enabled: true
|
||||
param_container_name: "{{ project_name }}"
|
||||
param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "FG_LOG_LEVEL", env_value: "info", desc: "Set the FlexGet logging level." }
|
||||
- { env_var: "FG_LOG_FILE", env_value: "/config/flexget.log", desc: "Set the FlexGet log file location." }
|
||||
- { env_var: "FG_CONFIG_FILE", env_value: "/config/.flexget/config.yml", desc: "Set the FlexGet config file location." }
|
||||
- {env_var: "FG_LOG_LEVEL", env_value: "info", desc: "Set the FlexGet logging level."}
|
||||
- {env_var: "FG_LOG_FILE", env_value: "/config/flexget.log", desc: "Set the FlexGet log file location."}
|
||||
- {env_var: "FG_CONFIG_FILE", env_value: "/config/.flexget/config.yml", desc: "Set the FlexGet config file location."}
|
||||
param_usage_include_vols: true
|
||||
param_volumes:
|
||||
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for FlexGet config files." }
|
||||
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for FlexGet config files."}
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "5050", internal_port: "5050", port_desc: "HTTP port for the WebUI." }
|
||||
|
||||
- {external_port: "5050", internal_port: "5050", port_desc: "HTTP port for the WebUI."}
|
||||
# optional container parameters
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "FG_WEBUI_PASSWORD", env_value: "info", desc: "Set the FlexGet webui password. Pay attention to Bash/YAML reserved characters." }
|
||||
|
||||
- {env_var: "FG_WEBUI_PASSWORD", env_value: "info", desc: "Set the FlexGet webui password. Pay attention to Bash/YAML reserved characters."}
|
||||
opt_param_usage_include_vols: true
|
||||
opt_param_volumes:
|
||||
- { vol_path: "/data", vol_host_path: "/path/to/downloads", desc: "Default path for downloads." }
|
||||
|
||||
- {vol_path: "/data", vol_host_path: "/path/to/downloads", desc: "Default path for downloads."}
|
||||
readonly_supported: true
|
||||
# application setup block
|
||||
app_setup_block_enabled: true
|
||||
app_setup_block: |
|
||||
@@ -49,15 +42,58 @@ app_setup_block: |
|
||||
|
||||
### Download folders
|
||||
|
||||
We have set `/data` as an ***optional path***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content.
|
||||
We have set `/data` as an ***optional path***, this is because it is the easiest way to get started.
|
||||
|
||||
Use the optional paths if you don't understand, or don't want hardlinks/atomic moves.
|
||||
|
||||
The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this.
|
||||
|
||||
# init diagram
|
||||
init_diagram: |
|
||||
"flexget:latest": {
|
||||
docker-mods
|
||||
base {
|
||||
fix-attr +\nlegacy cont-init
|
||||
}
|
||||
docker-mods -> base
|
||||
legacy-services
|
||||
custom services
|
||||
init-services -> legacy-services
|
||||
init-services -> custom services
|
||||
custom services -> legacy-services
|
||||
legacy-services -> ci-service-check
|
||||
init-migrations -> init-adduser
|
||||
init-os-end -> init-config
|
||||
init-config -> init-config-end
|
||||
init-crontab-config -> init-config-end
|
||||
init-flexget-config -> init-config-end
|
||||
init-config -> init-crontab-config
|
||||
init-mods-end -> init-custom-files
|
||||
init-adduser -> init-device-perms
|
||||
base -> init-envfile
|
||||
init-config -> init-flexget-config
|
||||
base -> init-migrations
|
||||
init-config-end -> init-mods
|
||||
init-mods-package-install -> init-mods-end
|
||||
init-mods -> init-mods-package-install
|
||||
init-adduser -> init-os-end
|
||||
init-device-perms -> init-os-end
|
||||
init-envfile -> init-os-end
|
||||
init-custom-files -> init-services
|
||||
init-services -> svc-cron
|
||||
svc-cron -> legacy-services
|
||||
init-services -> svc-flexget
|
||||
svc-flexget -> legacy-services
|
||||
}
|
||||
Base Images: {
|
||||
"baseimage-alpine:3.22"
|
||||
}
|
||||
"flexget:latest" <- Base Images
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "20.03.24:", desc: "Rebase to Alpine 3.19."}
|
||||
- { date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."}
|
||||
- { date: "10.08.23:", desc: "Bump unrar to 6.2.10."}
|
||||
- { date: "03.07.23:", desc: "Initial Release." }
|
||||
- {date: "10.11.25:", desc: "Rebase to Alpine 3.22."}
|
||||
- {date: "17.10.25:", desc: "Add pip to enable [universal-package-install mod](https://github.com/linuxserver/docker-mods/tree/universal-package-install)."}
|
||||
- {date: "18.09.24:", desc: "Suppress creation of empty log file when WebUI password is set."}
|
||||
- {date: "17.08.24:", desc: "Revert to Alpine 3.20 due to 1st party plugin incompatibility with Python 3.12."}
|
||||
- {date: "19.06.24:", desc: "Rebase to Alpine 3.20."}
|
||||
- {date: "20.03.24:", desc: "Rebase to Alpine 3.19."}
|
||||
- {date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."}
|
||||
- {date: "10.08.23:", desc: "Bump unrar to 6.2.10."}
|
||||
- {date: "03.07.23:", desc: "Initial Release."}
|
||||
|
||||
Executable → Regular
@@ -3,7 +3,7 @@
|
||||
|
||||
mkdir -p \
|
||||
/config/.flexget \
|
||||
/data
|
||||
/run/flexget-temp
|
||||
|
||||
FG_CONFIG_FILE="${FG_CONFIG_FILE:-/config/.flexget/config.yml}"
|
||||
case "${FG_CONFIG_FILE}" in
|
||||
@@ -29,7 +29,7 @@ if [[ ! -f "${FG_CONFIG_FILE}" ]]; then
|
||||
fi
|
||||
|
||||
if [[ -n "${FG_WEBUI_PASSWORD}" ]]; then
|
||||
if ! flexget -c "${FG_CONFIG_FILE}" --loglevel error web passwd "${FG_WEBUI_PASSWORD}" | tee /dev/stderr | grep -q 'Updated password'; then
|
||||
if ! flexget -c "${FG_CONFIG_FILE}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" --loglevel error web passwd "${FG_WEBUI_PASSWORD}" | tee /dev/stderr | grep -q 'Updated password'; then
|
||||
echo "Halting init, please address the above issues and recreate the container"
|
||||
sleep infinity
|
||||
fi
|
||||
@@ -38,6 +38,9 @@ fi
|
||||
# permissions
|
||||
lsiown -R abc:abc \
|
||||
/config \
|
||||
/run/flexget-temp
|
||||
|
||||
lsiown abc:abc \
|
||||
/data
|
||||
if grep -qe ' /data ' /proc/mounts; then
|
||||
lsiown abc:abc \
|
||||
/data
|
||||
fi
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
exec \
|
||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 5050" \
|
||||
s6-setuidgid abc python3 /lsiopy/bin/flexget \
|
||||
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start --autoreload-config
|
||||
cd /config s6-setuidgid abc python3 /lsiopy/bin/flexget \
|
||||
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start
|
||||
|
||||
Reference in New Issue
Block a user