Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit ba0c944

Browse files
authored
Merge pull request #25 from linuxserver/undeprecate
undeprecate until jenkins-builder is fixed
2 parents 4c5cdc9 + d956ca9 commit ba0c944

13 files changed

+270
-53
lines changed

.github/ISSUE_TEMPLATE/issue.bug.yml

+60-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,65 @@ description: Create a report to help us improve
44
title: "[BUG] <title>"
55
labels: [Bug]
66
body:
7-
- type: markdown
7+
- type: checkboxes
88
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Current Behavior
17+
description: Tell us what happens instead of the expected behavior.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Expected Behavior
23+
description: Tell us what should happen.
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Steps To Reproduce
29+
description: Steps to reproduce the behavior.
30+
placeholder: |
31+
1. In this environment...
32+
2. With this config...
33+
3. Run '...'
34+
4. See error...
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: Environment
40+
description: |
41+
examples:
42+
- **OS**: Ubuntu 20.04
43+
- **How docker service was installed**: distro's packagemanager
944
value: |
10-
# This image is deprecated. We will not offer support for this image and it will not be updated.
11-
12-
45+
- OS:
46+
- How docker service was installed:
47+
render: markdown
48+
validations:
49+
required: false
50+
- type: textarea
51+
attributes:
52+
label: Docker creation
53+
description: |
54+
Command used to create docker container
55+
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
56+
render: bash
57+
validations:
58+
required: true
59+
- type: textarea
60+
attributes:
61+
description: |
62+
Provide a full docker log, output of "docker logs linuxserver.io"
63+
label: Container logs
64+
placeholder: |
65+
Output of `docker logs linuxserver.io`
66+
render: bash
67+
validations:
68+
required: true

.github/ISSUE_TEMPLATE/issue.feature.yml

+24-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@ description: Suggest an idea for this project
44
title: "[FEAT] <title>"
55
labels: [enhancement]
66
body:
7-
- type: markdown
7+
- type: checkboxes
88
attributes:
9-
value: |
10-
# This image is deprecated. We will not offer support for this image and it will not be updated.
11-
12-
9+
label: Is this a new feature request?
10+
description: Please search to see if a feature request already exists.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Wanted change
17+
description: Tell us what you want to happen.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Reason for change
23+
description: Justify your request, why do you want it, what is the benefit.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Proposed code change
29+
description: Do you have a potential code change in mind?
30+
validations:
31+
required: false

.github/PULL_REQUEST_TEMPLATE.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This image is deprecated. We will not offer support for this image and it will not be updated.
2-
3-
41
<!--- Provide a general summary of your changes in the Title above -->
52

63
[linuxserverurl]: https://linuxserver.io
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Issue & PR Tracker
2+
3+
on:
4+
issues:
5+
types: [opened,reopened,labeled,unlabeled,closed]
6+
pull_request_target:
7+
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
8+
pull_request_review:
9+
types: [submitted,edited,dismissed]
10+
11+
jobs:
12+
manage-project:
13+
permissions:
14+
issues: write
15+
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
16+
secrets: inherit
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Mark stale issues and pull requests
2+
on:
3+
schedule:
4+
- cron: '52 13 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
stale:
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
13+
secrets: inherit
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: External Trigger Main
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
external-trigger-master:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3.1.0
11+
12+
- name: External Trigger
13+
if: github.ref == 'refs/heads/master'
14+
run: |
15+
echo "**** No external release, exiting ****"
16+
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY
17+
exit 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: External Trigger Scheduler
2+
3+
on:
4+
schedule:
5+
- cron: '2 * * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
external-trigger-scheduler:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3.1.0
13+
with:
14+
fetch-depth: '0'
15+
16+
- name: External Trigger Scheduler
17+
run: |
18+
echo "**** Branches found: ****"
19+
git for-each-ref --format='%(refname:short)' refs/remotes
20+
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
21+
do
22+
br=$(echo "$br" | sed 's|origin/||g')
23+
echo "**** Evaluating branch ${br} ****"
24+
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-readme-sync/${br}/jenkins-vars.yml)
25+
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
26+
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
27+
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
28+
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
29+
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-readme-sync/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
30+
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
31+
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
32+
curl -iX POST \
33+
-H "Authorization: token ${{ secrets.CR_PAT }}" \
34+
-H "Accept: application/vnd.github.v3+json" \
35+
-d "{\"ref\":\"refs/heads/${br}\"}" \
36+
https://api.github.com/repos/linuxserver/docker-readme-sync/actions/workflows/external_trigger.yml/dispatches
37+
else
38+
echo "**** Workflow doesn't exist; skipping trigger. ****"
39+
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
40+
fi
41+
else
42+
echo "**** ${br} is either a dev branch, or has no external version; skipping trigger. ****"
43+
echo "Skipping branch ${br} due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
44+
fi
45+
done

