diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5e53324..ff9609c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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-orcaslicer/edit/main/readme-vars.yml). +Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-orcaslicer/edit/master/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/images/docker-orcaslicer) @@ -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-orcaslicer/tree/main/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-orcaslicer/tree/master/root), add an entry to the changelog ```yml changelogs: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ba1a61a..0312b34 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,7 @@ ------------------------------ - - [ ] I have read the [contributing](https://github.com/linuxserver/docker-orcaslicer/blob/main/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications + - [ ] I have read the [contributing](https://github.com/linuxserver/docker-orcaslicer/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications ------------------------------ diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 30f98de..2fe3fc9 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -4,26 +4,26 @@ on: workflow_dispatch: jobs: - external-trigger-main: + external-trigger-master: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.1.0 - name: External Trigger - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/master' run: | - if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MAIN }}" ]; then - echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MAIN is set; skipping trigger. ****" - echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MAIN\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY + if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MASTER }}" ]; then + echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MASTER is set; skipping trigger. ****" + echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY exit 0 fi - echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MAIN\". ****" - echo "External trigger running off of main branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MAIN\`" >> $GITHUB_STEP_SUMMARY + echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MASTER\". ****" + echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_ORCASLICER_MASTER\`" >> $GITHUB_STEP_SUMMARY echo "**** Retrieving external version ****" EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/SoftFever/OrcaSlicer/releases/latest" | jq -r '. | .tag_name') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" - FAILURE_REASON="Can't retrieve external version for orcaslicer branch main" + FAILURE_REASON="Can't retrieve external version for orcaslicer branch master" GHA_TRIGGER_URL="https://github.com/linuxserver/docker-orcaslicer/actions/runs/${{ github.run_id }}" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}], @@ -68,7 +68,7 @@ jobs: echo "**** Version ${EXT_RELEASE} already pushed, exiting ****" echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY exit 0 - elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then + elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****" echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY exit 0 @@ -76,7 +76,7 @@ jobs: echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****" echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build" >> $GITHUB_STEP_SUMMARY response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/main/buildWithParameters?PACKAGE_CHECK=false \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/master/buildWithParameters?PACKAGE_CHECK=false \ --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 ****" diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 4a6d430..bba5e3d 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -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-orcaslicer/blob/main/.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-orcaslicer/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package_trigger.yml b/.github/workflows/package_trigger.yml index 349613e..79cf6fd 100644 --- a/.github/workflows/package_trigger.yml +++ b/.github/workflows/package_trigger.yml @@ -4,28 +4,28 @@ on: workflow_dispatch: jobs: - package-trigger-main: + package-trigger-master: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.1.0 - name: Package Trigger - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/master' run: | - if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_ORCASLICER_MAIN }}" ]; then - echo "**** Github secret PAUSE_PACKAGE_TRIGGER_ORCASLICER_MAIN is set; skipping trigger. ****" - echo "Github secret \`PAUSE_PACKAGE_TRIGGER_ORCASLICER_MAIN\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY + if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_ORCASLICER_MASTER }}" ]; then + echo "**** Github secret PAUSE_PACKAGE_TRIGGER_ORCASLICER_MASTER is set; skipping trigger. ****" + echo "Github secret \`PAUSE_PACKAGE_TRIGGER_ORCASLICER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY exit 0 fi - if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then + if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/master/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 main branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_ORCASLICER_MAIN\". ****" - echo "Package trigger running off of main branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_ORCASLICER_MAIN\`" >> $GITHUB_STEP_SUMMARY + echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_ORCASLICER_MASTER\". ****" + echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_ORCASLICER_MASTER\`" >> $GITHUB_STEP_SUMMARY response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/main/buildWithParameters?PACKAGE_CHECK=true \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/master/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 ****" diff --git a/Jenkinsfile b/Jenkinsfile index 20981f5..ab5adb0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -158,10 +158,10 @@ pipeline { } } } - // If this is a main build use live docker endpoints + // If this is a master build use live docker endpoints stage("Set ENV live build"){ when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' } steps { @@ -184,7 +184,7 @@ pipeline { // If this is a dev build use dev docker endpoints stage("Set ENV dev build"){ when { - not {branch "main"} + not {branch "master"} environment name: 'CHANGE_ID', value: '' } steps { @@ -258,7 +258,7 @@ pipeline { // Use helper containers to render templated files stage('Update-Templates') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' expression { env.CONTAINER_NAME != null @@ -269,13 +269,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=main -v ${TEMPDIR}:/ansible/jenkins 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 # 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 main + git checkout -f master cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ git add Jenkinsfile git commit -m 'Bot Updating Templated Files' @@ -298,7 +298,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 main + git checkout -f master for i in ${TEMPLATES_TO_DELETE}; do git rm "${i}" done @@ -319,7 +319,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 main + git checkout -f master cd ${TEMPDIR}/docker-${CONTAINER_NAME} mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE @@ -380,7 +380,7 @@ pipeline { // Exit the build if the Templated files were just updated stage('Template-exit') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'FILES_UPDATED', value: 'true' expression { @@ -393,10 +393,10 @@ pipeline { } } } - // If this is a main build check the S6 service file perms + // If this is a master build check the S6 service file perms stage("Check S6 Service file Permissions"){ when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -538,7 +538,7 @@ pipeline { // Take the image we just built and dump package versions for comparison stage('Update-packages') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -561,7 +561,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 main + git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/ cd ${TEMPDIR}/${LS_REPO}/ wait @@ -585,7 +585,7 @@ pipeline { // Exit the build if the package file was just updated stage('PACKAGE-exit') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'true' environment name: 'EXIT_STATUS', value: '' @@ -599,7 +599,7 @@ pipeline { // Exit the build if this is just a package check and there are no changes to push stage('PACKAGECHECK-exit') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'false' environment name: 'EXIT_STATUS', value: '' @@ -801,7 +801,7 @@ pipeline { // If this is a public release tag it in the LS Github stage('Github-Tag-Push-Release') { when { - branch "main" + branch "master" expression { env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -813,14 +813,14 @@ 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 main",\ + "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\ "type": "commit",\ "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","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}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json echo '{"tag_name":"'${META_TAG}'",\ - "target_commitish": "main",\ + "target_commitish": "master",\ "name": "'${META_TAG}'",\ "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start printf '","draft": false,"prerelease": false}' >> releasebody.json @@ -831,14 +831,14 @@ pipeline { // Add protection to the release branch stage('Github-Release-Branch-Protection') { when { - branch "main" + branch "master" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } steps { - echo "Setting up protection for release branch main" + echo "Setting up protection for release branch master" sh '''#! /bin/bash - curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/main/protection \ + curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/master/protection \ -d $(jq -c . << EOF { "required_status_checks": null, diff --git a/README.md b/README.md index 0218a22..427ae0f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - + [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) [![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!") @@ -36,7 +36,7 @@ Find us at: [![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/orcaslicer) [![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/orcaslicer.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/orcaslicer) [![Docker Stars](https://img.shields.io/docker/stars/linuxserver/orcaslicer.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/orcaslicer) -[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-orcaslicer%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/main/) +[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-orcaslicer%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-orcaslicer/job/master/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Forcaslicer%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/orcaslicer/latest/index.html) [Orca Slicer](https://github.com/SoftFever/OrcaSlicer) is an open source slicer for FDM printers. OrcaSlicer is fork of Bambu Studio, it was previously known as BambuStudio-SoftFever, Bambu Studio is forked from PrusaSlicer by Prusa Research, which is from Slic3r by Alessandro Ranellucci and the RepRap community diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 67b175a..a9ea7a1 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -5,7 +5,7 @@ project_name: docker-orcaslicer external_type: github_stable release_type: stable release_tag: latest -ls_branch: main +ls_branch: master repo_vars: - EXT_USER = 'SoftFever' - EXT_REPO = 'OrcaSlicer'