mirror of
				https://github.com/linuxserver/docker-heimdall.git
				synced 2025-10-31 21:17:39 +09:00 
			
		
		
		
	initial release for v3 on js tag
This commit is contained in:
		
							
								
								
									
										24
									
								
								.github/workflows/external_trigger.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/external_trigger.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,24 +4,24 @@ on: | ||||
|   workflow_dispatch: | ||||
|  | ||||
| jobs: | ||||
|   external-trigger-master: | ||||
|   external-trigger-js: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2.3.3 | ||||
|  | ||||
|       - name: External Trigger | ||||
|         if: github.ref == 'refs/heads/master' | ||||
|         if: github.ref == 'refs/heads/js' | ||||
|         run: | | ||||
|           if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_HEIMDALL_MASTER }}" ]; then | ||||
|             echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_HEIMDALL_MASTER is set; skipping trigger. ****" | ||||
|           if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_HEIMDALL_JS }}" ]; then | ||||
|             echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_HEIMDALL_JS is set; skipping trigger. ****" | ||||
|             exit 0 | ||||
|           fi | ||||
|           echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_HEIMDALL_MASTER\". ****" | ||||
|           echo "**** External trigger running off of js branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_HEIMDALL_JS\". ****" | ||||
|           echo "**** Retrieving external version ****" | ||||
|           EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | jq -r '. | .tag_name') | ||||
|           EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/linuxserver/heimdalljs/commits/master" | jq -r '. | .sha' | cut -c1-8) | ||||
|           if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then | ||||
|             echo "**** Can't retrieve external version, exiting ****" | ||||
|             FAILURE_REASON="Can't retrieve external version for heimdall branch master" | ||||
|             FAILURE_REASON="Can't retrieve external version for heimdall branch js" | ||||
|             GHA_TRIGGER_URL="https://github.com/linuxserver/docker-heimdall/actions/runs/${{ github.run_id }}" | ||||
|             curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, | ||||
|               "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}], | ||||
| @@ -32,7 +32,7 @@ jobs: | ||||
|           echo "**** External version: ${EXT_RELEASE} ****" | ||||
|           echo "**** Retrieving last pushed version ****" | ||||
|           image="linuxserver/heimdall" | ||||
|           tag="latest" | ||||
|           tag="js" | ||||
|           token=$(curl -sX GET \ | ||||
|             "https://ghcr.io/token?scope=repository%3Alinuxserver%2Fheimdall%3Apull" \ | ||||
|             | jq -r '.token') | ||||
| @@ -54,7 +54,7 @@ jobs: | ||||
|           IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}') | ||||
|           if [ -z "${IMAGE_VERSION}" ]; then | ||||
|             echo "**** Can't retrieve last pushed version, exiting ****" | ||||
|             FAILURE_REASON="Can't retrieve last pushed version for heimdall tag latest" | ||||
|             FAILURE_REASON="Can't retrieve last pushed version for heimdall tag js" | ||||
|             curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, | ||||
|               "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], | ||||
|               "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} | ||||
| @@ -64,13 +64,13 @@ jobs: | ||||
|           if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then | ||||
|             echo "**** Version ${EXT_RELEASE} already pushed, exiting ****" | ||||
|             exit 0 | ||||
|           elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then | ||||
|           elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/js/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 ****" | ||||
|             exit 0 | ||||
|           else | ||||
|             echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****" | ||||
|             response=$(curl -iX POST \ | ||||
|               https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/buildWithParameters?PACKAGE_CHECK=false \ | ||||
|               https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/js/buildWithParameters?PACKAGE_CHECK=false \ | ||||
|               --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") | ||||
|             echo "**** Jenkins job queue url: ${response%$'\r'} ****" | ||||
|             echo "**** Sleeping 10 seconds until job starts ****" | ||||
| @@ -85,7 +85,7 @@ jobs: | ||||
|               --data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ | ||||
|               --data-urlencode "Submit=Submit" | ||||
|             echo "**** Notifying Discord ****" | ||||
|             TRIGGER_REASON="A version change was detected for heimdall tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}" | ||||
|             TRIGGER_REASON="A version change was detected for heimdall tag js. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}" | ||||
|             curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, | ||||
|               "description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}], | ||||
|               "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} | ||||
|   | ||||
							
								
								
									
										14
									
								
								.github/workflows/package_trigger.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/package_trigger.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,25 +4,25 @@ on: | ||||
|   workflow_dispatch: | ||||
|  | ||||
| jobs: | ||||
|   package-trigger-master: | ||||
|   package-trigger-js: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2.3.3 | ||||
|  | ||||
|       - name: Package Trigger | ||||
|         if: github.ref == 'refs/heads/master' | ||||
|         if: github.ref == 'refs/heads/js' | ||||
|         run: | | ||||
|           if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_HEIMDALL_MASTER }}" ]; then | ||||
|             echo "**** Github secret PAUSE_PACKAGE_TRIGGER_HEIMDALL_MASTER is set; skipping trigger. ****" | ||||
|           if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_HEIMDALL_JS }}" ]; then | ||||
|             echo "**** Github secret PAUSE_PACKAGE_TRIGGER_HEIMDALL_JS is set; skipping trigger. ****" | ||||
|             exit 0 | ||||
|           fi | ||||
|           if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then | ||||
|           if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/js/lastBuild/api/json | jq -r '.building') == "true" ]; then | ||||
|             echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****" | ||||
|             exit 0 | ||||
|           fi | ||||
|           echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_HEIMDALL_MASTER\". ****" | ||||
|           echo "**** Package trigger running off of js branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_HEIMDALL_JS\". ****" | ||||
|           response=$(curl -iX POST \ | ||||
|             https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/buildWithParameters?PACKAGE_CHECK=true \ | ||||
|             https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/js/buildWithParameters?PACKAGE_CHECK=true \ | ||||
|             --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") | ||||
|           echo "**** Jenkins job queue url: ${response%$'\r'} ****" | ||||
|           echo "**** Sleeping 10 seconds until job starts ****" | ||||
|   | ||||
							
								
								
									
										45
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.12 | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine:3.13 | ||||
|  | ||||
| # set version label | ||||
| ARG BUILD_DATE | ||||
| @@ -8,31 +8,44 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA | ||||
| LABEL maintainer="aptalca" | ||||
|  | ||||
| # environment settings | ||||
| ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 | ||||
| ENV \ | ||||
|   HOME="/app/heimdall" \ | ||||
|   NODE_ENV="production" | ||||
|  | ||||
| RUN \ | ||||
|  echo "**** install runtime packages ****" && \ | ||||
|  apk add --no-cache --upgrade \ | ||||
|   echo "**** install build packages ****" && \ | ||||
|   apk add --no-cache --virtual=build-dependencies \ | ||||
|   	curl \ | ||||
| 	php7-ctype \ | ||||
| 	php7-curl \ | ||||
| 	php7-pdo_pgsql \ | ||||
| 	php7-pdo_sqlite \ | ||||
| 	php7-tokenizer \ | ||||
| 	php7-zip \ | ||||
| 	tar && \ | ||||
|   	g++ \ | ||||
|   	make \ | ||||
|   	python3 && \ | ||||
|   echo "**** install runtime packages ****" && \ | ||||
|   apk add --no-cache \ | ||||
|     nodejs \ | ||||
|     npm && \ | ||||
|   echo "**** install heimdall ****" && \ | ||||
|   mkdir -p \ | ||||
| 	/heimdall && \ | ||||
|     /app/heimdall && \ | ||||
|   if [ -z ${HEIMDALL_RELEASE+x} ]; then \ | ||||
| 	HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \ | ||||
| 	| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||
|     HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/heimdalljs/commits/master" \ | ||||
|     | awk '/sha/{print $4;exit}' FS='[""]'); \ | ||||
|   fi && \ | ||||
|   curl -o \ | ||||
|  /heimdall/heimdall.tar.gz -L \ | ||||
| 	"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|     /tmp/heimdalljs.tar.gz -L \ | ||||
|     "https://github.com/linuxserver/heimdalljs/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdalljs.tar.gz -C \ | ||||
|     /app/heimdall/ --strip-components=1 && \ | ||||
|   cd /app/heimdall && \ | ||||
|   NODE_ENV="development" npm install && \ | ||||
|   cp .env.example .env && \ | ||||
|   npm run build && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   npm prune --production && \ | ||||
|   apk del --purge \ | ||||
|     build-dependencies && \ | ||||
|   rm -rf \ | ||||
|     /root/.cache \ | ||||
|     /tmp/* | ||||
|  | ||||
| # add local files | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.12 | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.13 | ||||
|  | ||||
| # set version label | ||||
| ARG BUILD_DATE | ||||
| @@ -8,31 +8,44 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA | ||||
| LABEL maintainer="aptalca" | ||||
|  | ||||
| # environment settings | ||||
| ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 | ||||
| ENV \ | ||||
|   HOME="/app/heimdall" \ | ||||
|   NODE_ENV="production" | ||||
|  | ||||
| RUN \ | ||||
|  echo "**** install runtime packages ****" && \ | ||||
|  apk add --no-cache --upgrade \ | ||||
|   echo "**** install build packages ****" && \ | ||||
|   apk add --no-cache --virtual=build-dependencies \ | ||||
|   	curl \ | ||||
| 	php7-ctype \ | ||||
| 	php7-curl \ | ||||
| 	php7-pdo_pgsql \ | ||||
| 	php7-pdo_sqlite \ | ||||
| 	php7-tokenizer \ | ||||
| 	php7-zip \ | ||||
| 	tar && \ | ||||
|   	g++ \ | ||||
|   	make \ | ||||
|   	python3 && \ | ||||
|   echo "**** install runtime packages ****" && \ | ||||
|   apk add --no-cache \ | ||||
|     nodejs \ | ||||
|     npm && \ | ||||
|   echo "**** install heimdall ****" && \ | ||||
|   mkdir -p \ | ||||
| 	/heimdall && \ | ||||
|     /app/heimdall && \ | ||||
|   if [ -z ${HEIMDALL_RELEASE+x} ]; then \ | ||||
| 	HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \ | ||||
| 	| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||
|     HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/heimdalljs/commits/master" \ | ||||
|     | awk '/sha/{print $4;exit}' FS='[""]'); \ | ||||
|   fi && \ | ||||
|   curl -o \ | ||||
|  /heimdall/heimdall.tar.gz -L \ | ||||
| 	"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|     /tmp/heimdalljs.tar.gz -L \ | ||||
|     "https://github.com/linuxserver/heimdalljs/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdalljs.tar.gz -C \ | ||||
|     /app/heimdall/ --strip-components=1 && \ | ||||
|   cd /app/heimdall && \ | ||||
|   NODE_ENV="development" npm install && \ | ||||
|   cp .env.example .env && \ | ||||
|   npm run build && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   npm prune --production && \ | ||||
|   apk del --purge \ | ||||
|     build-dependencies && \ | ||||
|   rm -rf \ | ||||
|     /root/.cache \ | ||||
|     /tmp/* | ||||
|  | ||||
| # add local files | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.12 | ||||
| FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.13 | ||||
|  | ||||
| # set version label | ||||
| ARG BUILD_DATE | ||||
| @@ -8,31 +8,44 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA | ||||
| LABEL maintainer="aptalca" | ||||
|  | ||||
| # environment settings | ||||
| ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 | ||||
| ENV \ | ||||
|   HOME="/app/heimdall" \ | ||||
|   NODE_ENV="production" | ||||
|  | ||||
| RUN \ | ||||
|  echo "**** install runtime packages ****" && \ | ||||
|  apk add --no-cache --upgrade \ | ||||
|   echo "**** install build packages ****" && \ | ||||
|   apk add --no-cache --virtual=build-dependencies \ | ||||
|   	curl \ | ||||
| 	php7-ctype \ | ||||
| 	php7-curl \ | ||||
| 	php7-pdo_pgsql \ | ||||
| 	php7-pdo_sqlite \ | ||||
| 	php7-tokenizer \ | ||||
| 	php7-zip \ | ||||
| 	tar && \ | ||||
|   	g++ \ | ||||
|   	make \ | ||||
|   	python3 && \ | ||||
|   echo "**** install runtime packages ****" && \ | ||||
|   apk add --no-cache \ | ||||
|     nodejs \ | ||||
|     npm && \ | ||||
|   echo "**** install heimdall ****" && \ | ||||
|   mkdir -p \ | ||||
| 	/heimdall && \ | ||||
|     /app/heimdall && \ | ||||
|   if [ -z ${HEIMDALL_RELEASE+x} ]; then \ | ||||
| 	HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \ | ||||
| 	| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||||
|     HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/heimdalljs/commits/master" \ | ||||
|     | awk '/sha/{print $4;exit}' FS='[""]'); \ | ||||
|   fi && \ | ||||
|   curl -o \ | ||||
|  /heimdall/heimdall.tar.gz -L \ | ||||
| 	"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|     /tmp/heimdalljs.tar.gz -L \ | ||||
|     "https://github.com/linuxserver/heimdalljs/archive/${HEIMDALL_RELEASE}.tar.gz" && \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdalljs.tar.gz -C \ | ||||
|     /app/heimdall/ --strip-components=1 && \ | ||||
|   cd /app/heimdall && \ | ||||
|   NODE_ENV="development" npm install && \ | ||||
|   cp .env.example .env && \ | ||||
|   npm run build && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   npm prune --production && \ | ||||
|   apk del --purge \ | ||||
|     build-dependencies && \ | ||||
|   rm -rf \ | ||||
|     /root/.cache \ | ||||
|     /tmp/* | ||||
|  | ||||
| # add local files | ||||
|   | ||||
							
								
								
									
										110
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										110
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							| @@ -18,7 +18,7 @@ pipeline { | ||||
|     GITLAB_NAMESPACE=credentials('gitlab-namespace-id') | ||||
|     EXT_GIT_BRANCH = 'master' | ||||
|     EXT_USER = 'linuxserver' | ||||
|     EXT_REPO = 'Heimdall' | ||||
|     EXT_REPO = 'heimdalljs' | ||||
|     CONTAINER_NAME = 'heimdall' | ||||
|     BUILD_VERSION_ARG = 'HEIMDALL_RELEASE' | ||||
|     LS_USER = 'linuxserver' | ||||
| @@ -44,7 +44,7 @@ pipeline { | ||||
|         script{ | ||||
|           env.EXIT_STATUS = '' | ||||
|           env.LS_RELEASE = sh( | ||||
|             script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', | ||||
|             script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':js 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', | ||||
|             returnStdout: true).trim() | ||||
|           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' ''', | ||||
| @@ -101,21 +101,21 @@ pipeline { | ||||
|     /* ######################## | ||||
|        External Release Tagging | ||||
|        ######################## */ | ||||
|     // If this is a stable github release use the latest endpoint from github to determine the ext tag | ||||
|     stage("Set ENV github_stable"){ | ||||
|     // If this is a github commit trigger determine the current commit at head | ||||
|     stage("Set ENV github_commit"){ | ||||
|      steps{ | ||||
|        script{ | ||||
|          env.EXT_RELEASE = sh( | ||||
|            script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', | ||||
|            script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''', | ||||
|            returnStdout: true).trim() | ||||
|        } | ||||
|      } | ||||
|     } | ||||
|     // If this is a stable or devel github release generate the link for the build message | ||||
|     stage("Set ENV github_link"){ | ||||
|     // If this is a github commit trigger Set the external release link | ||||
|     stage("Set ENV commit_link"){ | ||||
|      steps{ | ||||
|        script{ | ||||
|          env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE | ||||
|          env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE | ||||
|        } | ||||
|      } | ||||
|     } | ||||
| @@ -129,10 +129,10 @@ pipeline { | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     // If this is a master build use live docker endpoints | ||||
|     // If this is a js build use live docker endpoints | ||||
|     stage("Set ENV live build"){ | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|       } | ||||
|       steps { | ||||
| @@ -141,20 +141,20 @@ pipeline { | ||||
|           env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME | ||||
|           env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME | ||||
|           if (env.MULTIARCH == 'true') { | ||||
|             env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|             env.CI_TAGS = 'amd64-js-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-js-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-js-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|           } else { | ||||
|             env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|             env.CI_TAGS = 'js-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|           } | ||||
|           env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|           env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|           env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN | ||||
|           env.META_TAG = 'js-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|           env.EXT_RELEASE_TAG = 'js-version-' + env.EXT_RELEASE_CLEAN | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     // If this is a dev build use dev docker endpoints | ||||
|     stage("Set ENV dev build"){ | ||||
|       when { | ||||
|         not {branch "master"} | ||||
|         not {branch "js"} | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|       } | ||||
|       steps { | ||||
| @@ -163,13 +163,13 @@ pipeline { | ||||
|           env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME | ||||
|           env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME | ||||
|           if (env.MULTIARCH == 'true') { | ||||
|             env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|             env.CI_TAGS = 'amd64-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|           } else { | ||||
|             env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|             env.CI_TAGS = 'js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|           } | ||||
|           env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|           env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|           env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN | ||||
|           env.META_TAG = 'js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA | ||||
|           env.EXT_RELEASE_TAG = 'js-version-' + env.EXT_RELEASE_CLEAN | ||||
|           env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/' | ||||
|         } | ||||
|       } | ||||
| @@ -185,13 +185,13 @@ pipeline { | ||||
|           env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME | ||||
|           env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME | ||||
|           if (env.MULTIARCH == 'true') { | ||||
|             env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|             env.CI_TAGS = 'amd64-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|           } else { | ||||
|             env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|             env.CI_TAGS = 'js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|           } | ||||
|           env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|           env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|           env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN | ||||
|           env.META_TAG = 'js-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST | ||||
|           env.EXT_RELEASE_TAG = 'js-version-' + env.EXT_RELEASE_CLEAN | ||||
|           env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST | ||||
|           env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/' | ||||
|         } | ||||
| @@ -229,7 +229,7 @@ pipeline { | ||||
|     // Use helper containers to render templated files | ||||
|     stage('Update-Templates') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|         expression { | ||||
|           env.CONTAINER_NAME != null | ||||
| @@ -240,13 +240,13 @@ pipeline { | ||||
|               set -e | ||||
|               TEMPDIR=$(mktemp -d) | ||||
|               docker pull ghcr.io/linuxserver/jenkins-builder:latest | ||||
|               docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest  | ||||
|               docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=js -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest  | ||||
|               # Stage 1 - Jenkinsfile update | ||||
|               if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then | ||||
|                 mkdir -p ${TEMPDIR}/repo | ||||
|                 git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 cd ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 git checkout -f master | ||||
|                 git checkout -f js | ||||
|                 cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ | ||||
|                 git add Jenkinsfile | ||||
|                 git commit -m 'Bot Updating Templated Files' | ||||
| @@ -269,7 +269,7 @@ pipeline { | ||||
|                 mkdir -p ${TEMPDIR}/repo | ||||
|                 git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 cd ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 git checkout -f master | ||||
|                 git checkout -f js | ||||
|                 cd ${TEMPDIR}/docker-${CONTAINER_NAME} | ||||
|                 for i in ${TEMPLATES_TO_DELETE}; do | ||||
|                   git rm "${i}" | ||||
| @@ -291,7 +291,7 @@ pipeline { | ||||
|                 mkdir -p ${TEMPDIR}/repo | ||||
|                 git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 cd ${TEMPDIR}/repo/${LS_REPO} | ||||
|                 git checkout -f master | ||||
|                 git checkout -f js | ||||
|                 cd ${TEMPDIR}/docker-${CONTAINER_NAME} | ||||
|                 mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows | ||||
|                 mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE | ||||
| @@ -345,7 +345,7 @@ pipeline { | ||||
|     // Exit the build if the Templated files were just updated | ||||
|     stage('Template-exit') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|         environment name: 'FILES_UPDATED', value: 'true' | ||||
|         expression { | ||||
| @@ -454,7 +454,7 @@ pipeline { | ||||
|     // Take the image we just built and dump package versions for comparison | ||||
|     stage('Update-packages') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|         environment name: 'EXIT_STATUS', value: '' | ||||
|       } | ||||
| @@ -482,7 +482,7 @@ pipeline { | ||||
|               echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github" | ||||
|               if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then | ||||
|                 git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO} | ||||
|                 git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master | ||||
|                 git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f js | ||||
|                 cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/ | ||||
|                 cd ${TEMPDIR}/${LS_REPO}/ | ||||
|                 wait | ||||
| @@ -506,7 +506,7 @@ pipeline { | ||||
|     // Exit the build if the package file was just updated | ||||
|     stage('PACKAGE-exit') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|         environment name: 'PACKAGE_UPDATED', value: 'true' | ||||
|         environment name: 'EXIT_STATUS', value: '' | ||||
| @@ -527,7 +527,7 @@ pipeline { | ||||
|     // Exit the build if this is just a package check and there are no changes to push | ||||
|     stage('PACKAGECHECK-exit') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         environment name: 'CHANGE_ID', value: '' | ||||
|         environment name: 'PACKAGE_UPDATED', value: 'false' | ||||
|         environment name: 'EXIT_STATUS', value: '' | ||||
| @@ -623,9 +623,9 @@ pipeline { | ||||
|                   echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin | ||||
|                   for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do | ||||
|                     docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG} | ||||
|                     docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest | ||||
|                     docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:js | ||||
|                     docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG} | ||||
|                     docker push ${PUSHIMAGE}:latest | ||||
|                     docker push ${PUSHIMAGE}:js | ||||
|                     docker push ${PUSHIMAGE}:${META_TAG} | ||||
|                     docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG} | ||||
|                   done | ||||
| @@ -636,7 +636,7 @@ pipeline { | ||||
|                   docker rmi \ | ||||
|                   ${DELETEIMAGE}:${META_TAG} \ | ||||
|                   ${DELETEIMAGE}:${EXT_RELEASE_TAG} \ | ||||
|                   ${DELETEIMAGE}:latest || : | ||||
|                   ${DELETEIMAGE}:js || : | ||||
|                 done | ||||
|              ''' | ||||
|         } | ||||
| @@ -673,25 +673,25 @@ pipeline { | ||||
|                     docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} | ||||
|                     docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} | ||||
|                     docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} | ||||
|                     docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest | ||||
|                     docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest | ||||
|                     docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest | ||||
|                     docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-js | ||||
|                     docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-js | ||||
|                     docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-js | ||||
|                     docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} | ||||
|                     docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} | ||||
|                     docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:amd64-${META_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:amd64-latest | ||||
|                     docker push ${MANIFESTIMAGE}:arm32v7-latest | ||||
|                     docker push ${MANIFESTIMAGE}:arm64v8-latest | ||||
|                     docker push ${MANIFESTIMAGE}:amd64-js | ||||
|                     docker push ${MANIFESTIMAGE}:arm32v7-js | ||||
|                     docker push ${MANIFESTIMAGE}:arm64v8-js | ||||
|                     docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} | ||||
|                     docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:latest || : | ||||
|                     docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8 | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:js || : | ||||
|                     docker manifest create ${MANIFESTIMAGE}:js ${MANIFESTIMAGE}:amd64-js ${MANIFESTIMAGE}:arm32v7-js ${MANIFESTIMAGE}:arm64v8-js | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:js ${MANIFESTIMAGE}:arm32v7-js --os linux --arch arm | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:js ${MANIFESTIMAGE}:arm64v8-js --os linux --arch arm64 --variant v8 | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || : | ||||
|                     docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm | ||||
| @@ -700,7 +700,7 @@ pipeline { | ||||
|                     docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm | ||||
|                     docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8 | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:latest | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:js | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}  | ||||
|                     docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}  | ||||
|                   done | ||||
| @@ -710,13 +710,13 @@ pipeline { | ||||
|                 for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do | ||||
|                   docker rmi \ | ||||
|                   ${DELETEIMAGE}:amd64-${META_TAG} \ | ||||
|                   ${DELETEIMAGE}:amd64-latest \ | ||||
|                   ${DELETEIMAGE}:amd64-js \ | ||||
|                   ${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \ | ||||
|                   ${DELETEIMAGE}:arm32v7-${META_TAG} \ | ||||
|                   ${DELETEIMAGE}:arm32v7-latest \ | ||||
|                   ${DELETEIMAGE}:arm32v7-js \ | ||||
|                   ${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \ | ||||
|                   ${DELETEIMAGE}:arm64v8-${META_TAG} \ | ||||
|                   ${DELETEIMAGE}:arm64v8-latest \ | ||||
|                   ${DELETEIMAGE}:arm64v8-js \ | ||||
|                   ${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || : | ||||
|                 done | ||||
|                 docker rmi \ | ||||
| @@ -729,7 +729,7 @@ pipeline { | ||||
|     // If this is a public release tag it in the LS Github | ||||
|     stage('Github-Tag-Push-Release') { | ||||
|       when { | ||||
|         branch "master" | ||||
|         branch "js" | ||||
|         expression { | ||||
|           env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER | ||||
|         } | ||||
| @@ -741,17 +741,17 @@ pipeline { | ||||
|         sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ | ||||
|         -d '{"tag":"'${META_TAG}'",\ | ||||
|              "object": "'${COMMIT_SHA}'",\ | ||||
|              "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\ | ||||
|              "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to js",\ | ||||
|              "type": "commit",\ | ||||
|              "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' | ||||
|         echo "Pushing New release for Tag" | ||||
|         sh '''#! /bin/bash | ||||
|               curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json | ||||
|               curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json | ||||
|               echo '{"tag_name":"'${META_TAG}'",\ | ||||
|                      "target_commitish": "master",\ | ||||
|                      "target_commitish": "js",\ | ||||
|                      "name": "'${META_TAG}'",\ | ||||
|                      "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start | ||||
|               printf '","draft": false,"prerelease": false}' >> releasebody.json | ||||
|               printf '","draft": false,"prerelease": true}' >> releasebody.json | ||||
|               paste -d'\\0' start releasebody.json > releasebody.json.done | ||||
|               curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' | ||||
|       } | ||||
|   | ||||
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @@ -35,7 +35,7 @@ Find us at: | ||||
| [](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com") | ||||
| [](https://hub.docker.com/r/linuxserver/heimdall) | ||||
| [](https://hub.docker.com/r/linuxserver/heimdall) | ||||
| [](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/) | ||||
| [](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/js/) | ||||
| [](https://ci-tests.linuxserver.io/linuxserver/heimdall/latest/index.html) | ||||
|  | ||||
| [Heimdall](https://heimdall.site) is a way to organise all those links to your most used web sites and web applications in a simple way. | ||||
| @@ -87,10 +87,9 @@ services: | ||||
|       - PGID=1000 | ||||
|       - TZ=Europe/London | ||||
|     volumes: | ||||
|       - </path/to/appdata/config>:/config | ||||
|       - /path/to/appdata/config:/config | ||||
|     ports: | ||||
|       - 80:80 | ||||
|       - 443:443 | ||||
|       - 3000:3000 | ||||
|     restart: unless-stopped | ||||
| ``` | ||||
|  | ||||
| @@ -102,9 +101,8 @@ docker run -d \ | ||||
|   -e PUID=1000 \ | ||||
|   -e PGID=1000 \ | ||||
|   -e TZ=Europe/London \ | ||||
|   -p 80:80 \ | ||||
|   -p 443:443 \ | ||||
|   -v </path/to/appdata/config>:/config \ | ||||
|   -p 3000:3000 \ | ||||
|   -v /path/to/appdata/config:/config \ | ||||
|   --restart unless-stopped \ | ||||
|   ghcr.io/linuxserver/heimdall | ||||
| ``` | ||||
| @@ -116,8 +114,7 @@ Container images are configured using parameters passed at runtime (such as thos | ||||
|  | ||||
| | Parameter | Function | | ||||
| | :----: | --- | | ||||
| | `-p 80` | http gui | | ||||
| | `-p 443` | https gui | | ||||
| | `-p 3000` | http gui | | ||||
| | `-e PUID=1000` | for UserID - see below for explanation | | ||||
| | `-e PGID=1000` | for GroupID - see below for explanation | | ||||
| | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London | | ||||
| @@ -236,6 +233,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 | ||||
|  | ||||
| ## Versions | ||||
|  | ||||
| * **12.04.21:** - Add experimental `js` tag for v3. | ||||
| * **10.02.21:** - Revert to alpine 3.12 as php 7.4 broke laravel. | ||||
| * **10.02.21:** - Rebasing to alpine 3.13. | ||||
| * **17.08.20:** - Add php7-curl. | ||||
|   | ||||
| @@ -2,14 +2,14 @@ | ||||
|  | ||||
| # jenkins variables | ||||
| project_name: docker-heimdall | ||||
| external_type: github_stable | ||||
| release_type: stable | ||||
| release_tag: latest | ||||
| ls_branch: master | ||||
| external_type: github_commit | ||||
| release_type: prerelease | ||||
| release_tag: js | ||||
| ls_branch: js | ||||
| repo_vars: | ||||
|   - EXT_GIT_BRANCH = 'master' | ||||
|   - EXT_USER = 'linuxserver' | ||||
|   - EXT_REPO = 'Heimdall' | ||||
|   - EXT_REPO = 'heimdalljs' | ||||
|   - CONTAINER_NAME = 'heimdall' | ||||
|   - BUILD_VERSION_ARG = 'HEIMDALL_RELEASE' | ||||
|   - LS_USER = 'linuxserver' | ||||
|   | ||||
| @@ -28,11 +28,10 @@ common_param_env_vars_enabled: true | ||||
| param_container_name: "{{ project_name }}" | ||||
| param_usage_include_vols: true | ||||
| param_volumes: | ||||
|   - { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Contains all relevant configuration files." } | ||||
|   - { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files." } | ||||
| param_usage_include_ports: true | ||||
| param_ports: | ||||
|   - { external_port: "80", internal_port: "80", port_desc: "http gui" } | ||||
|   - { external_port: "443", internal_port: "443", port_desc: "https gui" } | ||||
|   - { external_port: "3000", internal_port: "3000", port_desc: "http gui" } | ||||
| param_usage_include_env: true | ||||
| param_env_vars: | ||||
|   - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} | ||||
| @@ -49,6 +48,7 @@ app_setup_block: | | ||||
|  | ||||
| # changelog | ||||
| changelogs: | ||||
|   - { date: "12.04.21:", desc: "Add experimental `js` tag for v3." } | ||||
|   - { date: "10.02.21:", desc: "Revert to alpine 3.12 as php 7.4 broke laravel." } | ||||
|   - { date: "10.02.21:", desc: "Rebasing to alpine 3.13." } | ||||
|   - { date: "17.08.20:", desc: "Add php7-curl." } | ||||
|   | ||||
| @@ -1,43 +0,0 @@ | ||||
| ## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default | ||||
|  | ||||
| server { | ||||
| 	listen 80 default_server; | ||||
|  | ||||
| 	listen 443 ssl; | ||||
|  | ||||
| 	root /var/www/localhost/heimdall/public; | ||||
| 	index index.php index.html index.htm; | ||||
|  | ||||
| 	server_name _; | ||||
|  | ||||
| 	ssl_certificate /config/keys/cert.crt; | ||||
| 	ssl_certificate_key /config/keys/cert.key; | ||||
|  | ||||
| 	client_max_body_size 0; | ||||
| 	 | ||||
|         error_page 599 = @noauth; | ||||
|  | ||||
|         location / { | ||||
|                 if (!-f /config/nginx/.htpasswd) { | ||||
|                         return 599; | ||||
|                 } | ||||
|                 auth_basic "Restricted"; | ||||
|                 auth_basic_user_file /config/nginx/.htpasswd; | ||||
|                 try_files $uri $uri/ /index.php?$args; | ||||
|         } | ||||
|  | ||||
|         location @noauth { | ||||
|                 try_files $uri $uri/ /index.php?$args; | ||||
|         } | ||||
|  | ||||
| 	location ~ \.php$ { | ||||
| 		fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
| 		# With php5-cgi alone: | ||||
| 		fastcgi_pass 127.0.0.1:9000; | ||||
| 		# With php5-fpm: | ||||
| 		#fastcgi_pass unix:/var/run/php5-fpm.sock; | ||||
| 		fastcgi_index index.php; | ||||
| 		include /etc/nginx/fastcgi_params; | ||||
|  | ||||
| 	} | ||||
| } | ||||
| @@ -1,98 +0,0 @@ | ||||
| user abc; | ||||
| worker_processes 4; | ||||
| pid /run/nginx.pid; | ||||
| include /etc/nginx/modules/*.conf; | ||||
|  | ||||
| events { | ||||
| 	worker_connections 768; | ||||
| 	# multi_accept on; | ||||
| } | ||||
|  | ||||
| http { | ||||
|  | ||||
| 	## | ||||
| 	# Basic Settings | ||||
| 	## | ||||
|  | ||||
| 	sendfile on; | ||||
| 	tcp_nopush on; | ||||
| 	tcp_nodelay on; | ||||
| 	keepalive_timeout 65; | ||||
| 	types_hash_max_size 2048; | ||||
| 	# server_tokens off; | ||||
|  | ||||
| 	# server_names_hash_bucket_size 64; | ||||
| 	# server_name_in_redirect off; | ||||
|  | ||||
| 	client_max_body_size 0; | ||||
|  | ||||
| 	include /etc/nginx/mime.types; | ||||
| 	default_type application/octet-stream; | ||||
|  | ||||
| 	## | ||||
| 	# Logging Settings | ||||
| 	## | ||||
|  | ||||
| 	access_log /config/log/nginx/access.log; | ||||
| 	error_log /config/log/nginx/error.log; | ||||
|  | ||||
| 	## | ||||
| 	# Gzip Settings | ||||
| 	## | ||||
|  | ||||
| 	gzip on; | ||||
| 	gzip_disable "msie6"; | ||||
|  | ||||
| 	# gzip_vary on; | ||||
| 	# gzip_proxied any; | ||||
| 	# gzip_comp_level 6; | ||||
| 	# gzip_buffers 16 8k; | ||||
| 	# gzip_http_version 1.1; | ||||
| 	# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||||
|  | ||||
| 	## | ||||
| 	# nginx-naxsi config | ||||
| 	## | ||||
| 	# Uncomment it if you installed nginx-naxsi | ||||
| 	## | ||||
|  | ||||
| 	#include /etc/nginx/naxsi_core.rules; | ||||
|  | ||||
| 	## | ||||
| 	# nginx-passenger config | ||||
| 	## | ||||
| 	# Uncomment it if you installed nginx-passenger | ||||
| 	## | ||||
|  | ||||
| 	#passenger_root /usr; | ||||
| 	#passenger_ruby /usr/bin/ruby; | ||||
|  | ||||
| 	## | ||||
| 	# Virtual Host Configs | ||||
| 	## | ||||
| 	include /etc/nginx/conf.d/*.conf; | ||||
| 	include /config/nginx/site-confs/*; | ||||
| } | ||||
|  | ||||
|  | ||||
| #mail { | ||||
| #	# See sample authentication script at: | ||||
| #	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript | ||||
| # | ||||
| #	# auth_http localhost/auth.php; | ||||
| #	# pop3_capabilities "TOP" "USER"; | ||||
| #	# imap_capabilities "IMAP4rev1" "UIDPLUS"; | ||||
| # | ||||
| #	server { | ||||
| #		listen     localhost:110; | ||||
| #		protocol   pop3; | ||||
| #		proxy      on; | ||||
| #	} | ||||
| # | ||||
| #	server { | ||||
| #		listen     localhost:143; | ||||
| #		protocol   imap; | ||||
| #		proxy      on; | ||||
| #	} | ||||
| #} | ||||
| daemon off; | ||||
| @@ -1,52 +1,29 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
|  | ||||
| # make our folders | ||||
| mkdir -p \ | ||||
| 	/config/www/{backgrounds,icons,avatars,SupportedApps} \ | ||||
| 	/var/www/localhost/heimdall \ | ||||
| 	/config/log/heimdall | ||||
| mkdir -p /config/uploads | ||||
|  | ||||
| # install heimdall if necessary | ||||
| [[ -f /heimdall/heimdall.tar.gz ]] && \ | ||||
|  echo "New container detected, installing Heimdall" && \ | ||||
|  tar xf \ | ||||
|  	/heimdall/heimdall.tar.gz -C \ | ||||
| 	/var/www/localhost/heimdall --strip-components=1 && \ | ||||
|  echo -e '\n# Heimdall user authorization\nfastcgi_param  PHP_AUTH_USER $remote_user;\nfastcgi_param  PHP_AUTH_PW $http_authorization;' >> \ | ||||
| 	/etc/nginx/fastcgi_params && \ | ||||
|  rm -rf /heimdall && \ | ||||
|  chown -R abc:abc /var/www/localhost/heimdall | ||||
| if [ ! -f "/config/env" ]; then | ||||
|     cp /app/heimdall/.env.example /config/env | ||||
|     rm -rf /app/heimdall/.env | ||||
|     ln -sf /config/env /app/heimdall/.env | ||||
|  | ||||
| # create symlinks | ||||
|     SECRET_KEY=$(date +%s | sha256sum | base64 | head -c 32) | ||||
|     sed -i 's|JWT_SECRET=CHANGE_ME|JWT_SECRET='${SECRET_KEY}'|g' /config/env | ||||
|     sed -i 's|DB_TYPE=mysql|DB_TYPE=sqlite|g' /config/env | ||||
|     sed -i 's|DB_STORAGE=$|DB_STORAGE=/config/app.db|g' /config/env | ||||
|     sed -i 's|UPLOAD_DIR=$|UPLOAD_DIR=/config/uploads|g' /config/env | ||||
|  | ||||
| symlinks=( \ | ||||
| /var/www/localhost/heimdall/storage/app/public/avatars \ | ||||
| /var/www/localhost/heimdall/storage/app/public/backgrounds \ | ||||
| /var/www/localhost/heimdall/storage/app/public/icons \ | ||||
| /var/www/localhost/heimdall/app/SupportedApps \ | ||||
| /var/www/localhost/heimdall/database/app.sqlite \ | ||||
| /var/www/localhost/heimdall/.env ) | ||||
|  | ||||
| for i in "${symlinks[@]}" | ||||
| do | ||||
| [[ -e "$i" && ! -L "$i" ]] && rm -rf "$i" | ||||
| [[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i" | ||||
| done | ||||
|  | ||||
| [[ -e "/var/www/localhost/heimdall/storage/logs/laravel.log" && ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] \ | ||||
| 	&& rm -rf "/var/www/localhost/heimdall/storage/logs/laravel.log" | ||||
| [[ ! -L "/var/www/localhost/heimdall/storage/logs/laravel.log" ]] && \ | ||||
| 	ln -s "/config/log/heimdall/laravel.log" "/var/www/localhost/heimdall/storage/logs/laravel.log" | ||||
|  | ||||
| # copy .env if not exists | ||||
| [[ ! -f /config/www/.env ]] && \ | ||||
|   cp /var/www/localhost/heimdall/.env.example /config/www/.env && \ | ||||
|   echo "Creating app key. This may take a while on slower systems" && \ | ||||
|   php /var/www/localhost/heimdall/artisan key:generate | ||||
| # set queue driver to database | ||||
| sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env | ||||
|     echo "Running migrations. . ." | ||||
|     cd /app/heimdall | ||||
|     npm run db:migrate | ||||
|     npm run db:seed | ||||
| fi | ||||
|  | ||||
| # permissions | ||||
| echo "Setting permissions" | ||||
| echo "Fixing /config permissions. . ." | ||||
| chown -R abc:abc \ | ||||
|     /config | ||||
|  | ||||
| # chown the app directory, but not node_modules | ||||
| echo "Fixing app permissions. . ." | ||||
| find /app/heimdall -maxdepth 1 ! -name node_modules ! -name heimdall -exec chown -R abc:abc '{}' \; | ||||
|   | ||||
| @@ -1,9 +0,0 @@ | ||||
| /config/log/heimdall/laravel.log { | ||||
|         size 5M | ||||
|         rotate 5 | ||||
|         compress | ||||
|         nodateext | ||||
|         notifempty | ||||
|         missingok | ||||
|         su abc abc | ||||
| } | ||||
							
								
								
									
										6
									
								
								root/etc/services.d/heimdalljs/run
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								root/etc/services.d/heimdalljs/run
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
|  | ||||
| cd /app/heimdall || exit | ||||
|  | ||||
| exec \ | ||||
|     s6-setuidgid abc npm run server | ||||
| @@ -1,4 +0,0 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
|  | ||||
| exec \ | ||||
|        s6-setuidgid abc php /var/www/localhost/heimdall/artisan queue:work database --sleep=3 --tries=3 | ||||
		Reference in New Issue
	
	Block a user