Skip to content

Commit 763a408

Browse files
committed
Use /config as home, improve clean up
1 parent 974dd46 commit 763a408

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ ENV RAILS_ENV="production" \
1414
DOCKER_TAG=lscr.io/linuxserver/manyfold:${VERSION} \
1515
PORT=3214 \
1616
RAILS_SERVE_STATIC_FILES=true \
17-
APP_VERSION=${MANYFOLD_VERSION}
17+
APP_VERSION=${MANYFOLD_VERSION} \
18+
HOME=/config
1819

1920
RUN \
2021
apk add --no-cache \
@@ -83,7 +84,9 @@ RUN \
8384
build-dependencies && \
8485
rm -rf \
8586
$HOME/.bundle/cache \
86-
$HOME/.composer \
87+
$HOME/.cache \
88+
$HOME/.npm \
89+
$HOME/.yarn \
8790
/app/www/node_modules/ \
8891
/app/www/tmp/cache/ \
8992
/app/www/vendor/bundle/ruby/3.3.0/cache/* \

Dockerfile.aarch64

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ ENV RAILS_ENV="production" \
1414
DOCKER_TAG=lscr.io/linuxserver/manyfold:${VERSION} \
1515
PORT=3214 \
1616
RAILS_SERVE_STATIC_FILES=true \
17-
APP_VERSION=${MANYFOLD_VERSION}
17+
APP_VERSION=${MANYFOLD_VERSION} \
18+
HOME=/config
1819

1920
RUN \
2021
apk add --no-cache \
@@ -83,7 +84,9 @@ RUN \
8384
build-dependencies && \
8485
rm -rf \
8586
$HOME/.bundle/cache \
86-
$HOME/.composer \
87+
$HOME/.cache \
88+
$HOME/.npm \
89+
$HOME/.yarn \
8790
/app/www/node_modules/ \
8891
/app/www/tmp/cache/ \
8992
/app/www/vendor/bundle/ruby/3.3.0/cache/* \

Jenkinsfile

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,26 +1009,26 @@ pipeline {
10091009
environment name: 'EXIT_STATUS', value: ''
10101010
}
10111011
steps {
1012-
echo "Auto-generating release notes"
1013-
sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then
1014-
echo "Existing tag points to current commit, suggesting no new LS changes"
1015-
AUTO_RELEASE_NOTES="No changes"
1016-
else
1017-
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
1018-
-d '{"tag_name":"'${META_TAG}'",\
1019-
"target_commitish": "main"}' \
1020-
| jq -r '.body' | sed 's|## What.s Changed||')
1021-
fi'''
1022-
echo "Pushing New tag for current commit ${META_TAG}"
1023-
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1024-
-d '{"tag":"'${META_TAG}'",\
1025-
"object": "'${COMMIT_SHA}'",\
1026-
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
1027-
"type": "commit",\
1028-
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
1029-
echo "Pushing New release for Tag"
10301012
sh '''#! /bin/bash
1031-
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
1013+
echo "Auto-generating release notes"
1014+
if [ "$(git tag --points-at HEAD)" != "" ]; then
1015+
echo "Existing tag points to current commit, suggesting no new LS changes"
1016+
AUTO_RELEASE_NOTES="No changes"
1017+
else
1018+
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
1019+
-d '{"tag_name":"'${META_TAG}'",\
1020+
"target_commitish": "main"}' \
1021+
| jq -r '.body' | sed 's|## What.s Changed||')
1022+
fi
1023+
echo "Pushing New tag for current commit ${META_TAG}"
1024+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1025+
-d '{"tag":"'${META_TAG}'",\
1026+
"object": "'${COMMIT_SHA}'",\
1027+
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
1028+
"type": "commit",\
1029+
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}'
1030+
echo "Pushing New release for Tag"
1031+
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json
10321032
jq -n \
10331033
--arg tag_name "$META_TAG" \
10341034
--arg target_commitish "main" \
@@ -1042,7 +1042,8 @@ pipeline {
10421042
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
10431043
"draft": false,
10441044
"prerelease": false }' > releasebody.json.done
1045-
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1045+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1046+
'''
10461047
}
10471048
}
10481049
// Add protection to the release branch

0 commit comments

Comments
 (0)