From 0864dd2922a200da1ad0146489fbb6be8947aa35 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:58:42 -0500 Subject: [PATCH] fix artifact uploader and repush older version --- .editorconfig | 0 .github/CONTRIBUTING.md | 0 .github/FUNDING.yml | 0 .github/ISSUE_TEMPLATE/config.yml | 0 .github/ISSUE_TEMPLATE/issue.bug.yml | 0 .github/ISSUE_TEMPLATE/issue.feature.yml | 0 .github/workflows/external_trigger.yml | 2 +- .github/workflows/publish_binaries.yml | 5 ++++- Jenkinsfile | 10 +++++++--- jenkins-vars.yml | 2 +- 10 files changed, 13 insertions(+), 6 deletions(-) mode change 100755 => 100644 .editorconfig mode change 100755 => 100644 .github/CONTRIBUTING.md mode change 100755 => 100644 .github/FUNDING.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/config.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/issue.bug.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/issue.feature.yml diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.feature.yml b/.github/ISSUE_TEMPLATE/issue.feature.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index d35150b..190f5f1 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -26,7 +26,7 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of alpine321 branch. To disable this trigger, add \`python_alpine321\` 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/python/cpython/tags | jq -r '.[] | select(.name | contains("rc") or contains("a") or contains("b") | not) | .name' | sed 's|^v||g' | sort -rV | head -1) + EXT_RELEASE=$(echo 3.13.1) echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY if grep -q "^python_alpine321_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/publish_binaries.yml b/.github/workflows/publish_binaries.yml index d000cfc..5a311df 100644 --- a/.github/workflows/publish_binaries.yml +++ b/.github/workflows/publish_binaries.yml @@ -9,6 +9,9 @@ jobs: publish-binaries: runs-on: ubuntu-latest steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Retrieve and upload artifacts run: | mkdir -p ./artifacts/amd64 ./artifacts/arm64 @@ -22,7 +25,7 @@ jobs: -H "Content-Type: application/octet-stream" \ "https://uploads.github.com/repos/linuxserver/docker-python/releases/${{ github.event.release.id }}/assets?name=python-amd64.tar.gz" \ --data-binary "@python-amd64.tar.gz" - docker create --name arm64 ghcr.io/linuxserver/python:arm64v8-${{ github.event.release.tag_name }} blah + docker create --name arm64 --platform=linux/arm64 ghcr.io/linuxserver/python:arm64v8-${{ github.event.release.tag_name }} blah docker cp arm64:/usr/local/. ./artifacts/arm64/ tar -czvf python-arm64.tar.gz -C ./artifacts/arm64/ . echo "**** Uploading arm64 tarball ****" diff --git a/Jenkinsfile b/Jenkinsfile index 25ee07c..dd3bb6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,7 +70,9 @@ pipeline { fi done fi - docker system prune -f --volumes || : ''' + docker system prune -f --volumes || : + docker image prune -af || : + ''' script{ env.EXIT_STATUS = '' env.LS_RELEASE = sh( @@ -141,7 +143,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sX GET https://api.github.com/repos/python/cpython/tags | jq -r '.[] | select(.name | contains("rc") or contains("a") or contains("b") | not) | .name' | sed 's|^v||g' | sort -rV | head -1 ''', + script: ''' echo 3.13.1 ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } @@ -687,7 +689,8 @@ pipeline { if [[ -n "${containers}" ]]; then docker stop ${containers} fi - docker system prune -af --volumes || : + docker system prune -f --volumes || : + docker image prune -af || : ''' } } @@ -1034,6 +1037,7 @@ EOF done fi docker system prune -f --volumes || : + docker image prune -af || : ''' cleanWs() } diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 40653d1..1767f8b 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-python external_type: na -custom_version_command: "curl -sX GET https://api.github.com/repos/python/cpython/tags | jq -r '.[] | select(.name | contains(\"rc\") or contains(\"a\") or contains(\"b\") | not) | .name' | sed 's|^v||g' | sort -rV | head -1" +custom_version_command: "echo 3.13.1" release_type: stable release_tag: alpine321 ls_branch: alpine321