mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2026-04-10 21:05:54 +09:00
Compare commits
20 Commits
developmen
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e5d65217a | ||
|
|
1e5c88de48 | ||
|
|
44612aa569 | ||
|
|
8706d29fe0 | ||
|
|
136dbe61bf | ||
|
|
5977b7440e | ||
|
|
d04a852a8d | ||
|
|
a636e8534c | ||
|
|
c5693232f4 | ||
|
|
6d7fad2d98 | ||
|
|
204bad5de9 | ||
|
|
3779275528 | ||
|
|
c4ab19e354 | ||
|
|
4ebb4da3fd | ||
|
|
0a2d097510 | ||
|
|
0852efa2bd | ||
|
|
c2ffc6c11d | ||
|
|
29a9ac0088 | ||
|
|
d05fc41a78 | ||
|
|
1ed4b08da3 |
12
.github/workflows/call_invalid_helper.yml
vendored
12
.github/workflows/call_invalid_helper.yml
vendored
@@ -1,12 +0,0 @@
|
|||||||
name: Comment on invalid interaction
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types:
|
|
||||||
- labeled
|
|
||||||
jobs:
|
|
||||||
add-comment-on-invalid:
|
|
||||||
if: github.event.label.name == 'invalid'
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1
|
|
||||||
secrets: inherit
|
|
||||||
16
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file
16
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Issue & PR Tracker
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened,reopened,labeled,unlabeled,closed]
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted,edited,dismissed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
manage-project:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
|
||||||
|
secrets: inherit
|
||||||
13
.github/workflows/call_issues_cron.yml
vendored
Executable file
13
.github/workflows/call_issues_cron.yml
vendored
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
name: Mark stale issues and pull requests
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '14 15 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
|
||||||
|
secrets: inherit
|
||||||
8
.github/workflows/external_trigger.yml
vendored
8
.github/workflows/external_trigger.yml
vendored
@@ -14,9 +14,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT }}" ]; then
|
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT }}" ]; then
|
||||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT is set; skipping trigger. ****"
|
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT is set; skipping trigger. ****"
|
||||||
|
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "**** External trigger running off of development branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT\". ****"
|
echo "**** External trigger running off of development branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT\". ****"
|
||||||
|
echo "External trigger running off of development branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_HEIMDALL_DEVELOPMENT\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Retrieving external version ****"
|
echo "**** Retrieving external version ****"
|
||||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/2.x" | jq -r '. | .sha' | cut -c1-8)
|
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/2.x" | jq -r '. | .sha' | cut -c1-8)
|
||||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
@@ -30,6 +32,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||||
echo "**** External version: ${EXT_RELEASE} ****"
|
echo "**** External version: ${EXT_RELEASE} ****"
|
||||||
|
echo "External version: ${EXT_RELEASE}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Retrieving last pushed version ****"
|
echo "**** Retrieving last pushed version ****"
|
||||||
image="linuxserver/heimdall"
|
image="linuxserver/heimdall"
|
||||||
tag="development"
|
tag="development"
|
||||||
@@ -65,14 +68,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
|
||||||
|
echo "Last pushed version: ${IMAGE_VERSION}" >> $GITHUB_STEP_SUMMARY
|
||||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||||
|
echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/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 ****"
|
||||||
|
echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
else
|
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 ****"
|
||||||
|
echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/buildWithParameters?PACKAGE_CHECK=false \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/buildWithParameters?PACKAGE_CHECK=false \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
@@ -82,6 +89,7 @@ jobs:
|
|||||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
buildurl="${buildurl%$'\r'}"
|
buildurl="${buildurl%$'\r'}"
|
||||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Attempting to change the Jenkins job description ****"
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
"${buildurl}submitDescription" \
|
||||||
|
|||||||
18
.github/workflows/external_trigger_scheduler.yml
vendored
18
.github/workflows/external_trigger_scheduler.yml
vendored
@@ -2,7 +2,7 @@ name: External Trigger Scheduler
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '35 * * * *'
|
- cron: '39 * * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,18 +17,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
echo "**** Branches found: ****"
|
||||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
echo "**** Pulling the yq docker image ****"
|
|
||||||
docker pull ghcr.io/linuxserver/yq
|
|
||||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
do
|
do
|
||||||
br=$(echo "$br" | sed 's|origin/||g')
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
echo "**** Evaluating branch ${br} ****"
|
echo "**** Evaluating branch ${br} ****"
|
||||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/jenkins-vars.yml \
|
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/jenkins-vars.yml)
|
||||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
||||||
if [ "$br" == "$ls_branch" ]; then
|
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
||||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
||||||
|
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
|
||||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||||
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||||
|
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
@@ -36,8 +36,10 @@ jobs:
|
|||||||
https://api.github.com/repos/linuxserver/docker-heimdall/actions/workflows/external_trigger.yml/dispatches
|
https://api.github.com/repos/linuxserver/docker-heimdall/actions/workflows/external_trigger.yml/dispatches
|
||||||
else
|
else
|
||||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
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
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
4
.github/workflows/package_trigger.yml
vendored
4
.github/workflows/package_trigger.yml
vendored
@@ -14,13 +14,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT }}" ]; then
|
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT }}" ]; then
|
||||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT is set; skipping trigger. ****"
|
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT is set; skipping trigger. ****"
|
||||||
|
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/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 ****"
|
||||||
|
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "**** Package trigger running off of development branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT\". ****"
|
echo "**** Package trigger running off of development branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT\". ****"
|
||||||
|
echo "Package trigger running off of development branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_HEIMDALL_DEVELOPMENT\`" >> $GITHUB_STEP_SUMMARY
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/buildWithParameters?PACKAGE_CHECK=true \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/development/buildWithParameters?PACKAGE_CHECK=true \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
@@ -30,6 +33,7 @@ jobs:
|
|||||||
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
buildurl="${buildurl%$'\r'}"
|
buildurl="${buildurl%$'\r'}"
|
||||||
echo "**** Jenkins job build url: ${buildurl} ****"
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**** Attempting to change the Jenkins job description ****"
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
"${buildurl}submitDescription" \
|
||||||
|
|||||||
10
.github/workflows/package_trigger_scheduler.yml
vendored
10
.github/workflows/package_trigger_scheduler.yml
vendored
@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '54 7 * * 0'
|
- cron: '14 18 * * 5'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,18 +17,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "**** Branches found: ****"
|
echo "**** Branches found: ****"
|
||||||
git for-each-ref --format='%(refname:short)' refs/remotes
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
echo "**** Pulling the yq docker image ****"
|
|
||||||
docker pull ghcr.io/linuxserver/yq
|
|
||||||
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
do
|
do
|
||||||
br=$(echo "$br" | sed 's|origin/||g')
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
echo "**** Evaluating branch ${br} ****"
|
echo "**** Evaluating branch ${br} ****"
|
||||||
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/jenkins-vars.yml \
|
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/jenkins-vars.yml | yq -r '.ls_branch')
|
||||||
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
|
|
||||||
if [ "${br}" == "${ls_branch}" ]; then
|
if [ "${br}" == "${ls_branch}" ]; then
|
||||||
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||||
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-heimdall/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||||
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
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} "
|
triggered_branches="${triggered_branches}${br} "
|
||||||
curl -iX POST \
|
curl -iX POST \
|
||||||
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
@@ -38,9 +36,11 @@ jobs:
|
|||||||
sleep 30
|
sleep 30
|
||||||
else
|
else
|
||||||
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
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
|
fi
|
||||||
done
|
done
|
||||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||||
|
|||||||
3
.github/workflows/permissions.yml
vendored
3
.github/workflows/permissions.yml
vendored
@@ -1,9 +1,10 @@
|
|||||||
name: Permission check
|
name: Permission check
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- '**/run'
|
- '**/run'
|
||||||
- '**/finish'
|
- '**/finish'
|
||||||
|
- '**/check'
|
||||||
jobs:
|
jobs:
|
||||||
permission_check:
|
permission_check:
|
||||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||||
|
|||||||
23
.github/workflows/stale.yml
vendored
23
.github/workflows/stale.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Mark stale issues and pull requests
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "30 1 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v6.0.1
|
|
||||||
with:
|
|
||||||
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
|
||||||
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
|
|
||||||
stale-issue-label: 'no-issue-activity'
|
|
||||||
stale-pr-label: 'no-pr-activity'
|
|
||||||
days-before-stale: 30
|
|
||||||
days-before-close: 365
|
|
||||||
exempt-issue-labels: 'awaiting-approval,work-in-progress'
|
|
||||||
exempt-pr-labels: 'awaiting-approval,work-in-progress'
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
215
Jenkinsfile
vendored
215
Jenkinsfile
vendored
@@ -42,10 +42,16 @@ pipeline {
|
|||||||
// Setup all the basic environment variables needed for the build
|
// Setup all the basic environment variables needed for the build
|
||||||
stage("Set ENV Variables base"){
|
stage("Set ENV Variables base"){
|
||||||
steps{
|
steps{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
containers=$(docker ps -aq)
|
||||||
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || : '''
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = ''
|
env.EXIT_STATUS = ''
|
||||||
env.LS_RELEASE = sh(
|
env.LS_RELEASE = sh(
|
||||||
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':development 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:development 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
env.LS_RELEASE_NOTES = sh(
|
env.LS_RELEASE_NOTES = sh(
|
||||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||||
@@ -59,7 +65,7 @@ pipeline {
|
|||||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
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.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||||
env.PULL_REQUEST = env.CHANGE_ID
|
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/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
|
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'
|
||||||
}
|
}
|
||||||
script{
|
script{
|
||||||
env.LS_RELEASE_NUMBER = sh(
|
env.LS_RELEASE_NUMBER = sh(
|
||||||
@@ -213,12 +219,12 @@ pipeline {
|
|||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'amd64-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm32v7-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = 'development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
}
|
}
|
||||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
env.META_TAG = 'development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.META_TAG = 'development-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
env.EXT_RELEASE_TAG = 'development-version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'development-version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
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.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||||
@@ -238,19 +244,16 @@ pipeline {
|
|||||||
script{
|
script{
|
||||||
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
|
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
|
||||||
}
|
}
|
||||||
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
|
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-jenkins-builder/master/checkrun.sh | /bin/bash'''
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
|
-v ${WORKSPACE}:/mnt \
|
||||||
-e FILE_NAME="shellcheck-result.xml" \
|
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
||||||
-e MIMETYPE="text/xml" \
|
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
||||||
-v ${WORKSPACE}:/mnt \
|
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||||
-e SECRET_KEY=\"${S3_SECRET}\" \
|
apk add --no-cache py3-pip && \
|
||||||
-e ACCESS_KEY=\"${S3_KEY}\" \
|
pip install s3cmd && \
|
||||||
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
|
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
|
||||||
python /upload.py'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,7 +290,7 @@ pipeline {
|
|||||||
echo "Jenkinsfile is up to date."
|
echo "Jenkinsfile is up to date."
|
||||||
fi
|
fi
|
||||||
# Stage 2 - Delete old templates
|
# Stage 2 - Delete old templates
|
||||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
|
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"
|
||||||
for i in ${OLD_TEMPLATES}; do
|
for i in ${OLD_TEMPLATES}; do
|
||||||
if [[ -f "${i}" ]]; then
|
if [[ -f "${i}" ]]; then
|
||||||
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||||
@@ -304,7 +307,7 @@ pipeline {
|
|||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
echo "Deleting old templates"
|
echo "Deleting old and deprecated templates"
|
||||||
rm -Rf ${TEMPDIR}
|
rm -Rf ${TEMPDIR}
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
@@ -349,6 +352,8 @@ pipeline {
|
|||||||
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||||
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
|
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
|
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
|
||||||
|
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
|
||||||
fi
|
fi
|
||||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
||||||
cd ${TEMPDIR}/unraid/templates/
|
cd ${TEMPDIR}/unraid/templates/
|
||||||
@@ -389,6 +394,26 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If this is a development build check the S6 service file perms
|
||||||
|
stage("Check S6 Service file Permissions"){
|
||||||
|
when {
|
||||||
|
branch "development"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
WRONG_PERM=$(find ./ -path "./.git" -prune -o \\( -name "run" -o -name "finish" -o -name "check" \\) -not -perm -u=x,g=x,o=x -print)
|
||||||
|
if [[ -n "${WRONG_PERM}" ]]; then
|
||||||
|
echo "The following S6 service files are missing the executable bit; canceling the faulty build: ${WRONG_PERM}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "S6 service file perms look good."
|
||||||
|
fi '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/* #######################
|
/* #######################
|
||||||
GitLab Mirroring
|
GitLab Mirroring
|
||||||
####################### */
|
####################### */
|
||||||
@@ -420,8 +445,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps{
|
steps{
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/heimdall") | .uuid' || :)
|
||||||
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/heimdall") | .uuid')
|
|
||||||
if [ -z "${PACKAGE_UUID}" ]; then
|
if [ -z "${PACKAGE_UUID}" ]; then
|
||||||
echo "Adding package to Scarf.sh"
|
echo "Adding package to Scarf.sh"
|
||||||
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
|
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
|
||||||
@@ -531,9 +555,12 @@ pipeline {
|
|||||||
retry(5) {
|
retry(5) {
|
||||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
}
|
}
|
||||||
sh '''docker rmi \
|
sh '''#! /bin/bash
|
||||||
${IMAGE}:arm32v7-${META_TAG} \
|
containers=$(docker ps -aq)
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || : '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARM64') {
|
stage('Build ARM64') {
|
||||||
@@ -566,9 +593,12 @@ pipeline {
|
|||||||
retry(5) {
|
retry(5) {
|
||||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
}
|
}
|
||||||
sh '''docker rmi \
|
sh '''#! /bin/bash
|
||||||
${IMAGE}:arm64v8-${META_TAG} \
|
containers=$(docker ps -aq)
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || : '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -629,13 +659,6 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''#! /bin/bash
|
|
||||||
echo "Packages were updated. Cleaning up the image and exiting."
|
|
||||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
|
||||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
|
||||||
else
|
|
||||||
docker rmi ${IMAGE}:${META_TAG}
|
|
||||||
fi'''
|
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = 'ABORTED'
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
}
|
}
|
||||||
@@ -653,13 +676,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''#! /bin/bash
|
|
||||||
echo "There are no package updates. Cleaning up the image and exiting."
|
|
||||||
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
|
||||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
|
||||||
else
|
|
||||||
docker rmi ${IMAGE}:${META_TAG}
|
|
||||||
fi'''
|
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = 'ABORTED'
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
}
|
}
|
||||||
@@ -681,6 +697,7 @@ pipeline {
|
|||||||
]) {
|
]) {
|
||||||
script{
|
script{
|
||||||
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
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'
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
@@ -707,8 +724,6 @@ pipeline {
|
|||||||
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
||||||
-e WEB_AUTH=\"${CI_AUTH}\" \
|
-e WEB_AUTH=\"${CI_AUTH}\" \
|
||||||
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||||
-e DO_REGION="ams3" \
|
|
||||||
-e DO_BUCKET="lsio-ci" \
|
|
||||||
-t ghcr.io/linuxserver/ci:latest \
|
-t ghcr.io/linuxserver/ci:latest \
|
||||||
python3 test_build.py'''
|
python3 test_build.py'''
|
||||||
}
|
}
|
||||||
@@ -761,17 +776,6 @@ pipeline {
|
|||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
|
||||||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
|
||||||
docker rmi \
|
|
||||||
${DELETEIMAGE}:${META_TAG} \
|
|
||||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
|
||||||
${DELETEIMAGE}:development || :
|
|
||||||
if [ -n "${SEMVER}" ]; then
|
|
||||||
docker rmi ${DELETEIMAGE}:${SEMVER} || :
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -865,29 +869,6 @@ pipeline {
|
|||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
|
||||||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
|
||||||
docker rmi \
|
|
||||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
|
||||||
${DELETEIMAGE}:amd64-development \
|
|
||||||
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
|
||||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
|
||||||
${DELETEIMAGE}:arm32v7-development \
|
|
||||||
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
|
||||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
|
||||||
${DELETEIMAGE}:arm64v8-development \
|
|
||||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
|
||||||
if [ -n "${SEMVER}" ]; then
|
|
||||||
docker rmi \
|
|
||||||
${DELETEIMAGE}:amd64-${SEMVER} \
|
|
||||||
${DELETEIMAGE}:arm32v7-${SEMVER} \
|
|
||||||
${DELETEIMAGE}:arm64v8-${SEMVER} || :
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
docker rmi \
|
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -958,12 +939,78 @@ pipeline {
|
|||||||
stage('Pull Request Comment') {
|
stage('Pull Request Comment') {
|
||||||
when {
|
when {
|
||||||
not {environment name: 'CHANGE_ID', value: ''}
|
not {environment name: 'CHANGE_ID', value: ''}
|
||||||
environment name: 'CI', value: 'true'
|
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \
|
sh '''#! /bin/bash
|
||||||
-d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' '''
|
# 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
|
||||||
|
'''
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -989,6 +1036,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cleanup {
|
cleanup {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "Performing docker system prune!!"
|
||||||
|
containers=$(docker ps -aq)
|
||||||
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || :
|
||||||
|
'''
|
||||||
cleanWs()
|
cleanWs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **13.04.23:** - Move ssl.conf include to default.conf.
|
||||||
* **20.01.23:** - Rebase to alpine 3.17 with php8.1.
|
* **20.01.23:** - Rebase to alpine 3.17 with php8.1.
|
||||||
* **14.11.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).
|
* **14.11.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).
|
||||||
* **04.11.22:** - Build commits to upstream branch 2.x.
|
* **04.11.22:** - Build commits to upstream branch 2.x.
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ NAME VERSION TYPE
|
|||||||
alpine-baselayout 3.4.0-r0 apk
|
alpine-baselayout 3.4.0-r0 apk
|
||||||
alpine-baselayout-data 3.4.0-r0 apk
|
alpine-baselayout-data 3.4.0-r0 apk
|
||||||
alpine-keys 2.4-r1 apk
|
alpine-keys 2.4-r1 apk
|
||||||
alpine-release 3.17.2-r0 apk
|
alpine-release 3.17.3-r0 apk
|
||||||
apache2-utils 2.4.55-r0 apk
|
apache2-utils 2.4.57-r0 apk
|
||||||
apk-tools 2.12.10-r1 apk
|
apk-tools 2.12.10-r1 apk
|
||||||
apr 1.7.2-r0 apk
|
apr 1.7.2-r0 apk
|
||||||
apr-util 1.6.3-r0 apk
|
apr-util 1.6.3-r0 apk
|
||||||
@@ -16,12 +16,12 @@ brotli-libs 1.0.9-r9 apk
|
|||||||
busybox 1.35.0 binary
|
busybox 1.35.0 binary
|
||||||
busybox 1.35.0-r29 apk
|
busybox 1.35.0-r29 apk
|
||||||
busybox-binsh 1.35.0-r29 apk
|
busybox-binsh 1.35.0-r29 apk
|
||||||
ca-certificates 20220614-r4 apk
|
ca-certificates 20230506-r0 apk
|
||||||
ca-certificates-bundle 20220614-r4 apk
|
ca-certificates-bundle 20230506-r0 apk
|
||||||
clue/stream-filter v1.6.0 php-composer
|
clue/stream-filter v1.6.0 php-composer
|
||||||
composer/pcre 3.1.0 php-composer
|
composer/pcre 3.1.0 php-composer
|
||||||
coreutils 9.1-r0 apk
|
coreutils 9.1-r0 apk
|
||||||
curl 7.88.1-r0 apk
|
curl 8.1.0-r1 apk
|
||||||
dflydev/dot-access-data v3.0.2 php-composer
|
dflydev/dot-access-data v3.0.2 php-composer
|
||||||
doctrine/cache 2.2.0 php-composer
|
doctrine/cache 2.2.0 php-composer
|
||||||
doctrine/dbal 3.5.1 php-composer
|
doctrine/dbal 3.5.1 php-composer
|
||||||
@@ -38,7 +38,7 @@ facade/ignition-contracts 1.0.2 php-composer
|
|||||||
fideloper/proxy 4.4.2 php-composer
|
fideloper/proxy 4.4.2 php-composer
|
||||||
filp/whoops 2.14.6 php-composer
|
filp/whoops 2.14.6 php-composer
|
||||||
fzaninotto/faker v1.9.2 php-composer
|
fzaninotto/faker v1.9.2 php-composer
|
||||||
git 2.38.4-r0 apk
|
git 2.38.5-r0 apk
|
||||||
graham-campbell/bounded-cache v1.3.0 php-composer
|
graham-campbell/bounded-cache v1.3.0 php-composer
|
||||||
graham-campbell/github v10.6.0 php-composer
|
graham-campbell/github v10.6.0 php-composer
|
||||||
graham-campbell/manager v4.7.0 php-composer
|
graham-campbell/manager v4.7.0 php-composer
|
||||||
@@ -65,26 +65,26 @@ libattr 2.5.1-r2 apk
|
|||||||
libbsd 0.11.7-r0 apk
|
libbsd 0.11.7-r0 apk
|
||||||
libbz2 1.0.8-r4 apk
|
libbz2 1.0.8-r4 apk
|
||||||
libc-utils 0.7.2-r3 apk
|
libc-utils 0.7.2-r3 apk
|
||||||
libcrypto3 3.0.8-r0 apk
|
libcrypto3 3.0.8-r4 apk
|
||||||
libcurl 7.88.1-r0 apk
|
libcurl 8.1.1-r1 apk
|
||||||
libedit 20221030.3.1-r0 apk
|
libedit 20221030.3.1-r0 apk
|
||||||
libexpat 2.5.0-r0 apk
|
libexpat 2.5.0-r0 apk
|
||||||
libgcc 12.2.1_git20220924-r4 apk
|
libgcc 12.2.1_git20220924-r4 apk
|
||||||
libintl 0.21.1-r1 apk
|
libintl 0.21.1-r1 apk
|
||||||
libmd 1.0.4-r0 apk
|
libmd 1.0.4-r0 apk
|
||||||
libpq 15.2-r0 apk
|
libpq 15.3-r0 apk
|
||||||
libproc 3.3.17-r2 apk
|
libproc 3.3.17-r2 apk
|
||||||
libssl3 3.0.8-r0 apk
|
libssl3 3.0.8-r4 apk
|
||||||
libstdc++ 12.2.1_git20220924-r4 apk
|
libstdc++ 12.2.1_git20220924-r4 apk
|
||||||
libuuid 2.38.1-r1 apk
|
libuuid 2.38.1-r1 apk
|
||||||
libxml2 2.10.3-r1 apk
|
libxml2 2.10.4-r0 apk
|
||||||
libzip 1.9.2-r2 apk
|
libzip 1.9.2-r2 apk
|
||||||
linux-pam 1.5.2-r1 apk
|
linux-pam 1.5.2-r1 apk
|
||||||
logrotate 3.20.1-r3 apk
|
logrotate 3.20.1-r3 apk
|
||||||
mockery/mockery 1.5.1 php-composer
|
mockery/mockery 1.5.1 php-composer
|
||||||
monolog/monolog 2.8.0 php-composer
|
monolog/monolog 2.8.0 php-composer
|
||||||
musl 1.2.3-r4 apk
|
musl 1.2.3-r5 apk
|
||||||
musl-utils 1.2.3-r4 apk
|
musl-utils 1.2.3-r5 apk
|
||||||
myclabs/deep-copy 1.11.0 php-composer
|
myclabs/deep-copy 1.11.0 php-composer
|
||||||
nano 7.0-r0 apk
|
nano 7.0-r0 apk
|
||||||
ncurses-libs 6.3_p20221119-r0 apk
|
ncurses-libs 6.3_p20221119-r0 apk
|
||||||
@@ -98,14 +98,14 @@ nginx 1.22.1-r0 apk
|
|||||||
nikic/php-parser v4.15.2 php-composer
|
nikic/php-parser v4.15.2 php-composer
|
||||||
nunomaduro/collision v5.11.0 php-composer
|
nunomaduro/collision v5.11.0 php-composer
|
||||||
oniguruma 6.9.8-r0 apk
|
oniguruma 6.9.8-r0 apk
|
||||||
openssl 3.0.8-r0 apk
|
openssl 3.0.8-r4 apk
|
||||||
opis/closure 3.6.3 php-composer
|
opis/closure 3.6.3 php-composer
|
||||||
pcre 8.45-r2 apk
|
pcre 8.45-r2 apk
|
||||||
pcre2 10.42-r0 apk
|
pcre2 10.42-r0 apk
|
||||||
phar-io/manifest 2.0.3 php-composer
|
phar-io/manifest 2.0.3 php-composer
|
||||||
phar-io/version 3.2.1 php-composer
|
phar-io/version 3.2.1 php-composer
|
||||||
php-cli 8.1.16 binary
|
php-cli 8.1.19 binary
|
||||||
php-fpm 8.1.16 binary
|
php-fpm 8.1.19 binary
|
||||||
php-http/cache-plugin 1.7.5 php-composer
|
php-http/cache-plugin 1.7.5 php-composer
|
||||||
php-http/client-common 2.6.0 php-composer
|
php-http/client-common 2.6.0 php-composer
|
||||||
php-http/discovery 1.14.3 php-composer
|
php-http/discovery 1.14.3 php-composer
|
||||||
@@ -114,26 +114,26 @@ php-http/message 1.13.0 php-composer
|
|||||||
php-http/message-factory v1.0.2 php-composer
|
php-http/message-factory v1.0.2 php-composer
|
||||||
php-http/multipart-stream-builder 1.2.0 php-composer
|
php-http/multipart-stream-builder 1.2.0 php-composer
|
||||||
php-http/promise 1.1.0 php-composer
|
php-http/promise 1.1.0 php-composer
|
||||||
php81 8.1.16-r0 apk
|
php81 8.1.19-r0 apk
|
||||||
php81-common 8.1.16-r0 apk
|
php81-common 8.1.19-r0 apk
|
||||||
php81-ctype 8.1.16-r0 apk
|
php81-ctype 8.1.19-r0 apk
|
||||||
php81-curl 8.1.16-r0 apk
|
php81-curl 8.1.19-r0 apk
|
||||||
php81-fileinfo 8.1.16-r0 apk
|
php81-fileinfo 8.1.19-r0 apk
|
||||||
php81-fpm 8.1.16-r0 apk
|
php81-fpm 8.1.19-r0 apk
|
||||||
php81-intl 8.1.16-r0 apk
|
php81-intl 8.1.19-r0 apk
|
||||||
php81-mbstring 8.1.16-r0 apk
|
php81-mbstring 8.1.19-r0 apk
|
||||||
php81-mysqlnd 8.1.16-r0 apk
|
php81-mysqlnd 8.1.19-r0 apk
|
||||||
php81-openssl 8.1.16-r0 apk
|
php81-openssl 8.1.19-r0 apk
|
||||||
php81-pdo 8.1.16-r0 apk
|
php81-pdo 8.1.19-r0 apk
|
||||||
php81-pdo_mysql 8.1.16-r0 apk
|
php81-pdo_mysql 8.1.19-r0 apk
|
||||||
php81-pdo_pgsql 8.1.16-r0 apk
|
php81-pdo_pgsql 8.1.19-r0 apk
|
||||||
php81-pdo_sqlite 8.1.16-r0 apk
|
php81-pdo_sqlite 8.1.19-r0 apk
|
||||||
php81-session 8.1.16-r0 apk
|
php81-session 8.1.19-r0 apk
|
||||||
php81-simplexml 8.1.16-r0 apk
|
php81-simplexml 8.1.19-r0 apk
|
||||||
php81-tokenizer 8.1.16-r0 apk
|
php81-tokenizer 8.1.19-r0 apk
|
||||||
php81-xml 8.1.16-r0 apk
|
php81-xml 8.1.19-r0 apk
|
||||||
php81-xmlwriter 8.1.16-r0 apk
|
php81-xmlwriter 8.1.19-r0 apk
|
||||||
php81-zip 8.1.16-r0 apk
|
php81-zip 8.1.19-r0 apk
|
||||||
phpdocumentor/reflection-common 2.2.0 php-composer
|
phpdocumentor/reflection-common 2.2.0 php-composer
|
||||||
phpdocumentor/type-resolver 1.6.2 php-composer
|
phpdocumentor/type-resolver 1.6.2 php-composer
|
||||||
phpoption/phpoption 1.9.0 php-composer
|
phpoption/phpoption 1.9.0 php-composer
|
||||||
@@ -216,7 +216,7 @@ symfony/var-exporter v5.4.10 php-composer
|
|||||||
symfony/yaml v5.4.14 php-composer
|
symfony/yaml v5.4.14 php-composer
|
||||||
theseer/tokenizer 1.2.1 php-composer
|
theseer/tokenizer 1.2.1 php-composer
|
||||||
tijsverkoyen/css-to-inline-styles 2.2.5 php-composer
|
tijsverkoyen/css-to-inline-styles 2.2.5 php-composer
|
||||||
tzdata 2022f-r1 apk
|
tzdata 2023c-r0 apk
|
||||||
utmps-libs 0.1.2.0-r1 apk
|
utmps-libs 0.1.2.0-r1 apk
|
||||||
vlucas/phpdotenv v5.5.0 php-composer
|
vlucas/phpdotenv v5.5.0 php-composer
|
||||||
voku/portable-ascii 1.6.1 php-composer
|
voku/portable-ascii 1.6.1 php-composer
|
||||||
@@ -224,4 +224,4 @@ webmozart/assert 1.11.0 php-composer
|
|||||||
xz 5.2.9-r0 apk
|
xz 5.2.9-r0 apk
|
||||||
xz-libs 5.2.9-r0 apk
|
xz-libs 5.2.9-r0 apk
|
||||||
zlib 1.2.13-r0 apk
|
zlib 1.2.13-r0 apk
|
||||||
zstd-libs 1.5.2-r9 apk
|
zstd-libs 1.5.5-r0 apk
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "13.04.23:", desc: "Move ssl.conf include to default.conf." }
|
||||||
- { date: "20.01.23:", desc: "Rebase to alpine 3.17 with php8.1." }
|
- { date: "20.01.23:", desc: "Rebase to alpine 3.17 with php8.1." }
|
||||||
- { date: "14.11.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." }
|
- { date: "14.11.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." }
|
||||||
- { date: "04.11.22:", desc: "Build commits to upstream branch 2.x." }
|
- { date: "04.11.22:", desc: "Build commits to upstream branch 2.x." }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## Version 2022/11/14 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
@@ -9,6 +9,8 @@ server {
|
|||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
include /config/nginx/ssl.conf;
|
||||||
|
|
||||||
root /app/www/public;
|
root /app/www/public;
|
||||||
index index.html index.htm index.php;
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user