Jaypore CI

> Jaypore CI: Minimal, Offline, Local CI system.
Log | Files | Refs | README

commit d250d94b1ec85fdabe23b418a815f88c0b124ea7
parent f161979bfd1fbb2fb371009d64c66b10e5e47c1d
Author: arjoonn <arjoonn@noreply.localhost>
Date:   Thu, 23 Mar 2023 04:57:38 +0000

Add changelog to docs (!71)

Reviewed-on: https://gitea.midpathsoftware.com/midpath/jaypore_ci/pulls/71

╔ 🔴 : JayporeCI       [sha 56d0d3acfa]
┏━ build-and-test
┃
┃ 🟢 : JciEnv          [8757fecc]   0:10
┃ 🟢 : Jci             [f58705c0]   0:20            ❮-- ['JciEnv']
┃ 🟢 : black           [9be5eed7]   0: 0            ❮-- ['JciEnv']
┃ 🟢 : install-test    [6195c8c4]   0: 0            ❮-- ['JciEnv']
┃ 🟢 : pylint          [cb8a037d]   0:12            ❮-- ['JciEnv']
┃ 🟢 : pytest          [7fa8302b]   0:30 Cov: 89%   ❮-- ['JciEnv']
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Publish
┃
┃ 🟢 : DockerHubJci    [59201672]   1: 2
┃ 🟢 : DockerHubJcienv [a4fe1903]   0:56
┃ 🟢 : PublishDocs     [a921bdd8]   0:47
┃ 🔴 : PublishPypi     [cb3bac5b]   0: 3 v0.2.28
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Diffstat:
Mcicd/build_and_publish_docs.sh | 1+
Acicd/render_changelog.py | 14++++++++++++++
Mdocs/source/index.rst | 23+++++++++++------------
Mjaypore_ci/changelog.py | 2+-
4 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/cicd/build_and_publish_docs.sh b/cicd/build_and_publish_docs.sh @@ -7,6 +7,7 @@ set -o pipefail build() { echo "Building docs" sphinx-apidoc -o docs/source/reference ./jaypore_ci + (python3 cicd/render_changelog.py >> docs/source/index.rst) sphinx-build docs/source/ docs/build # Create pre-push for repo diff --git a/cicd/render_changelog.py b/cicd/render_changelog.py @@ -0,0 +1,14 @@ +from jaypore_ci.changelog import version_map + +print("\n\n") +print("Changelog") +print("=========") +print("\n\n") + +for version in sorted(version_map.keys(), reverse=True): + print(version) + print("-" * len(str(version))) + print("") + for line in version_map[version]["changes"]: + print("- ", line) + print("") diff --git a/docs/source/index.rst b/docs/source/index.rst @@ -28,7 +28,7 @@ Contents .. contents:: Getting Started -======== +=============== Installation ------------ @@ -84,12 +84,11 @@ This would produce a CI report like:: - **Black**, **Pylint**, and **PyTest** are the job names. - **[ffcda0a9]** is the docker container ID for that job. - **1: 3** is the time taken by the job. -- **[Cov: 65% ]** is custom reporting done by the job. Any job can create a file - **/jaypore_ci/run/<job name>.txt** and the first 5 characters from that file - will be displayed in the report. - - Although this is used for coverage reports you could potentially use this for anything you want. A few ideas: - - You could report error codes here to indicate WHY a job failed. - - Report information about artifacts created like package publish versions. +- **[Cov: 65% ]** is custom reporting done by the job. + - Any job can create a file **/jaypore_ci/run/<job name>.txt** and the first 5 characters from that file will be displayed in the report. + - Although this is used for coverage reports you could potentially use this for anything you want. + - You could report error codes here to indicate WHY a job failed. + - Report information about artifacts created like package publish versions. To see the pipelines on your machine you can use a `Dozzle @@ -202,7 +201,7 @@ your docker image and then run the job with that built image. Define complex job relations ---------------------- +---------------------------- This config builds docker images, runs linting, testing on the codebase, then builds and publishes documentation. @@ -380,7 +379,7 @@ variables you will have to supply to make this work. p.job("x", "x") Run selected jobs based on commit message --------------------------------------- +----------------------------------------- Sometimes we want to control when some jobs run. For example, build/release jobs, or intensive testing jobs. A simple way to do this is to read the commit messsage and see if the author @@ -397,10 +396,10 @@ commit message contains **jci:release** as one of it's lines. p.job("release", "bash cicd/release.sh", depends_on=["build"]) `💬 <https://github.com/theSage21/jaypore_ci/discussions/20>`_ :Select remote based on job status / branch / authors -------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------------- .. note:: - If you want this feature please go and vote for it on the `github + If you want this feature please go and vote for it on the `github discussion https://github.com/theSage21/jaypore_ci/discussions/20>`_. At times it's necessary to inform multiple people about CI failues / passing. @@ -432,7 +431,7 @@ Contributing - If you want to open pull requests please open them on github. I'll try to review and merge them when I get time. Reference -======== +========= .. toctree:: :glob: diff --git a/jaypore_ci/changelog.py b/jaypore_ci/changelog.py @@ -6,7 +6,7 @@ version_map = { "changes": [ ( "Bugfix: When there are multiple (push) remotes, Jaypore CI" - " will pick the first one and use that" + " will pick the first one and use that." ) ], "instructions": [],