.github/workflows/greetings.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'This image is deprecated. We will not offer support for this image and it will not be updated. The [README](https://github.com/linuxserver/docker-readme-sync/blob/master/README.md) may have additional information. Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
12-
pr-message: 'This image is deprecated. We will not offer support for this image and it will not be updated. The [README](https://github.com/linuxserver/docker-readme-sync/blob/master/README.md) may have additional information. Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-readme-sync/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-readme-sync/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_trigger.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Package Trigger Main
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
package-trigger-master:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3.1.0
11+
12+
- name: Package Trigger
13+
if: github.ref == 'refs/heads/master'
14+
run: |
15+
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_README_SYNC_MASTER }}" ]; then
16+
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_README_SYNC_MASTER is set; skipping trigger. ****"
17+
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_README_SYNC_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
18+
exit 0
19+
fi
20+
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-readme-sync/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
21+
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
22+
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
23+
exit 0
24+
fi
25+
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_README_SYNC_MASTER\". ****"
26+
echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_README_SYNC_MASTER\`" >> $GITHUB_STEP_SUMMARY
27+
response=$(curl -iX POST \
28+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-readme-sync/job/master/buildWithParameters?PACKAGE_CHECK=true \
29+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
30+
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
31+
echo "**** Sleeping 10 seconds until job starts ****"
32+
sleep 10
33+
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
34+
buildurl="${buildurl%$'\r'}"
35+
echo "**** Jenkins job build url: ${buildurl} ****"
36+
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
37+
echo "**** Attempting to change the Jenkins job description ****"
38+
curl -iX POST \
39+
"${buildurl}submitDescription" \
40+
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
41+
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
42+
--data-urlencode "Submit=Submit"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Package Trigger Scheduler
2+
3+
on:
4+
schedule:
5+
- cron: '0 12 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
package-trigger-scheduler:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3.1.0
13+
with:
14+
fetch-depth: '0'
15+
16+
- name: Package Trigger Scheduler
17+
run: |
18+
echo "**** Branches found: ****"
19+
git for-each-ref --format='%(refname:short)' refs/remotes
20+
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
21+
do
22+
br=$(echo "$br" | sed 's|origin/||g')
23+
echo "**** Evaluating branch ${br} ****"
24+
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-readme-sync/${br}/jenkins-vars.yml | yq -r '.ls_branch')
25+
if [ "${br}" == "${ls_branch}" ]; then
26+
echo "**** Branch ${br} appears to be live; checking workflow. ****"
27+
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-readme-sync/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
28+
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
29+
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
30+
triggered_branches="${triggered_branches}${br} "
31+
curl -iX POST \
32+
-H "Authorization: token ${{ secrets.CR_PAT }}" \
33+
-H "Accept: application/vnd.github.v3+json" \
34+
-d "{\"ref\":\"refs/heads/${br}\"}" \
35+
https://api.github.com/repos/linuxserver/docker-readme-sync/actions/workflows/package_trigger.yml/dispatches
36+
sleep 30
37+
else
38+
echo "**** Workflow doesn't exist; skipping trigger. ****"
39+
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
40+
fi
41+
else
42+
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
43+
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
44+
fi
45+
done
46+
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
47+
echo "**** Notifying Discord ****"
48+
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
49+
"description": "**Package Check Build(s) Triggered for readme-sync** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-readme-sync/activity/"' \n"}],
50+
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

Jenkinsfile

+1-35
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pipeline {
5959
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
6060
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
6161
env.PULL_REQUEST = env.CHANGE_ID
62-
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 ./root/etc/cont-init.d/99-deprecation'
62+
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'
6363
}
6464
sh '''#! /bin/bash
6565
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
@@ -287,7 +287,6 @@ pipeline {
287287
fi
288288
# Stage 2 - Delete old templates
289289
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"
290-
OLD_TEMPLATES="${OLD_TEMPLATES} $(echo .github/workflows/{external_trigger,external_trigger_scheduler,package_trigger,package_trigger_scheduler,call_issue_pr_tracker,call_issues_cron}.yml)"
291290
for i in ${OLD_TEMPLATES}; do
292291
if [[ -f "${i}" ]]; then
293292
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
@@ -323,14 +322,6 @@ pipeline {
323322
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
324323
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
325324
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
326-
if [[ -d "${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d" ]]; then
327-
mkdir -p \
328-
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d \
329-
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d \
330-
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/user/contents.d
331-
else
332-
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/root/etc/cont-init.d
333-
fi
334325
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
335326
cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || :
336327
cd ${TEMPDIR}/repo/${LS_REPO}/
@@ -354,11 +345,6 @@ pipeline {
354345
GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
355346
git add docs/images/docker-${CONTAINER_NAME}.md
356347
git commit -m 'Bot Updating Documentation'
357-
git mv docs/images/docker-${CONTAINER_NAME}.md docs/deprecated_images/docker-${CONTAINER_NAME}.md || :
358-
if ! yq -e '.plugins.[].redirects.redirect_maps.[] | select(. == "deprecated/" + env(CONTAINER_NAME) + ".md")' mkdocs.yml >/dev/null 2>&1; then
359-
yq -i '.plugins.[].redirects.redirect_maps |= . + {env(CONTAINER_NAME) + ".md" : "deprecated/" + env(CONTAINER_NAME) + ".md"}' mkdocs.yml
360-
fi
361-
git commit -m 'Bot Moving Deprecated Documentation' || :
362348
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
363349
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
364350
fi
@@ -955,26 +941,6 @@ EOF
955941

956942
}
957943
}
958-
stage('Deprecate/Disable Future Builds') {
959-
when {
960-
branch "master"
961-
environment name: 'CHANGE_ID', value: ''
962-
environment name: 'EXIT_STATUS', value: ''
963-
}
964-
steps {
965-
sh '''#! /bin/bash
966-
TEMPDIR=$(mktemp -d)
967-
mkdir -p ${TEMPDIR}/repo
968-
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
969-
cd ${TEMPDIR}/repo/${LS_REPO}
970-
git checkout -f master
971-
git rm Jenkinsfile
972-
git commit -m 'Disabling future builds'
973-
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
974-
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
975-
rm -Rf ${TEMPDIR}'''
976-
}
977-
}
978944
}
979945
/* ######################
980946
Send status to Discord

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<!-- DO NOT EDIT THIS FILE MANUALLY -->
22
<!-- Please read https://github.com/linuxserver/docker-readme-sync/blob/master/.github/CONTRIBUTING.md -->
3-
# This image is deprecated. We will not offer support for this image and it will not be updated.
4-
5-
63
[linuxserverurl]: https://linuxserver.io
74
[forumurl]: https://forum.linuxserver.io
85
[ircurl]: https://www.linuxserver.io/irc/

readme-vars.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# project information
44
project_name: readme-sync
5-
project_deprecation_status: true
65
full_custom_readme: |
76
{% raw -%}
87
[linuxserverurl]: https://linuxserver.io

0 commit comments

Comments
 (0)