Skip to content

Commit

Permalink
fork bullseye to a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Jun 2, 2023
1 parent 4dd4e7b commit 281f408
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-debian/edit/master/readme-vars.yml).
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-debian/edit/bullseye/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)
Expand Down Expand Up @@ -115,7 +115,7 @@ 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-debian/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-debian/tree/bullseye/root), add an entry to the changelog

```yml
changelogs:
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

------------------------------

- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-debian/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-debian/blob/bullseye/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications

------------------------------

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
workflow_dispatch:

jobs:
external-trigger-master:
external-trigger-bullseye:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0

- name: External Trigger
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/bullseye'
run: |
echo "**** No external release, exiting ****"
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-debian/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-debian/blob/bullseye/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/package_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ on:
workflow_dispatch:

jobs:
package-trigger-master:
package-trigger-bullseye:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0

- name: Package Trigger
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/bullseye'
run: |
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER is set; skipping trigger. ****"
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_BULLSEYE }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_BULLSEYE is set; skipping trigger. ****"
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_BULLSEYE\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/bullseye/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\". ****"
echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\`" >> $GITHUB_STEP_SUMMARY
echo "**** Package trigger running off of bullseye branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_BULLSEYE\". ****"
echo "Package trigger running off of bullseye branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_BULLSEYE\`" >> $GITHUB_STEP_SUMMARY
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/master/buildWithParameters?PACKAGE_CHECK=true \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/bullseye/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 ****"
Expand Down
40 changes: 20 additions & 20 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ pipeline {
}
}
}
// If this is a master build use live docker endpoints
// If this is a bullseye build use live docker endpoints
stage("Set ENV live build"){
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
}
steps {
Expand All @@ -174,7 +174,7 @@ pipeline {
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "master"}
not {branch "bullseye"}
environment name: 'CHANGE_ID', value: ''
}
steps {
Expand Down Expand Up @@ -248,7 +248,7 @@ pipeline {
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
Expand All @@ -259,13 +259,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=bullseye -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 bullseye
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
git add Jenkinsfile
git commit -m 'Bot Updating Templated Files'
Expand All @@ -288,7 +288,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 bullseye
for i in ${TEMPLATES_TO_DELETE}; do
git rm "${i}"
done
Expand All @@ -309,7 +309,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 bullseye
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
Expand Down Expand Up @@ -346,7 +346,7 @@ pipeline {
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
Expand All @@ -359,10 +359,10 @@ pipeline {
}
}
}
// If this is a master build check the S6 service file perms
// If this is a bullseye build check the S6 service file perms
stage("Check S6 Service file Permissions"){
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
Expand Down Expand Up @@ -405,7 +405,7 @@ pipeline {
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "master"
branch "bullseye"
environment name: 'EXIT_STATUS', value: ''
}
steps{
Expand Down Expand Up @@ -530,7 +530,7 @@ pipeline {
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
Expand All @@ -553,7 +553,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 bullseye
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
wait
Expand All @@ -577,7 +577,7 @@ pipeline {
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "master"
branch "bullseye"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
Expand All @@ -591,7 +591,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 "bullseye"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
Expand Down Expand Up @@ -793,7 +793,7 @@ pipeline {
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "master"
branch "bullseye"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
Expand All @@ -805,17 +805,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 bullseye",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@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": "bullseye",\
"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
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'''
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the https://github.com/linuxserver/docker-baseimage-debian/blob/master/.github/CONTRIBUTING.md -->
<!-- Please read the https://github.com/linuxserver/docker-baseimage-debian/blob/bullseye/.github/CONTRIBUTING.md -->

[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
Expand Down
4 changes: 2 additions & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# jenkins variables
project_name: docker-baseimage-debian
external_type: os
release_type: stable
release_type: prerelease
release_tag: bullseye
ls_branch: master
ls_branch: bullseye
build_armhf: false
repo_vars:
- BUILD_VERSION_ARG = 'OS'
Expand Down

0 comments on commit 281f408

Please sign in to comment.