mirror of
https://github.com/linuxserver/docker-python.git
synced 2026-02-19 17:24:19 +08:00
Merge pull request #6 from linuxserver/alpine319-ext
alpine319: update external trigger
This commit is contained in:
commit
17962f820c
4
.github/workflows/external_trigger.yml
vendored
4
.github/workflows/external_trigger.yml
vendored
@ -23,8 +23,8 @@ jobs:
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> External trigger running off of alpine319 branch. To disable this trigger, add \`python_alpine319\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
EXT_RELEASE=$(curl -s "https://endoflife.date/api/python.json" | jq -r '. | .[0].latest')
|
||||
echo "Type is \`custom_json\`" >> $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)
|
||||
echo "Type is \`custom_version_command\`" >> $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
|
||||
|
||||
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@ -19,8 +19,6 @@ pipeline {
|
||||
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
|
||||
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
|
||||
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
|
||||
JSON_URL = 'https://endoflife.date/api/python.json'
|
||||
JSON_PATH = '.[0].latest'
|
||||
BUILD_VERSION_ARG = 'PYTHON_VERSION'
|
||||
LS_USER = 'linuxserver'
|
||||
LS_REPO = 'docker-python'
|
||||
@ -128,16 +126,16 @@ pipeline {
|
||||
/* ########################
|
||||
External Release Tagging
|
||||
######################## */
|
||||
// If this is a custom json endpoint parse the return to get external tag
|
||||
stage("Set ENV custom_json"){
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = sh(
|
||||
script: '''curl -s ${JSON_URL} | jq -r ". | ${JSON_PATH}" ''',
|
||||
returnStdout: true).trim()
|
||||
env.RELEASE_LINK = env.JSON_URL
|
||||
}
|
||||
}
|
||||
// If this is a custom command to determine version use that command
|
||||
stage("Set tag custom bash"){
|
||||
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 ''',
|
||||
returnStdout: true).trim()
|
||||
env.RELEASE_LINK = 'custom_command'
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sanitize the release tag and strip illegal docker or github characters
|
||||
stage("Sanitize tag"){
|
||||
@ -768,7 +766,7 @@ pipeline {
|
||||
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
echo "Data change at JSON endpoint ${JSON_URL}" > releasebody.json
|
||||
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "alpine319",\
|
||||
"name": "'${META_TAG}'",\
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
|
||||
# jenkins variables
|
||||
project_name: docker-python
|
||||
external_type: custom_json
|
||||
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"
|
||||
release_type: prerelease
|
||||
release_tag: alpine319
|
||||
ls_branch: alpine319
|
||||
@ -10,8 +11,6 @@ skip_package_check: true
|
||||
unraid_template_sync: false
|
||||
unraid_template: false
|
||||
repo_vars:
|
||||
- JSON_URL = 'https://endoflife.date/api/python.json'
|
||||
- JSON_PATH = '.[0].latest'
|
||||
- BUILD_VERSION_ARG = 'PYTHON_VERSION'
|
||||
- LS_USER = 'linuxserver'
|
||||
- LS_REPO = 'docker-python'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user