Compare commits

...

25 Commits

Author SHA1 Message Date
LinuxServer-CI
5fbe7b8c94 Bot Updating Package Versions 2024-01-12 18:39:53 +00:00
LinuxServer-CI
450b8c49ae Bot Updating Templated Files 2024-01-12 18:36:21 +00:00
LinuxServer-CI
d0c3c7fb32 Bot Updating Templated Files 2024-01-12 18:33:53 +00:00
LinuxServer-CI
18594c2e33 Bot Updating Package Versions 2024-01-05 18:30:38 +00:00
LinuxServer-CI
9905ef8a45 Bot Updating Package Versions 2023-12-22 18:29:20 +00:00
LinuxServer-CI
157c18a81a Bot Updating Package Versions 2023-12-15 18:31:10 +00:00
LinuxServer-CI
80ed370549 Bot Updating Package Versions 2023-12-08 18:30:20 +00:00
LinuxServer-CI
5544a0e7dd Bot Updating Package Versions 2023-12-01 18:30:22 +00:00
Eric Nemchik
74f43c96f6 Merge pull request #139 from linuxserver/quiet-migration-development
only run migration if conf exists
2023-11-29 08:31:03 -06:00
Eric Nemchik
6cb41d570e only run migration if conf exists
redirect stderr to /dev/null

Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-11-25 10:51:48 -06:00
LinuxServer-CI
dc1f719285 Bot Updating Package Versions 2023-11-24 18:30:38 +00:00
LinuxServer-CI
2a6b03eca7 Bot Updating Package Versions 2023-11-17 18:33:13 +00:00
LinuxServer-CI
5365f6181d Bot Updating Templated Files 2023-11-17 18:30:55 +00:00
LinuxServer-CI
c91ac478c9 Bot Updating Package Versions 2023-11-10 18:29:24 +00:00
LinuxServer-CI
369ba1c41b Bot Updating Package Versions 2023-10-27 18:29:08 +00:00
LinuxServer-CI
88e7e1df09 Bot Updating Package Versions 2023-10-20 18:29:37 +00:00
LinuxServer-CI
a694621f78 Bot Updating Templated Files 2023-10-13 18:31:24 +00:00
LinuxServer-CI
0a0c8862f6 Bot Updating Package Versions 2023-10-06 18:41:35 +00:00
LinuxServer-CI
649f2b09a7 Bot Updating Templated Files 2023-10-06 18:35:50 +00:00
LinuxServer-CI
1ab60fda12 Bot Updating Templated Files 2023-10-06 18:29:57 +00:00
LinuxServer-CI
67b8da2a27 Bot Updating Package Versions 2023-09-29 18:30:15 +00:00
LinuxServer-CI
9da87dc8cf Bot Updating Package Versions 2023-09-22 18:29:33 +00:00
LinuxServer-CI
1de91cfbd0 Bot Updating Package Versions 2023-09-08 18:28:47 +00:00
LinuxServer-CI
19c0db5c97 Bot Updating Package Versions 2023-09-01 18:28:39 +00:00
LinuxServer-CI
5498349626 Bot Updating Package Versions 2023-08-18 18:27:55 +00:00
4 changed files with 505 additions and 443 deletions

150
Jenkinsfile vendored
View File

