From 8e091e0c826bfdc4dbadea42c7bb3a3e76972333 Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 28 Oct 2024 11:45:14 -0400 Subject: [PATCH 1/2] add CI report line to the release notes --- .../generate-jenkins/templates/Jenkinsfile.j2 | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/roles/generate-jenkins/templates/Jenkinsfile.j2 b/roles/generate-jenkins/templates/Jenkinsfile.j2 index f3d1ba87..4a007690 100644 --- a/roles/generate-jenkins/templates/Jenkinsfile.j2 +++ b/roles/generate-jenkins/templates/Jenkinsfile.j2 @@ -1157,31 +1157,31 @@ pipeline { "target_commitish": "{{ ls_branch }}",\ "name": "'${META_TAG}'",\ {% if custom_version_command is defined %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% endif %} {% if external_type == "github_devel" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "github_stable" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "alpine_repo" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start {% elif external_type == "custom_json" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% elif external_type == "deb_repo" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start {% elif external_type == "external_blob" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% elif external_type == "github_commit" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "gitlab_commit" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_GITLAB_PROJ}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_GITLAB_PROJ}' Changes:**\\n\\n' > start {% elif external_type == "npm_version" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**NPM Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**NPM Changes:**\\n\\n' > start {% elif external_type == "os" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start {% elif external_type == "pip_version" %} - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start -{% elif external_type == "custom" %} "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Custom Changes:**\\n\\n' > start{% endif %} + "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start +{% elif external_type == "custom" %} "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Custom Changes:**\\n\\n' > start{% endif %} printf '","draft": false,"prerelease": {% if release_type == "stable" %}false{% elif release_type == "prerelease" %}true{% endif %}}' >> releasebody.json paste -d'\\0' start releasebody.json > releasebody.json.done curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' From 032f2bc62f98d5c10ea9cc6802e8e0c512cb9e02 Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 28 Oct 2024 13:41:30 -0400 Subject: [PATCH 2/2] show NA when ci report is not defined --- .../generate-jenkins/templates/Jenkinsfile.j2 | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/roles/generate-jenkins/templates/Jenkinsfile.j2 b/roles/generate-jenkins/templates/Jenkinsfile.j2 index 4a007690..f1292e49 100644 --- a/roles/generate-jenkins/templates/Jenkinsfile.j2 +++ b/roles/generate-jenkins/templates/Jenkinsfile.j2 @@ -1157,31 +1157,31 @@ pipeline { "target_commitish": "{{ ls_branch }}",\ "name": "'${META_TAG}'",\ {% if custom_version_command is defined %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% endif %} {% if external_type == "github_devel" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "github_stable" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "alpine_repo" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start {% elif external_type == "custom_json" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% elif external_type == "deb_repo" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start {% elif external_type == "external_blob" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start {% elif external_type == "github_commit" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start {% elif external_type == "gitlab_commit" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_GITLAB_PROJ}' Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_GITLAB_PROJ}' Changes:**\\n\\n' > start {% elif external_type == "npm_version" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**NPM Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**NPM Changes:**\\n\\n' > start {% elif external_type == "os" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start {% elif external_type == "pip_version" %} - "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start -{% elif external_type == "custom" %} "body": "**CI Report:**\\n\\n'${CI_URL}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Custom Changes:**\\n\\n' > start{% endif %} + "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start +{% elif external_type == "custom" %} "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Custom Changes:**\\n\\n' > start{% endif %} printf '","draft": false,"prerelease": {% if release_type == "stable" %}false{% elif release_type == "prerelease" %}true{% endif %}}' >> releasebody.json paste -d'\\0' start releasebody.json > releasebody.json.done curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''