Skip to content

Commit

Permalink
Use default builder
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Dec 4, 2024
1 parent 1dce2b6 commit b98734d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of glitch branch. To disable this trigger, add \`mastodon_glitch\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/glitch-soc/mastodon/commits/main" | jq -r '. | .sha' | cut -c1-8)
echo "Type is \`github_commit\`" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/glitch-soc/mastodon/releases/latest" | jq -r '. | .tag_name')
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
Expand Down
22 changes: 11 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pipeline {
CI_PORT='80'
CI_SSL='false'
CI_DELAY='120'
CI_DOCKERENV='TZ=US/Pacific'
CI_DOCKERENV=''
CI_AUTH=''
CI_WEBPATH=''
}
Expand Down Expand Up @@ -129,21 +129,21 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a github commit trigger determine the current commit at head
stage("Set ENV github_commit"){
// If this is a stable github release use the latest endpoint from github to determine the ext tag
stage("Set ENV github_stable"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
}
}
}
// If this is a github commit trigger Set the external release link
stage("Set ENV commit_link"){
// 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 + '/commit/' + env.EXT_RELEASE
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
}
Expand Down Expand Up @@ -585,7 +585,7 @@ pipeline {
--label \"org.opencontainers.image.title=Mastodon\" \
--label \"org.opencontainers.image.description=[Mastodon](https://github.com/mastodon/mastodon/) is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones.. \" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=false --sbom=false --builder=default --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -649,7 +649,7 @@ pipeline {
--label \"org.opencontainers.image.title=Mastodon\" \
--label \"org.opencontainers.image.description=[Mastodon](https://github.com/mastodon/mastodon/) is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones.. \" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=false --sbom=false --builder=default --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -706,7 +706,7 @@ pipeline {
--label \"org.opencontainers.image.title=Mastodon\" \
--label \"org.opencontainers.image.description=[Mastodon](https://github.com/mastodon/mastodon/) is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones.. \" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=false --sbom=false --builder=default --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -974,7 +974,7 @@ pipeline {
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_RELEASE_CLEAN} | jq '.commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
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
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "glitch",\
"name": "'${META_TAG}'",\
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **03.12.24:** - Switch from commit builds to releases to match upstream changes.
* **27.05.24:** - Existing users should update their nginx confs to avoid http2 deprecation warnings.
* **23.05.24:** - Rebase to Alpine 3.20.
* **02.05.24:** - Rebase to Alpine 3.19, enable [Active Record Encryption](https://github.com/mastodon/mastodon/pull/29831/files).
Expand Down
5 changes: 3 additions & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ external_type: github_stable
release_type: prerelease
release_tag: glitch
ls_branch: glitch
image_sbom: true
image_provenance: true
image_provenance: false
image_sbom: false
image_builder: default
repo_vars:
- EXT_GIT_BRANCH = 'main'
- EXT_USER = 'glitch-soc'
Expand Down

0 comments on commit b98734d

Please sign in to comment.