@@ -16,7 +16,7 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab') GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0') GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id') GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key') DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
EXT_GIT_BRANCH = '2.x' EXT_GIT_BRANCH = '2.x'
EXT_USER = 'linuxserver' EXT_USER = 'linuxserver'
EXT_REPO = 'Heimdall' EXT_REPO = 'Heimdall'
@@ -62,11 +62,16 @@ pipeline {
env.COMMIT_SHA = sh( env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''', script: '''git rev-parse HEAD''',
returnStdout: true).trim() returnStdout: true).trim()
env.GH_DEFAULT_BRANCH = sh(
script: '''git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||' ''',
returnStdout: true).trim()
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/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' 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'
} }
sh '''#! /bin/bash
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
script{ script{
env.LS_RELEASE_NUMBER = sh( env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''', script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
@@ -149,7 +154,7 @@ pipeline {
} }
if (env.SEMVER != null) { if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") { if (BRANCH_NAME != "${env.GH_DEFAULT_BRANCH}") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}" env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
} }
println("SEMVER: ${env.SEMVER}") println("SEMVER: ${env.SEMVER}")
@@ -267,6 +272,14 @@ pipeline {
} }
} }
steps { steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash sh '''#! /bin/bash
set -e set -e
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
@@ -281,7 +294,8 @@ pipeline {
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
git add Jenkinsfile git add Jenkinsfile
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 pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile" echo "Updating Jenkinsfile"
rm -Rf ${TEMPDIR} rm -Rf ${TEMPDIR}
@@ -305,7 +319,8 @@ pipeline {
git rm "${i}" git rm "${i}"
done done
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 pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old and deprecated templates" echo "Deleting old and deprecated templates"
rm -Rf ${TEMPDIR} rm -Rf ${TEMPDIR}
@@ -334,19 +349,22 @@ pipeline {
fi fi
git add readme-vars.yml ${TEMPLATED_FILES} git add readme-vars.yml ${TEMPLATED_FILES}
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 pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi fi
mkdir -p ${TEMPDIR}/gitbook mkdir -p ${TEMPDIR}/docs
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then 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}/gitbook/docker-documentation/images/ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
cd ${TEMPDIR}/gitbook/docker-documentation/ cd ${TEMPDIR}/docs/docker-documentation
git add images/docker-${CONTAINER_NAME}.md GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
git add docs/images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Documentation' git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
fi fi
mkdir -p ${TEMPDIR}/unraid mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
@@ -356,8 +374,9 @@ pipeline {
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then 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 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}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -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/
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 grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "Image is on the ignore list, marking Unraid template as deprecated" 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/ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
@@ -369,7 +388,27 @@ pipeline {
git add unraid/${CONTAINER_NAME}.xml git add unraid/${CONTAINER_NAME}.xml
git commit -m 'Bot Updating Unraid Template' git commit -m 'Bot Updating Unraid Template'
fi fi
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH}
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH}
fi
# Stage 4 - Sync Readme to Docker Hub
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then
if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) > 25000 ]]; then
echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite"
else
echo "Syncing readme to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/README.md"
fi
DH_TOKEN=$(curl -d '{"username":"'${DOCKERUSER}'", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X PATCH \
-d "{\\"full_description\\":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || :
else
echo "Not the default Github branch. Skipping readme sync to Docker Hub."
fi fi
rm -Rf ${TEMPDIR}''' rm -Rf ${TEMPDIR}'''
script{ script{
@@ -379,6 +418,7 @@ pipeline {
} }
} }
} }
}
// Exit the build if the Templated files were just updated // Exit the build if the Templated files were just updated
stage('Template-exit') { stage('Template-exit') {
when { when {
@@ -435,35 +475,6 @@ pipeline {
"visibility":"public"}' ''' "visibility":"public"}' '''
} }
} }
/* #######################
Scarf.sh package registry
####################### */
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "development"
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''#! /bin/bash
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
echo "Adding package to Scarf.sh"
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
-H "Authorization: Bearer ${SCARF_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name":"linuxserver/heimdall",\
"shortDescription":"example description",\
"libraryType":"docker",\
"website":"https://github.com/linuxserver/docker-heimdall",\
"backendUrl":"https://ghcr.io/linuxserver/heimdall",\
"publicUrl":"https://lscr.io/linuxserver/heimdall"}' || :
else
echo "Package already exists on Scarf.sh"
fi
'''
}
}
/* ############### /* ###############
Build Container Build Container
############### */ ############### */
@@ -598,7 +609,8 @@ pipeline {
wait wait
git add package_versions.txt git add package_versions.txt
git commit -m 'Bot Updating Package Versions' git commit -m 'Bot Updating Package Versions'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git development
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process" echo "Package tag updated, stopping build process"
else else
@@ -859,37 +871,39 @@ pipeline {
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @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'''
} }
} }
// Use helper container to sync the current README on master to the dockerhub endpoint // Add protection to the release branch
stage('Sync-README') { stage('Github-Release-Branch-Protection') {
when { when {
branch "development"
environment name: 'CHANGE_ID', value: '' environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: '' environment name: 'EXIT_STATUS', value: ''
} }
steps { steps {
withCredentials([ echo "Setting up protection for release branch development"
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash sh '''#! /bin/bash
set -e curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/development/protection \
TEMPDIR=$(mktemp -d) -d $(jq -c . << EOF
docker pull ghcr.io/linuxserver/jenkins-builder:latest {
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest "required_status_checks": null,
docker pull ghcr.io/linuxserver/readme-sync "enforce_admins": false,
docker run --rm=true \ "required_pull_request_reviews": {
-e DOCKERHUB_USERNAME=$DOCKERUSER \ "dismiss_stale_reviews": false,
-e DOCKERHUB_PASSWORD=$DOCKERPASS \ "require_code_owner_reviews": false,
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \ "require_last_push_approval": false,
-e DOCKER_REPOSITORY=${IMAGE} \ "required_approving_review_count": 1
-e GIT_BRANCH=master \ },
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ "restrictions": null,
ghcr.io/linuxserver/readme-sync bash -c 'node sync' "required_linear_history": false,
rm -Rf ${TEMPDIR} ''' "allow_force_pushes": false,
"allow_deletions": false,
"block_creations": false,
"required_conversation_resolution": true,
"lock_branch": false,
"allow_fork_syncing": false,
"required_signatures": false
} }
EOF
) '''
} }
} }
// If this is a Pull request send the CI link as a comment on it // If this is a Pull request send the CI link as a comment on it

132
README.md
View File

@@ -1,6 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY --> <!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the https://github.com/linuxserver/docker-heimdall/blob/development/.github/CONTRIBUTING.md --> <!-- Please read https://github.com/linuxserver/docker-heimdall/blob/development/.github/CONTRIBUTING.md -->
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!") [![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
@@ -50,7 +49,7 @@ Why not use it as your browser start page? It even has the ability to include a
## Supported Architectures ## Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/). We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `lscr.io/linuxserver/heimdall:development` should retrieve the correct image for your arch, but you can also pull specific arch images via tags. Simply pulling `lscr.io/linuxserver/heimdall:development` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
@@ -70,6 +69,7 @@ This image provides various versions that are available via tags. Please read th
| :----: | :----: |--- | | :----: | :----: |--- |
| latest | ✅ | Stable Heimdall releases. | | latest | ✅ | Stable Heimdall releases. |
| development | ✅ | Latest commit from the github 2.x branch. | | development | ✅ | Latest commit from the github 2.x branch. |
## Application Setup ## Application Setup
Access the web gui at http://SERVERIP:PORT Access the web gui at http://SERVERIP:PORT
@@ -81,13 +81,12 @@ This image now supports password protection through htpasswd. Run the following
## Usage ## Usage
Here are some example snippets to help you get started creating a container. To help you get started creating a container from this image you can either use docker-compose or the docker cli.
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) ### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
```yaml ```yaml
--- ---
version: "2.1"
services: services:
heimdall: heimdall:
image: lscr.io/linuxserver/heimdall:development image: lscr.io/linuxserver/heimdall:development
@@ -117,12 +116,11 @@ docker run -d \
-v /path/to/appdata/config:/config \ -v /path/to/appdata/config:/config \
--restart unless-stopped \ --restart unless-stopped \
lscr.io/linuxserver/heimdall:development lscr.io/linuxserver/heimdall:development
``` ```
## Parameters ## Parameters
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
| Parameter | Function | | Parameter | Function |
| :----: | --- | | :----: | --- |
@@ -140,10 +138,10 @@ You can set any environment variable from a file by using a special prepend `FIL
As an example: As an example:
```bash ```bash
-e FILE__PASSWORD=/run/secrets/mysecretpassword -e FILE__MYVAR=/run/secrets/mysecretvariable
``` ```
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file. Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
## Umask for running applications ## Umask for running applications
@@ -152,15 +150,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
## User / Group Identifiers ## User / Group Identifiers
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below: In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
```bash ```bash
$ id username id your_user
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) ```
Example output:
```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
``` ```
## Docker Mods ## Docker Mods
@@ -171,53 +174,100 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
## Support Info ## Support Info
* Shell access whilst the container is running: `docker exec -it heimdall /bin/bash` * Shell access whilst the container is running:
* To monitor the logs of the container in realtime: `docker logs -f heimdall`
* container version number ```bash
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall` docker exec -it heimdall /bin/bash
* image version number ```
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/heimdall:development`
* To monitor the logs of the container in realtime:
```bash
docker logs -f heimdall
```
* Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall
```
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/heimdall:development
```
## Updating Info ## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers: Below are the instructions for updating containers:
### Via Docker Compose ### Via Docker Compose
* Update all images: `docker-compose pull` * Update images:
* or update a single image: `docker-compose pull heimdall` * All images:
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d heimdall` ```bash
* You can also remove the old dangling images: `docker image prune` docker-compose pull
```
* Single image:
```bash
docker-compose pull heimdall
```
* Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d heimdall
```
* You can also remove the old dangling images:
```bash
docker image prune
```
### Via Docker Run ### Via Docker Run
* Update the image: `docker pull lscr.io/linuxserver/heimdall:development` * Update the image:
* Stop the running container: `docker stop heimdall`
* Delete the container: `docker rm heimdall`
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* You can also remove the old dangling images: `docker image prune`
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```bash ```bash
docker run --rm \ docker pull lscr.io/linuxserver/heimdall:development
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once heimdall
``` ```
* You can also remove the old dangling images: `docker image prune` * Stop the running container:
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose). ```bash
docker stop heimdall
```
* Delete the container:
```bash
docker rm heimdall
```
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* You can also remove the old dangling images:
```bash
docker image prune
```
### Image Update Notifications - Diun (Docker Image Update Notifier) ### Image Update Notifications - Diun (Docker Image Update Notifier)
* 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 ## Building locally

View File

@@ -1,10 +1,10 @@
NAME VERSION TYPE NAME VERSION TYPE
Reads from stdin without leaking info to the terminal and outputs back to stdout 1, 0, 0, 0 dotnet Hidden Input 1, 0, 0, 0 dotnet
alpine-baselayout 3.4.3-r1 apk alpine-baselayout 3.4.3-r1 apk
alpine-baselayout-data 3.4.3-r1 apk alpine-baselayout-data 3.4.3-r1 apk
alpine-keys 2.4-r1 apk alpine-keys 2.4-r1 apk
alpine-release 3.18.2-r0 apk alpine-release 3.18.5-r0 apk
apache2-utils 2.4.57-r3 apk apache2-utils 2.4.58-r0 apk
apk-tools 2.14.0-r2 apk apk-tools 2.14.0-r2 apk
apr 1.7.4-r0 apk apr 1.7.4-r0 apk
apr-util 1.6.3-r1 apk apr-util 1.6.3-r1 apk
@@ -14,15 +14,15 @@ barryvdh/reflection-docblock
bash 5.2.15-r5 apk bash 5.2.15-r5 apk
brick/math 0.9.3 php-composer brick/math 0.9.3 php-composer
brotli-libs 1.0.9-r14 apk brotli-libs 1.0.9-r14 apk
busybox 1.36.1 binary busybox 1.36.1-r5 apk
busybox 1.36.1-r2 apk busybox-binsh 1.36.1-r5 apk
busybox-binsh 1.36.1-r2 apk
ca-certificates 20230506-r0 apk ca-certificates 20230506-r0 apk
ca-certificates-bundle 20230506-r0 apk ca-certificates-bundle 20230506-r0 apk
clue/stream-filter v1.6.0 php-composer clue/stream-filter v1.6.0 php-composer
composer 2.6.6 binary
composer/pcre 3.1.0 php-composer composer/pcre 3.1.0 php-composer
coreutils 9.3-r1 apk coreutils 9.3-r1 apk
curl 8.2.1-r0 apk curl 8.5.0-r0 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
@@ -50,7 +50,7 @@ guzzlehttp/psr7
hamcrest/hamcrest-php v2.0.1 php-composer hamcrest/hamcrest-php v2.0.1 php-composer
icu-data-en 73.2-r2 apk icu-data-en 73.2-r2 apk
icu-libs 73.2-r2 apk icu-libs 73.2-r2 apk
jq 1.6-r3 apk jq 1.6-r4 apk
knplabs/github-api v3.6.0 php-composer knplabs/github-api v3.6.0 php-composer
laravel/framework v8.83.26 php-composer laravel/framework v8.83.26 php-composer
laravel/serializable-closure v1.2.2 php-composer laravel/serializable-closure v1.2.2 php-composer
@@ -66,8 +66,8 @@ libattr
libbsd 0.11.7-r1 apk libbsd 0.11.7-r1 apk
libbz2 1.0.8-r5 apk libbz2 1.0.8-r5 apk
libc-utils 0.7.2-r5 apk libc-utils 0.7.2-r5 apk
libcrypto3 3.1.2-r0 apk libcrypto3 3.1.4-r3 apk
libcurl 8.2.1-r0 apk libcurl 8.5.0-r0 apk
libedit 20221030.3.1-r1 apk libedit 20221030.3.1-r1 apk
libexpat 2.5.0-r1 apk libexpat 2.5.0-r1 apk
libgcc 12.2.1_git20220924-r10 apk libgcc 12.2.1_git20220924-r10 apk
@@ -75,20 +75,20 @@ libidn2
libintl 0.21.1-r7 apk libintl 0.21.1-r7 apk
libmd 1.0.4-r2 apk libmd 1.0.4-r2 apk
libncursesw 6.4_p20230506-r0 apk libncursesw 6.4_p20230506-r0 apk
libpq 15.3-r0 apk libpq 15.5-r0 apk
libproc2 4.0.3-r1 apk libproc2 4.0.4-r0 apk
libssl3 3.1.2-r0 apk libssl3 3.1.4-r3 apk
libstdc++ 12.2.1_git20220924-r10 apk libstdc++ 12.2.1_git20220924-r10 apk
libunistring 1.1-r1 apk libunistring 1.1-r1 apk
libuuid 2.38.1-r8 apk libuuid 2.38.1-r8 apk
libxml2 2.11.4-r0 apk libxml2 2.11.6-r0 apk
libzip 1.9.2-r2 apk libzip 1.9.2-r2 apk
linux-pam 1.5.2-r10 apk linux-pam 1.5.2-r10 apk
logrotate 3.21.0-r1 apk logrotate 3.21.0-r1 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.4-r1 apk musl 1.2.4-r2 apk
musl-utils 1.2.4-r1 apk musl-utils 1.2.4-r2 apk
myclabs/deep-copy 1.11.0 php-composer myclabs/deep-copy 1.11.0 php-composer
nano 7.2-r1 apk nano 7.2-r1 apk
ncurses-terminfo-base 6.4_p20230506-r0 apk ncurses-terminfo-base 6.4_p20230506-r0 apk
@@ -96,19 +96,17 @@ nesbot/carbon
netcat-openbsd 1.219-r1 apk netcat-openbsd 1.219-r1 apk
nette/schema v1.2.3 php-composer nette/schema v1.2.3 php-composer
nette/utils v3.2.8 php-composer nette/utils v3.2.8 php-composer
nghttp2-libs 1.55.1-r0 apk nghttp2-libs 1.57.0-r0 apk
nginx 1.24.0-r6 apk nginx 1.24.0-r7 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-r1 apk oniguruma 6.9.8-r1 apk
openssl 3.1.2-r0 apk openssl 3.1.4-r3 apk
opis/closure 3.6.3 php-composer opis/closure 3.6.3 php-composer
pcre 8.45-r3 apk pcre 8.45-r3 apk
pcre2 10.42-r1 apk pcre2 10.42-r1 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.2.8 binary
php-fpm 8.2.8 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
@@ -117,28 +115,28 @@ php-http/message
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
php82 8.2.8-r0 apk php82 8.2.13-r0 apk
php82-common 8.2.8-r0 apk php82-common 8.2.13-r0 apk
php82-ctype 8.2.8-r0 apk php82-ctype 8.2.13-r0 apk
php82-curl 8.2.8-r0 apk php82-curl 8.2.13-r0 apk
php82-fileinfo 8.2.8-r0 apk php82-fileinfo 8.2.13-r0 apk
php82-fpm 8.2.8-r0 apk php82-fpm 8.2.13-r0 apk
php82-iconv 8.2.8-r0 apk php82-iconv 8.2.13-r0 apk
php82-intl 8.2.8-r0 apk php82-intl 8.2.13-r0 apk
php82-mbstring 8.2.8-r0 apk php82-mbstring 8.2.13-r0 apk
php82-mysqlnd 8.2.8-r0 apk php82-mysqlnd 8.2.13-r0 apk
php82-openssl 8.2.8-r0 apk php82-openssl 8.2.13-r0 apk
php82-pdo 8.2.8-r0 apk php82-pdo 8.2.13-r0 apk
php82-pdo_mysql 8.2.8-r0 apk php82-pdo_mysql 8.2.13-r0 apk
php82-pdo_pgsql 8.2.8-r0 apk php82-pdo_pgsql 8.2.13-r0 apk
php82-pdo_sqlite 8.2.8-r0 apk php82-pdo_sqlite 8.2.13-r0 apk
php82-phar 8.2.8-r0 apk php82-phar 8.2.13-r0 apk
php82-session 8.2.8-r0 apk php82-session 8.2.13-r0 apk
php82-simplexml 8.2.8-r0 apk php82-simplexml 8.2.13-r0 apk
php82-tokenizer 8.2.8-r0 apk php82-tokenizer 8.2.13-r0 apk
php82-xml 8.2.8-r0 apk php82-xml 8.2.13-r0 apk
php82-xmlwriter 8.2.8-r0 apk php82-xmlwriter 8.2.13-r0 apk
php82-zip 8.2.8-r0 apk php82-zip 8.2.13-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
@@ -149,7 +147,7 @@ phpunit/php-text-template
phpunit/php-timer 5.0.3 php-composer phpunit/php-timer 5.0.3 php-composer
phpunit/phpunit 9.5.26 php-composer phpunit/phpunit 9.5.26 php-composer
popt 1.19-r2 apk popt 1.19-r2 apk
procps-ng 4.0.3-r1 apk procps-ng 4.0.4-r0 apk
psr/cache 1.0.1 php-composer psr/cache 1.0.1 php-composer
psr/container 1.1.2 php-composer psr/container 1.1.2 php-composer
psr/event-dispatcher 1.0.0 php-composer psr/event-dispatcher 1.0.0 php-composer
@@ -184,7 +182,7 @@ shadow
skalibs 2.13.1.1-r1 apk skalibs 2.13.1.1-r1 apk
sqlite-libs 3.41.2-r2 apk sqlite-libs 3.41.2-r2 apk
squizlabs/php_codesniffer 3.7.1 php-composer squizlabs/php_codesniffer 3.7.1 php-composer
ssl_client 1.36.1-r2 apk ssl_client 1.36.1-r5 apk
swiftmailer/swiftmailer v6.3.0 php-composer swiftmailer/swiftmailer v6.3.0 php-composer
symfony/cache v5.4.15 php-composer symfony/cache v5.4.15 php-composer
symfony/cache-contracts v2.5.2 php-composer symfony/cache-contracts v2.5.2 php-composer
@@ -221,7 +219,7 @@ symfony/var-exporter
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 2023c-r1 apk tzdata 2023d-r0 apk
utmps-libs 0.1.2.1-r1 apk utmps-libs 0.1.2.1-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

View File

@@ -4,7 +4,7 @@ DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /var/www/localhost/heimdall/public;" OLD_ROOT="root /var/www/localhost/heimdall/public;"
NEW_ROOT="root /app/www/public;" NEW_ROOT="root /app/www/public;"
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then if [[ -f "${DEFAULT_CONF}" ]] && grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
echo "updating root in ${DEFAULT_CONF}" echo "updating root in ${DEFAULT_CONF}"
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}" sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
fi fi