mirror of
https://github.com/linuxserver/docker-ombi.git
synced 2026-02-20 00:58:02 +08:00
initial commit for v4 tag
This commit is contained in:
parent
b0a443f644
commit
6dfe0398dd
@ -20,7 +20,7 @@ RUN \
|
||||
mkdir -p \
|
||||
/opt/ombi && \
|
||||
if [ -z ${OMBI_RELEASE+x} ]; then \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=develop&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=feature/v4&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
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"; \
|
||||
|
||||
@ -23,7 +23,7 @@ RUN \
|
||||
mkdir -p \
|
||||
/opt/ombi && \
|
||||
if [ -z ${OMBI_RELEASE+x} ]; then \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=develop&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=feature/v4&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
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"; \
|
||||
|
||||
@ -23,7 +23,7 @@ RUN \
|
||||
mkdir -p \
|
||||
/opt/ombi && \
|
||||
if [ -z ${OMBI_RELEASE+x} ]; then \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=develop&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
OMBI_RELEASE=$(curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux.tar.gz?branch=feature/v4&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'); \
|
||||
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"; \
|
||||
|
||||
58
Jenkinsfile
vendored
58
Jenkinsfile
vendored
@ -97,7 +97,7 @@ pipeline {
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = sh(
|
||||
script: ''' curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux1.tar.gz?branch=develop&pr=false' | awk -F / '{print $6}' | sed 's/-/./g' ''',
|
||||
script: ''' curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux1.tar.gz?branch=feature/v4&pr=false' | awk -F / '{print $6}' | sed 's/-/./g' ''',
|
||||
returnStdout: true).trim()
|
||||
env.RELEASE_LINK = 'custom_command'
|
||||
}
|
||||
@ -113,10 +113,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a development build use live docker endpoints
|
||||
// If this is a v4-preview build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -134,7 +134,7 @@ pipeline {
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "development"}
|
||||
not {branch "v4-preview"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -172,7 +172,7 @@ pipeline {
|
||||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
@ -183,13 +183,13 @@ pipeline {
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=development -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=v4-preview -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
|
||||
docker pull linuxserver/doc-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=development -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=v4-preview -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
|
||||
if [ "$(md5sum ${TEMPDIR}/${LS_REPO}/Jenkinsfile | awk '{ print $1 }')" != "$(md5sum Jenkinsfile | awk '{ print $1 }')" ] || [ "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/README.md | awk '{ print $1 }')" != "$(md5sum README.md | awk '{ print $1 }')" ]; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f development
|
||||
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f v4-preview
|
||||
cp ${TEMPDIR}/${CONTAINER_NAME}/README.md ${TEMPDIR}/repo/${LS_REPO}/
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}/
|
||||
@ -211,7 +211,7 @@ pipeline {
|
||||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
@ -308,7 +308,7 @@ pipeline {
|
||||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
@ -336,7 +336,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 development
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f v4-preview
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
@ -360,7 +360,7 @@ pipeline {
|
||||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
@ -374,7 +374,7 @@ pipeline {
|
||||
// Exit the build if this is just a package check and there are no changes to push
|
||||
stage('PACKAGECHECK-exit') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
@ -458,8 +458,8 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||
'''
|
||||
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:development"
|
||||
sh "docker push ${IMAGE}:development"
|
||||
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:v4-preview"
|
||||
sh "docker push ${IMAGE}:v4-preview"
|
||||
sh "docker push ${IMAGE}:${META_TAG}"
|
||||
}
|
||||
}
|
||||
@ -489,24 +489,24 @@ pipeline {
|
||||
docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG}
|
||||
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||
fi'''
|
||||
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-development"
|
||||
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-development"
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-development"
|
||||
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-v4-preview"
|
||||
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-v4-preview"
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-v4-preview"
|
||||
sh "docker push ${IMAGE}:amd64-${META_TAG}"
|
||||
sh "docker push ${IMAGE}:arm32v6-${META_TAG}"
|
||||
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
|
||||
sh "docker push ${IMAGE}:amd64-development"
|
||||
sh "docker push ${IMAGE}:arm32v6-development"
|
||||
sh "docker push ${IMAGE}:arm64v8-development"
|
||||
sh "docker manifest push --purge ${IMAGE}:development || :"
|
||||
sh "docker manifest create ${IMAGE}:development ${IMAGE}:amd64-development ${IMAGE}:arm32v6-development ${IMAGE}:arm64v8-development"
|
||||
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm32v6-development --os linux --arch arm"
|
||||
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm64v8-development --os linux --arch arm64 --variant v8"
|
||||
sh "docker push ${IMAGE}:amd64-v4-preview"
|
||||
sh "docker push ${IMAGE}:arm32v6-v4-preview"
|
||||
sh "docker push ${IMAGE}:arm64v8-v4-preview"
|
||||
sh "docker manifest push --purge ${IMAGE}:v4-preview || :"
|
||||
sh "docker manifest create ${IMAGE}:v4-preview ${IMAGE}:amd64-v4-preview ${IMAGE}:arm32v6-v4-preview ${IMAGE}:arm64v8-v4-preview"
|
||||
sh "docker manifest annotate ${IMAGE}:v4-preview ${IMAGE}:arm32v6-v4-preview --os linux --arch arm"
|
||||
sh "docker manifest annotate ${IMAGE}:v4-preview ${IMAGE}:arm64v8-v4-preview --os linux --arch arm64 --variant v8"
|
||||
sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :"
|
||||
sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
|
||||
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v6-${META_TAG} --os linux --arch arm"
|
||||
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
|
||||
sh "docker manifest push --purge ${IMAGE}:development"
|
||||
sh "docker manifest push --purge ${IMAGE}:v4-preview"
|
||||
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
|
||||
}
|
||||
}
|
||||
@ -514,7 +514,7 @@ pipeline {
|
||||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "development"
|
||||
branch "v4-preview"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
@ -526,14 +526,14 @@ pipeline {
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}' to development",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}' to v4-preview",\
|
||||
"type": "commit",\
|
||||
"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
|
||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"target_commitish": "development",\
|
||||
"target_commitish": "v4-preview",\
|
||||
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
# jenkins variables
|
||||
project_name: docker-ombi
|
||||
external_type: na
|
||||
custom_version_command: curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux1.tar.gz?branch=develop&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'
|
||||
custom_version_command: curl -Ls -w %{url_effective} -o /dev/null 'https://ci.appveyor.com/api/projects/tidusjar/requestplex/artifacts/linux1.tar.gz?branch=feature/v4&pr=false' | awk -F / '{print $6}' | sed 's/-/./g'
|
||||
release_type: prerelease
|
||||
release_tag: development
|
||||
ls_branch: development
|
||||
release_tag: v4-preview
|
||||
ls_branch: v4-preview
|
||||
repo_vars:
|
||||
- CONTAINER_NAME = 'ombi'
|
||||
- BUILD_VERSION_ARG = 'OMBI_RELEASE'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user