pull assets from github repo and drop netcore app chowning

This commit is contained in:
thelamer 2020-01-13 14:45:23 -08:00
parent 9d56c5ebe1
commit aadd7496b8
8 changed files with 68 additions and 43 deletions

View File

@ -5,7 +5,7 @@ ARG BUILD_DATE
ARG VERSION
ARG OMBI_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="aptalca"
# environment settings
ENV HOME="/config"
@ -15,20 +15,24 @@ RUN \
apt-get install -y \
jq \
libicu60 \
libssl1.0 && \
libssl1.0 \
unzip && \
echo "**** install ombi ****" && \
mkdir -p \
/opt/ombi && \
if [ -z ${OMBI_RELEASE+x} ]; then \
OMBI_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/tidusjar/requestplex/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="feature/v4") | select(.pullRequestId == null)) | .version'); \
OMBI_RELEASE=$(curl -sX GET "https://api.github.com/repos/tidusjar/Ombi.Releases/releases" \
| jq -r '.[0] | .tag_name'); \
fi && \
OMBI_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/tidusjar/requestplex/build/${OMBI_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \
OMBI_DURL="https://ci.appveyor.com/api/buildjobs/${OMBI_JOBID}/artifacts/linux.tar.gz"; \
OMBI_DURL=$(curl -s https://api.github.com/repos/tidusjar/Ombi.Releases/releases/tags/"${OMBI_RELEASE}" \
|jq -r '.assets[].browser_download_url' |grep 'linux-x64-') && \
curl -o \
/tmp/ombi-src.tar.gz -L \
"${OMBI_DURL}" && \
tar xzf /tmp/ombi-src.tar.gz -C \
/opt/ombi/ && \
/tmp/ && \
unzip /tmp/linux-64/Ombi.zip \
-d /opt/ombi/ && \
chmod +x /opt/ombi/Ombi && \
echo "**** clean up ****" && \
rm -rf \

View File

@ -5,7 +5,7 @@ ARG BUILD_DATE
ARG VERSION
ARG OMBI_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="aptalca"
# environment settings
ENV HOME="/config"
@ -13,28 +13,32 @@ ENV HOME="/config"
RUN \
apt-get update && \
apt-get install -y \
jq \
libicu60 \
libssl1.0 && \
jq \
libicu60 \
libssl1.0 \
unzip && \
echo "**** install ombi ****" && \
mkdir -p \
/opt/ombi && \
/opt/ombi && \
if [ -z ${OMBI_RELEASE+x} ]; then \
OMBI_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/tidusjar/requestplex/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="feature/v4") | select(.pullRequestId == null)) | .version'); \
OMBI_RELEASE=$(curl -sX GET "https://api.github.com/repos/tidusjar/Ombi.Releases/releases" \
| jq -r '.[0] | .tag_name'); \
fi && \
OMBI_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/tidusjar/requestplex/build/${OMBI_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \
OMBI_DURL="https://ci.appveyor.com/api/buildjobs/${OMBI_JOBID}/artifacts/linux-arm64.tar.gz"; \
OMBI_DURL=$(curl -s https://api.github.com/repos/tidusjar/Ombi.Releases/releases/tags/"${OMBI_RELEASE}" \
|jq -r '.assets[].browser_download_url' |grep 'linux-arm64-') && \
curl -o \
/tmp/ombi-src.tar.gz -L \
"${OMBI_DURL}" && \
/tmp/ombi-src.tar.gz -L \
"${OMBI_DURL}" && \
tar xzf /tmp/ombi-src.tar.gz -C \
/opt/ombi/ && \
/tmp/ && \
unzip /tmp/linux-arm64/Ombi.zip \
-d /opt/ombi/ && \
chmod +x /opt/ombi/Ombi && \
echo "**** clean up ****" && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files
COPY /root /

View File

