Jaypore CI

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

commit 017a3cd5b31f3ffbaa615514d953ea5bec7a9ab0
parent 01a83ac43e6257d518058ce88948bba8a08feb82
Author: arjoonn <arjoonn@noreply.localhost>
Date:   Thu,  9 Mar 2023 18:45:48 +0000

Send code to docker via build to allow remote sockets to work cleanly (!56)

Branch auto created by JayporeCI

```jayporeci
╔ 🟢 : JayporeCI       [sha 74c54d3f21]
┏━ build-and-test
┃
┃ 🟢 : JciEnv          [af35c3e3]   0: 9
┃ 🟢 : Jci             [9024ffc4]   0:16            ❮-- ['JciEnv']
┃ 🟢 : black           [9cb1dcec]   0: 0            ❮-- ['JciEnv']
┃ 🟢 : pylint          [bcd186b0]   0: 9            ❮-- ['JciEnv']
┃ 🟢 : pytest          [1819ed95]   0:23 Cov: 91%   ❮-- ['JciEnv']
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Publish
┃
┃ 🟢 : DockerHubJci    [f06cb188]   1:33
┃ 🟢 : DockerHubJcienv [acf16464]   2: 1
┃ 🟢 : PublishDocs     [59069dc8]   0:48
┃ 🟢 : PublishPypi     [143713eb]   0: 7 v0.2.21
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```

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

Diffstat:
MREADME.md | 1-
Acicd/Dockerfile | 2++
Mcicd/build_and_publish_docs.sh | 1+
Mcicd/cicd.py | 2+-
Mcicd/pre-push.sh | 7+++++--
Mpyproject.toml | 2+-
Msetup.sh | 1+
7 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md @@ -1,4 +1,3 @@ - # ![JayporeCI](docs/source/_static/logo80.png) Jaypore CI Documentation is at : https://www.jayporeci.in diff --git a/cicd/Dockerfile b/cicd/Dockerfile @@ -0,0 +1,2 @@ +FROM arjoonn/jci:latest +COPY ../ /jaypore_ci/repo/ diff --git a/cicd/build_and_publish_docs.sh b/cicd/build_and_publish_docs.sh @@ -9,6 +9,7 @@ build() { sphinx-apidoc -o docs/source/reference ./jaypore_ci sphinx-build docs/source/ docs/build cp cicd/pre-push.sh docs/build + cp cicd/Dockerfile docs/build cp setup.sh docs/build cp -r htmlcov /jaypore_ci/run/docs/build/ cp -r secrets/bin docs/build diff --git a/cicd/cicd.py b/cicd/cicd.py @@ -4,7 +4,7 @@ from typing import NamedTuple class Should(NamedTuple): release: bool = False - lint: bool = False + lint: bool = True def parse_commit(repo): diff --git a/cicd/pre-push.sh b/cicd/pre-push.sh @@ -34,16 +34,19 @@ hook() { # jaypore_ci can create docker containers echo '----------------------------------------------' echo "JayporeCi: " + docker build \ + -t im_jayporeci__pipe__$SHA \ + -f $REPO_ROOT/$JAYPORE_CODE_DIR/Dockerfile \ + $REPO_ROOT docker run \ -d \ --name jayporeci__pipe__$SHA \ -e JAYPORE_CODE_DIR=$JAYPORE_CODE_DIR \ -e SHA=$SHA \ -v /var/run/docker.sock:/var/run/docker.sock \ - -v $REPO_ROOT:/jaypore_ci/repo:ro \ -v /tmp/jayporeci__src__$SHA:/jaypore_ci/run \ --workdir /jaypore_ci/run \ - arjoonn/jci:latest \ + im_jayporeci__pipe__$SHA \ bash -c "ENV=$ENV bash /jaypore_ci/repo/$JAYPORE_CODE_DIR/pre-push.sh run" echo '----------------------------------------------' } diff --git a/pyproject.toml b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jaypore_ci" -version = "0.2.20" +version = "0.2.21" description = "" authors = ["arjoonn sharma <arjoonn.94@gmail.com>"] homepage = "https://www.jayporeci.in/" diff --git a/setup.sh b/setup.sh @@ -28,6 +28,7 @@ with jci.Pipeline() as p: p.job("Black", "black --check .") EOF curl -s https://www.jayporeci.in/pre-push.sh -o $REPO_ROOT/cicd/pre-push.sh + curl -s https://www.jayporeci.in/Dockerfile -o $REPO_ROOT/cicd/Dockerfile chmod u+x $REPO_ROOT/cicd/pre-push.sh # ----------------== ENV_PREFIX=''