Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cbccf33f0 | ||
|
|
5e54d659c2 | ||
|
|
360885bdc6 | ||
|
|
1cc9c08a55 | ||
|
|
c9f2c68fb3 | ||
|
|
8759ca68d4 | ||
|
|
b1bf7ab635 | ||
|
|
d7c35258ec | ||
|
|
f031005e89 | ||
|
|
79f4c89d93 | ||
|
|
fe6f97cf18 | ||
|
|
1dc2527335 | ||
|
|
bd2a1e6fb7 | ||
|
|
82a338d0c1 |
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
|
|
@ -6,7 +6,7 @@
|
|||
* Read, and fill the Pull Request template
|
||||
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
|
||||
|
||||
## Common files
|
||||
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
## Readme
|
||||
|
||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine/edit/master/readme-vars.yml).
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine/edit/3.20/readme-vars.yml).
|
||||
|
||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||
|
|
@ -105,17 +105,17 @@ docker build \
|
|||
-t linuxserver/baseimage-alpine:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine/tree/master/root), add an entry to the changelog
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine/tree/3.20/root), add an entry to the changelog
|
||||
|
||||
```yml
|
||||
changelogs:
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord chat support
|
||||
url: https://discord.gg/YWrKVTn
|
||||
url: https://linuxserver.io/discord
|
||||
about: Realtime support / chat with the community and the team.
|
||||
|
||||
- name: Discourse discussion forum
|
||||
|
|
|
|||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
------------------------------
|
||||
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine/blob/3.20/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
|
||||
------------------------------
|
||||
|
||||
|
|
|
|||
9
.github/workflows/external_trigger.yml
vendored
9
.github/workflows/external_trigger.yml
vendored
|
|
@ -4,13 +4,13 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
external-trigger-master:
|
||||
external-trigger-3-20:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/3.20'
|
||||
env:
|
||||
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||
run: |
|
||||
|
|
@ -18,3 +18,8 @@ jobs:
|
|||
echo "Type is \`os\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
if grep -q "^baseimage-alpine_3.20_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
|||
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -9,5 +9,5 @@ jobs:
|
|||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine/blob/3.20/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
34
.github/workflows/package_trigger_scheduler.yml
vendored
34
.github/workflows/package_trigger_scheduler.yml
vendored
|
|
@ -27,17 +27,26 @@ jobs:
|
|||
fi
|
||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/jenkins-vars.yml)
|
||||
if [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/Jenkinsfile >/dev/null 2>&1; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||
if [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
||||
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/${br}/readme-vars.yml)
|
||||
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif grep -wq "^baseimage-alpine_${br}$" <<< "${SKIP_PACKAGE_TRIGGER}"; then
|
||||
elif grep -q "^baseimage-alpine_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`baseimage-alpine_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/${br}/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
|
||||
skipped_branches="${skipped_branches}${br} "
|
||||
|
|
@ -49,6 +58,11 @@ jobs:
|
|||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
if [[ -z "${response}" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Jenkins build could not be triggered. Skipping branch."
|
||||
continue
|
||||
fi
|
||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
sleep 10
|
||||
|
|
@ -56,11 +70,14 @@ jobs:
|
|||
buildurl="${buildurl%$'\r'}"
|
||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||
curl -iX POST \
|
||||
if ! curl -ifX POST \
|
||||
"${buildurl}submitDescription" \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
--data-urlencode "Submit=Submit"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Unable to change the Jenkins job description."
|
||||
fi
|
||||
sleep 20
|
||||
fi
|
||||
else
|
||||
|
|
@ -70,13 +87,14 @@ jobs:
|
|||
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
||||
if [[ -n "${triggered_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
||||
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-baseimage-alpine/activity/ \n"
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
fi
|
||||
if [[ -n "${skipped_branches}" ]]; then
|
||||
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
|
||||
fi
|
||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||
echo "**** Notifying Discord ****"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Package Check Build(s) Triggered for baseimage-alpine** \n'"${NOTIFY_BRANCHES}"'**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-baseimage-alpine/activity/"' \n"}],
|
||||
"description": "**Package Check Build(s) for baseimage-alpine** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
fi
|
||||
|
|
|
|||
298
Jenkinsfile
vendored
298
Jenkinsfile
vendored
|
|
@ -56,11 +56,23 @@ pipeline {
|
|||
steps{
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
sh '''#! /bin/bash
|
||||
containers=$(docker ps -aq)
|
||||
echo "Pruning builder"
|
||||
docker builder prune -f --builder container || :
|
||||
containers=$(docker ps -q)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
||||
for container in ${containers}; do
|
||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
||||
echo "skipping buildx container in docker stop"
|
||||
else
|
||||
echo "Stopping container ${container}"
|
||||
docker stop ${container}
|
||||
fi
|
||||
docker system prune -af --volumes || : '''
|
||||
done
|
||||
fi
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.LS_RELEASE = sh(
|
||||
|
|
@ -169,10 +181,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
// If this is a master build use live docker endpoints
|
||||
// If this is a 3.20 build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
|
|
@ -189,13 +201,14 @@ pipeline {
|
|||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.META_TAG = '3.20-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = '3.20-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "master"}
|
||||
not {branch "3.20"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
|
|
@ -213,6 +226,7 @@ pipeline {
|
|||
env.META_TAG = '3.20-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = '3.20-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -237,6 +251,7 @@ pipeline {
|
|||
env.EXT_RELEASE_TAG = '3.20-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/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -271,7 +286,7 @@ pipeline {
|
|||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
|
|
@ -283,24 +298,24 @@ pipeline {
|
|||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
# Cloned repo paths for templating:
|
||||
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch master of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
||||
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch master of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
|
||||
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch 3.20 of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
||||
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch 3.20 of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
|
||||
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
|
||||
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
|
||||
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
|
||||
git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
git clone --branch 3.20 --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
|
||||
echo "Starting 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 3.20
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
git add Jenkinsfile
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
|
|
@ -319,13 +334,13 @@ 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 3.20
|
||||
for i in ${TEMPLATES_TO_DELETE}; do
|
||||
git rm "${i}"
|
||||
done
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
|
|
@ -341,7 +356,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 3.20
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||
|
|
@ -354,8 +369,8 @@ pipeline {
|
|||
fi
|
||||
git add readme-vars.yml ${TEMPLATED_FILES}
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
|
|
@ -422,7 +437,7 @@ pipeline {
|
|||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
|
|
@ -435,10 +450,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
// If this is a master build check the S6 service file perms
|
||||
// If this is a 3.20 build check the S6 service file perms
|
||||
stage("Check S6 Service file Permissions"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
|
|
@ -506,8 +521,42 @@ pipeline {
|
|||
--label \"org.opencontainers.image.title=Baseimage-alpine\" \
|
||||
--label \"org.opencontainers.image.description=baseimage-alpine image by linuxserver.io\" \
|
||||
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
|
||||
--provenance=false --sbom=false \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
done
|
||||
for p in $(jobs -p); do
|
||||
wait "$p" || { echo "job $p failed" >&2; exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Build MultiArch Docker containers for push to LS Repo
|
||||
|
|
@ -537,8 +586,42 @@ pipeline {
|
|||
--label \"org.opencontainers.image.title=Baseimage-alpine\" \
|
||||
--label \"org.opencontainers.image.description=baseimage-alpine image by linuxserver.io\" \
|
||||
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
|
||||
--provenance=false --sbom=false \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
done
|
||||
for p in $(jobs -p); do
|
||||
wait "$p" || { echo "job $p failed" >&2; exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build ARM64') {
|
||||
|
|
@ -547,10 +630,6 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
echo 'Logging into Github'
|
||||
sh '''#! /bin/bash
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
'''
|
||||
sh "docker buildx build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||
|
|
@ -565,18 +644,50 @@ pipeline {
|
|||
--label \"org.opencontainers.image.title=Baseimage-alpine\" \
|
||||
--label \"org.opencontainers.image.description=baseimage-alpine image by linuxserver.io\" \
|
||||
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
|
||||
--provenance=false --sbom=false \
|
||||
--provenance=true --sbom=true --builder=container --load \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
done
|
||||
'''
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
|
||||
done
|
||||
for p in $(jobs -p); do
|
||||
wait "$p" || { echo "job $p failed" >&2; exit 1; }
|
||||
done
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
sh '''#! /bin/bash
|
||||
containers=$(docker ps -aq)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
fi
|
||||
docker system prune -af --volumes || : '''
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -584,7 +695,7 @@ pipeline {
|
|||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
|
|
@ -607,14 +718,14 @@ 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 3.20
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
git add package_versions.txt
|
||||
git commit -m 'Bot Updating Package Versions'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git 3.20
|
||||
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag updated, stopping build process"
|
||||
else
|
||||
|
|
@ -632,7 +743,7 @@ pipeline {
|
|||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
|
|
@ -646,7 +757,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 "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
|
|
@ -726,40 +837,26 @@ pipeline {
|
|||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:3.20
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
for PUSHIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
[[ ${PUSHIMAGE%%/*} =~ \\. ]] && PUSHIMAGEPLUS="${PUSHIMAGE}" || PUSHIMAGEPLUS="docker.io/${PUSHIMAGE}"
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
if [[ "${PUSHIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
docker push ${PUSHIMAGE}:3.20
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
done
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:3.20 -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${PUSHIMAGE}:${SEMVER}
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a multi arch release push all images and define the manifest
|
||||
stage('Docker-Push-Multi') {
|
||||
when {
|
||||
|
|
@ -767,50 +864,28 @@ pipeline {
|
|||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[
|
||||
$class: 'UsernamePasswordMultiBinding',
|
||||
credentialsId: 'Quay.io-Robot',
|
||||
usernameVariable: 'QUAYUSER',
|
||||
passwordVariable: 'QUAYPASS'
|
||||
]
|
||||
]) {
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
if [ "${CI}" == "false" ]; then
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
|
||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||
fi
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-3.20
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-3.20
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
[[ ${MANIFESTIMAGE%%/*} =~ \\. ]] && MANIFESTIMAGEPLUS="${MANIFESTIMAGE}" || MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-3.20
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-3.20
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
done
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-3.20 -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-3.20 -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
fi
|
||||
done
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:3.20 ${MANIFESTIMAGE}:amd64-3.20 ${MANIFESTIMAGE}:arm64v8-3.20
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
|
|
@ -820,11 +895,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
|
|
@ -836,17 +910,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 3.20",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "master",\
|
||||
"target_commitish": "3.20",\
|
||||
"name": "'${META_TAG}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote 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'''
|
||||
}
|
||||
|
|
@ -854,14 +928,14 @@ pipeline {
|
|||
// Add protection to the release branch
|
||||
stage('Github-Release-Branch-Protection') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "3.20"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
echo "Setting up protection for release branch master"
|
||||
echo "Setting up protection for release branch 3.20"
|
||||
sh '''#! /bin/bash
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/master/protection \
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/3.20/protection \
|
||||
-d $(jq -c . << EOF
|
||||
{
|
||||
"required_status_checks": null,
|
||||
|
|
@ -1023,12 +1097,22 @@ EOF
|
|||
}
|
||||
cleanup {
|
||||
sh '''#! /bin/bash
|
||||
echo "Performing docker system prune!!"
|
||||
containers=$(docker ps -aq)
|
||||
echo "Pruning builder!!"
|
||||
docker builder prune -f --builder container || :
|
||||
containers=$(docker ps -q)
|
||||
if [[ -n "${containers}" ]]; then
|
||||
docker stop ${containers}
|
||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
||||
for container in ${containers}; do
|
||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
||||
echo "skipping buildx container in docker stop"
|
||||
else
|
||||
echo "Stopping container ${container}"
|
||||
docker stop ${container}
|
||||
fi
|
||||
docker system prune -af --volumes || :
|
||||
done
|
||||
fi
|
||||
docker system prune -f --volumes || :
|
||||
docker image prune -af || :
|
||||
'''
|
||||
cleanWs()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md -->
|
||||
<!-- Please read https://github.com/linuxserver/docker-baseimage-alpine/blob/3.20/.github/CONTRIBUTING.md -->
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[forumurl]: https://forum.linuxserver.io
|
||||
[ircurl]: https://mibbit.com/?server=irc.libera.chat&channel=%23linuxserver.io
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
# jenkins variables
|
||||
project_name: docker-baseimage-alpine
|
||||
external_type: os
|
||||
release_type: stable
|
||||
release_type: prerelease
|
||||
release_tag: "3.20"
|
||||
ls_branch: master
|
||||
ls_branch: "3.20"
|
||||
repo_vars:
|
||||
- BUILD_VERSION_ARG = 'OS'
|
||||
- LS_USER = 'linuxserver'
|
||||
|
|
|
|||
|
|
@ -2,40 +2,41 @@ NAME VERSION TYPE
|
|||
alpine-baselayout 3.6.5-r0 apk
|
||||
alpine-baselayout-data 3.6.5-r0 apk
|
||||
alpine-keys 2.4-r1 apk
|
||||
alpine-release 3.20.3-r0 apk
|
||||
apk-tools 2.14.4-r0 apk
|
||||
alpine-release 3.20.6-r0 apk
|
||||
apk-tools 2.14.4-r1 apk
|
||||
bash 5.2.26-r0 apk
|
||||
brotli-libs 1.1.0-r2 apk
|
||||
busybox 1.36.1-r29 apk
|
||||
busybox-binsh 1.36.1-r29 apk
|
||||
c-ares 1.33.1-r0 apk
|
||||
ca-certificates 20240705-r0 apk
|
||||
ca-certificates-bundle 20240705-r0 apk
|
||||
ca-certificates 20241121-r1 apk
|
||||
ca-certificates-bundle 20241121-r1 apk
|
||||
catatonit 0.2.0-r0 apk
|
||||
coreutils 9.5-r1 apk
|
||||
coreutils-env 9.5-r1 apk
|
||||
coreutils-fmt 9.5-r1 apk
|
||||
coreutils-sha512sum 9.5-r1 apk
|
||||
curl 8.9.1-r2 apk
|
||||
coreutils 9.5-r2 apk
|
||||
coreutils-env 9.5-r2 apk
|
||||
coreutils-fmt 9.5-r2 apk
|
||||
coreutils-sha512sum 9.5-r2 apk
|
||||
curl 8.12.1-r0 apk
|
||||
findutils 4.9.0-r5 apk
|
||||
gmp 6.3.0-r1 apk
|
||||
jq 1.7.1-r0 apk
|
||||
libacl 2.3.2-r0 apk
|
||||
libattr 2.5.2-r0 apk
|
||||
libbsd 0.12.2-r0 apk
|
||||
libcrypto3 3.3.2-r0 apk
|
||||
libcurl 8.9.1-r2 apk
|
||||
libcrypto3 3.3.3-r0 apk
|
||||
libcurl 8.12.1-r0 apk
|
||||
libidn2 2.3.7-r0 apk
|
||||
libintl 0.22.5-r0 apk
|
||||
libmd 1.1.0-r0 apk
|
||||
libncursesw 6.4_p20240420-r1 apk
|
||||
libncursesw 6.4_p20240420-r2 apk
|
||||
libproc2 4.0.4-r0 apk
|
||||
libpsl 0.21.5-r1 apk
|
||||
libssl3 3.3.2-r0 apk
|
||||
libssl3 3.3.3-r0 apk
|
||||
libunistring 1.2-r0 apk
|
||||
linux-pam 1.6.0-r0 apk
|
||||
musl 1.2.5-r0 apk
|
||||
musl-utils 1.2.5-r0 apk
|
||||
ncurses-terminfo-base 6.4_p20240420-r1 apk
|
||||
musl 1.2.5-r1 apk
|
||||
musl-utils 1.2.5-r1 apk
|
||||
ncurses-terminfo-base 6.4_p20240420-r2 apk
|
||||
netcat-openbsd 1.226-r0 apk
|
||||
nghttp2-libs 1.62.1-r0 apk
|
||||
oniguruma 6.9.9-r0 apk
|
||||
|
|
@ -45,7 +46,7 @@ scanelf 1.3.7-r2 apk
|
|||
shadow 4.15.1-r0 apk
|
||||
skalibs 2.14.1.1-r0 apk
|
||||
ssl_client 1.36.1-r29 apk
|
||||
tzdata 2024b-r0 apk
|
||||
tzdata 2025b-r0 apk
|
||||
utmps-libs 0.1.2.2-r1 apk
|
||||
zlib 1.3.1-r1 apk
|
||||
zstd-libs 1.5.6-r0 apk
|
||||
|
|
|
|||
Loading…
Reference in a new issue