@ -5,7 +5,7 @@ ARG BUILD_DATE
ARG VERSION
ARG OMBI_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="aptalca"
# environment settings
ENV HOME="/config"
@ -13,28 +13,32 @@ ENV HOME="/config"
RUN \
apt-get update && \
apt-get install -y \
jq \
libicu60 \
libssl1.0 && \
jq \
libicu60 \
libssl1.0 \
unzip && \
echo "**** install ombi ****" && \
mkdir -p \
/opt/ombi && \
/opt/ombi && \
if [ -z ${OMBI_RELEASE+x} ]; then \
OMBI_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/tidusjar/requestplex/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="feature/v4") | select(.pullRequestId == null)) | .version'); \
OMBI_RELEASE=$(curl -sX GET "https://api.github.com/repos/tidusjar/Ombi.Releases/releases" \
| jq -r '.[0] | .tag_name'); \
fi && \
OMBI_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/tidusjar/requestplex/build/${OMBI_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \
OMBI_DURL="https://ci.appveyor.com/api/buildjobs/${OMBI_JOBID}/artifacts/linux-arm.tar.gz"; \
OMBI_DURL=$(curl -s https://api.github.com/repos/tidusjar/Ombi.Releases/releases/tags/"${OMBI_RELEASE}" \
|jq -r '.assets[].browser_download_url' |grep 'linux-arm-') && \
curl -o \
/tmp/ombi-src.tar.gz -L \
"${OMBI_DURL}" && \
/tmp/ombi-src.tar.gz -L \
"${OMBI_DURL}" && \
tar xzf /tmp/ombi-src.tar.gz -C \
/opt/ombi/ && \
/tmp/ && \
unzip /tmp/linux-arm/Ombi.zip \
-d /opt/ombi/ && \
chmod +x /opt/ombi/Ombi && \
echo "**** clean up ****" && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files
COPY /root /

22
Jenkinsfile vendored
View File

@ -16,6 +16,9 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
EXT_GIT_BRANCH = 'master'
EXT_USER = 'tidusjar'
EXT_REPO = 'Ombi.Releases'
CONTAINER_NAME = 'ombi'
BUILD_VERSION_ARG = 'OMBI_RELEASE'
LS_USER = 'linuxserver'
@ -99,14 +102,21 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
// If this is a devel github release use the first in an array from github to determine the ext tag
stage("Set ENV github_devel"){
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -sL GET https://ci.appveyor.com/api/projects/tidusjar/requestplex/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="feature/v4") | select(.pullRequestId == null)) | .version' ''',
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq -r '.[0] | .tag_name' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
}
// If this is a stable or devel github release generate the link for the build message
stage("Set ENV github_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
}
@ -672,11 +682,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq '.[0] |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "v4-preview",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
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'''

View File

@ -214,6 +214,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **13.01.20:** - Ingest the preview assets from a github release repo.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
* **22.02.19:** - Clarify info on tags and development builds.
* **25.01.19:** - Add info on tags and development builds.

View File

@ -2,12 +2,14 @@
# jenkins variables
project_name: docker-ombi
external_type: na
custom_version_command: curl -sL GET https://ci.appveyor.com/api/projects/tidusjar/requestplex/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="feature/v4") | select(.pullRequestId == null)) | .version'
external_type: github_devel
release_type: prerelease
release_tag: v4-preview
ls_branch: v4-preview
repo_vars:
- EXT_GIT_BRANCH = 'master'
- EXT_USER = 'tidusjar'
- EXT_REPO = 'Ombi.Releases'
- CONTAINER_NAME = 'ombi'
- BUILD_VERSION_ARG = 'OMBI_RELEASE'
- LS_USER = 'linuxserver'

View File

@ -47,6 +47,7 @@ app_setup_block: |
Access the webui at `<your-ip>:3579`. Follow the setup wizard on initial install. Then configure the required services.
# changelog
changelogs:
- { date: "13.01.20:", desc: "Ingest the preview assets from a github release repo." }
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
- { date: "22.02.19:", desc: "Clarify info on tags and development builds." }
- { date: "25.01.19:", desc: "Add info on tags and development builds." }

View File

@ -2,5 +2,4 @@
# permissions
chown -R abc:abc \
/opt/ombi \
/config