Jaypore CI

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

commit 17271b30a080625915f42eb54c5cf646e4f3c188
parent a894b55fc4a326c5db54355739874a6c4612f9a1
Author: arjoonn <arjoonn@noreply.localhost>
Date:   Fri, 10 Feb 2023 19:08:54 +0000

Run jobs based on branch (!39)

Branch auto created by JayporeCI

```jayporeci
╔ 🔴 : JayporeCI       [sha 0997070d9a]
┏━ build_and_test
┃
┃ 🟢 : JciEnv          [5dcd6f99]   0: 2
┃ 🟢 : Jci             [d608fa1f]   0: 8       ❮-- ['JciEnv']
┃ 🟢 : black           [ceb12a34]   0: 0       ❮-- ['JciEnv']
┃ 🟢 : pylint          [17c3d5f1]   0:10       ❮-- ['JciEnv']
┃ 🟢 : pytest          [4f8e2688]   0: 3 65%   ❮-- ['JciEnv']
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Publish
┃
┃ 🟢 : DockerHubJci    [beae3d11]   0:52
┃ 🟢 : DockerHubJcienv [d340cd46]   0:31
┃ 🟢 : PublishDocs     [3491d1e7]   0:32
┃ 🔴 : PublishPypi     [80b41ec6]   0: 4
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```

Co-authored-by: arjoonn sharma <arjoonn@midpathsoftware.com>
Reviewed-on: https://gitea.midpathsoftware.com/midpath/jaypore_ci/pulls/39

Diffstat:
Mdocs/source/index.rst | 23+++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/docs/source/index.rst b/docs/source/index.rst @@ -323,8 +323,27 @@ Artifacts / Cache - Anything you write to this directory is available to all jobs so you can use this to pass artifacts / cache between jobs. - You can have a separate job to POST your artifacts to some remote location / git notes / S3 / gitea -Testing your pipelines too! ---------------------------- + +Jobs based on files change / branch name +---------------------------------------- + +Some jobs only need to run when your branch is **main** or in release branches. +At other times we want to check commit messages and based on the message run +different jobs. + +.. code-block:: python + + from jaypore_ci import jci + + + with jci.Pipeline() as p: + p.job("testing", "bash cicd/lint_test_n_build.sh") + if p.remote.branch == 'main': + p.job("publish", "bash cicd/publish_release.sh", depends_on=['testing']) + + +Test your pipeline config +------------------------- Mistakes in the pipeline config can take a long time to catch if you are running a large test harness.