Jaypore CI

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

commit a8f2fd8f39b8eb4ccc1b579a7f792cdb8c48ee4b
parent 76da48174276d7738f4b2c3e44f753fedc1211f0
Author: arjoonn <arjoonn@noreply.localhost>
Date:   Thu,  2 Feb 2023 16:27:27 +0000

Update installation script (!34)

Branch auto created by JayporeCI

```jayporeci
╔ 🟢 : JayporeCI       [sha e4e9a22c2d]
┏━ build_and_test
┃
┃ 🟢 : JciEnv          [45117d6b]   4:43
┃ 🟢 : Jci             [8ef4cf87]   0: 9       ❮-- ['JciEnv']
┃ 🟢 : black           [bff55a78]   0: 0       ❮-- ['JciEnv']
┃ 🟢 : pylint          [2b2b31c3]   0:11       ❮-- ['JciEnv']
┃ 🟢 : pytest          [25ef6666]   0: 3 65%   ❮-- ['JciEnv']
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Publish
┃
┃ 🟢 : DockerHubJci    [66cfe9a9]   4:42
┃ 🟢 : DockerHubJcienv [efa2ab7a]   4:15
┃ 🟢 : PublishDocs     [a7e51c0d]   0:10
┃ 🟢 : PublishPypi     [e994e1f8]   0: 6
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```

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

Diffstat:
M.pylintrc | 4++--
Mcicd/cicd.py | 16++++++++++------
Mcicd/pre-push.sh | 4+---
Mcicd/run_tests.sh | 2+-
Mdocs/source/index.rst | 2+-
Mjaypore_ci/executors/docker.py | 2+-
Mjaypore_ci/interfaces.py | 4++++
Mjaypore_ci/remotes/gitea.py | 21+++++++++++----------
Mjaypore_ci/remotes/github.py | 4++--
Mjaypore_ci/reporters/markdown.py | 9+++++++--
Mjaypore_ci/reporters/text.py | 6+++---
Mpoetry.lock | 162++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mpyproject.toml | 2+-
Msecrets/ci.enc | 19++++++++++---------
Msetup.sh | 67++++---------------------------------------------------------------
15 files changed, 139 insertions(+), 185 deletions(-)

diff --git a/.pylintrc b/.pylintrc @@ -514,5 +514,5 @@ valid-metaclass-classmethod-first-arg=cls # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception +overgeneral-exceptions=builtins.BaseException, + builtins.Exception diff --git a/cicd/cicd.py b/cicd/cicd.py @@ -3,13 +3,17 @@ from jaypore_ci import jci with jci.Pipeline() as p: jcienv = f"jcienv:{p.remote.sha}" - with p.stage("Docker"): + with p.stage("build_and_test"): p.job("JciEnv", f"docker build --target jcienv -t jcienv:{p.remote.sha} .") - p.job("Jci", f"docker build --target jci -t jci:{p.remote.sha} .") - with p.stage("Jobs", image=jcienv): - p.job("black", "python3 -m black --check .") - p.job("pylint", "python3 -m pylint jaypore_ci/ tests/") - p.job("pytest", "bash cicd/run_tests.sh") + p.job( + "Jci", + f"docker build --target jci -t jci:{p.remote.sha} .", + depends_on=["JciEnv"], + ) + kwargs = dict(image=jcienv, depends_on=["JciEnv"]) + p.job("black", "python3 -m black --check .", **kwargs) + p.job("pylint", "python3 -m pylint jaypore_ci/ tests/", **kwargs) + p.job("pytest", "bash cicd/run_tests.sh", image=jcienv, depends_on=["JciEnv"]) with p.stage("Publish", image=jcienv): p.job("DockerHubJcienv", "bash cicd/build_and_push_docker.sh jcienv") p.job("DockerHubJci", "bash cicd/build_and_push_docker.sh jci") diff --git a/cicd/pre-push.sh b/cicd/pre-push.sh @@ -18,7 +18,6 @@ run() { hook() { SHA=$(git rev-parse HEAD) REPO_ROOT=$(git rev-parse --show-toplevel) - TOKEN=$(echo "url=$(git remote -v|grep push|awk '{print $2}')"|git credential fill|grep password|awk -F= '{print $2}') JAYPORE_CODE_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) JAYPORE_CODE_DIR=$(basename $JAYPORE_CODE_DIR) # We will mount the current dir into /jaypore_ci/repo @@ -29,10 +28,9 @@ hook() { # We also pass docker.sock to the run so that jaypore_ci can create docker containers echo '----------------------------------------------' echo "JayporeCi: " - JAYPORE_GITEA_TOKEN="${JAYPORE_GITEA_TOKEN:-$TOKEN}" docker run \ + docker run \ -d \ --name jayporeci__pipe__$SHA \ - -e JAYPORE_GITEA_TOKEN \ -e JAYPORE_CODE_DIR=$JAYPORE_CODE_DIR \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $REPO_ROOT:/jaypore_ci/repo:ro \ diff --git a/cicd/run_tests.sh b/cicd/run_tests.sh @@ -9,7 +9,7 @@ main() { python -m coverage run --source=. -m pytest -vv coverage html coverage report - echo "Cov: $(coverage report --format=total)%" > "/jaypore_ci/run/pytest.txt" + echo "$(coverage report --format=total)%" > "/jaypore_ci/run/pytest.txt" } (main) diff --git a/docs/source/index.rst b/docs/source/index.rst @@ -84,7 +84,7 @@ This would produce a CI report like:: - `[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 10 characters from that 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. diff --git a/jaypore_ci/executors/docker.py b/jaypore_ci/executors/docker.py @@ -95,7 +95,7 @@ class Docker(Executor): f"docker network create -d bridge {self.get_net()}" ), ) - raise Exception("Cannot create network") + raise TriggerFailed("Cannot create network") def delete_all_jobs(self): """ diff --git a/jaypore_ci/interfaces.py b/jaypore_ci/interfaces.py @@ -12,6 +12,10 @@ class TriggerFailed(Exception): "Failure to trigger a job" +class RemoteApiFailed(Exception): + "Failure while working with a remote" + + class JobStatus(NamedTuple): is_running: bool exit_code: int diff --git a/jaypore_ci/remotes/gitea.py b/jaypore_ci/remotes/gitea.py @@ -9,9 +9,8 @@ from pathlib import Path from urllib.parse import urlparse import requests -from rich import print as rprint -from jaypore_ci.interfaces import Remote +from jaypore_ci.interfaces import Remote, RemoteApiFailed from jaypore_ci.logging import logger @@ -107,15 +106,17 @@ class Gitea(Remote): # pylint: disable=too-many-instance-attributes if r.status_code == 404 and r.json()["message"] == "IsBranchExist": self.base_branch = "develop" return self.get_pr_id() - rprint( - self.api, - self.owner, - self.repo, - self.token, - self.branch, + self.logging().debug()( + "Failed gitea api", + api=self.api, + owner=self.owner, + repo=self.repo, + token=self.token, + branch=self.branch, + status=r.status_code, + response=r.text, ) - rprint(r.status_code, r.text) - raise Exception(r) + raise RemoteApiFailed(r) def publish(self, report: str, status: str): """ diff --git a/jaypore_ci/remotes/github.py b/jaypore_ci/remotes/github.py @@ -10,7 +10,7 @@ from urllib.parse import urlparse import requests -from jaypore_ci.interfaces import Remote +from jaypore_ci.interfaces import Remote, RemoteApiFailed from jaypore_ci.logging import logger @@ -128,7 +128,7 @@ class Github(Remote): # pylint: disable=too-many-instance-attributes status=r.status_code, response=r.text, ) - raise Exception(r) + raise RemoteApiFailed(r) def publish(self, report: str, status: str): """ diff --git a/jaypore_ci/reporters/markdown.py b/jaypore_ci/reporters/markdown.py @@ -69,8 +69,13 @@ flowchart {pipeline.graph_direction} a, b = pipeline.jobs[a], pipeline.jobs[b] arrow = "." * ((i % mod) + 1) arrow = f"-{arrow}->" - mermaid += f""" - {ref[a.name]}({a.name}):::{st_map[a.status]} {arrow} {ref[b.name]}({b.name}):::{st_map[b.status]}""" + mermaid += "\n" + mermaid += ( + " " + "{ref[a.name]}({a.name}):::{st_map[a.status]}" + "{arrow}" + "{ref[b.name]}({b.name}):::{st_map[b.status]}" + ) mermaid += """ end """ diff --git a/jaypore_ci/reporters/text.py b/jaypore_ci/reporters/text.py @@ -39,7 +39,7 @@ class Text(Reporter): """ max_name = max(len(job.name) for job in pipeline.jobs.values()) max_name = max(max_name, len("jayporeci")) - max_report = 10 + max_report = 5 name = ("JayporeCI" + " " * max_name)[:max_name] graph = [ "", @@ -69,9 +69,9 @@ class Text(Reporter): report = get_job_report(n.name) report = " ".join(report.strip().split()) report = (report + " " * max_report)[:max_report] - graph[-1] += f" [{report}]" except FileNotFoundError: - pass + report = " " * max_report + graph[-1] += f" {report}" if n.parents: graph[-1] += f" ❮-- {n.parents}" graph += [closer] diff --git a/poetry.lock b/poetry.lock @@ -138,14 +138,14 @@ files = [ [[package]] name = "astroid" -version = "2.13.3" +version = "2.14.1" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "astroid-2.13.3-py3-none-any.whl", hash = "sha256:14c1603c41cc61aae731cad1884a073c4645e26f126d13ac8346113c95577f3b"}, - {file = "astroid-2.13.3.tar.gz", hash = "sha256:6afc22718a48a689ca24a97981ad377ba7fb78c133f40335dfd16772f29bcfb1"}, + {file = "astroid-2.14.1-py3-none-any.whl", hash = "sha256:23c718921acab5f08cbbbe9293967f1f8fec40c336d19cd75dc12a9ea31d2eb2"}, + {file = "astroid-2.14.1.tar.gz", hash = "sha256:bd1aa4f9915c98e8aaebcd4e71930154d4e8c9aaf05d35ac0a63d1956091ae3f"}, ] [package.dependencies] @@ -294,63 +294,63 @@ files = [ [[package]] name = "coverage" -version = "7.0.5" +version = "7.1.0" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"}, - {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"}, - {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"}, - {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"}, - {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"}, - {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"}, - {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"}, - {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"}, - {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"}, - {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"}, - {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"}, - {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"}, - {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"}, - {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"}, - {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"}, - {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"}, - {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"}, - {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"}, - {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"}, - {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"}, - {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"}, - {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"}, - {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"}, - {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"}, - {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"}, - {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"}, - {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"}, - {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"}, - {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"}, - {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"}, - {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"}, - {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"}, - {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"}, - {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"}, - {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"}, - {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"}, - {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"}, - {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"}, - {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"}, - {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"}, - {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"}, - {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"}, - {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"}, - {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"}, - {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"}, - {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"}, - {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"}, - {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"}, - {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"}, - {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"}, - {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"}, + {file = "coverage-7.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3b946bbcd5a8231383450b195cfb58cb01cbe7f8949f5758566b881df4b33baf"}, + {file = "coverage-7.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ec8e767f13be637d056f7e07e61d089e555f719b387a7070154ad80a0ff31801"}, + {file = "coverage-7.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4a5a5879a939cb84959d86869132b00176197ca561c664fc21478c1eee60d75"}, + {file = "coverage-7.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b643cb30821e7570c0aaf54feaf0bfb630b79059f85741843e9dc23f33aaca2c"}, + {file = "coverage-7.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32df215215f3af2c1617a55dbdfb403b772d463d54d219985ac7cd3bf124cada"}, + {file = "coverage-7.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:33d1ae9d4079e05ac4cc1ef9e20c648f5afabf1a92adfaf2ccf509c50b85717f"}, + {file = "coverage-7.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:29571503c37f2ef2138a306d23e7270687c0efb9cab4bd8038d609b5c2393a3a"}, + {file = "coverage-7.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:63ffd21aa133ff48c4dff7adcc46b7ec8b565491bfc371212122dd999812ea1c"}, + {file = "coverage-7.1.0-cp310-cp310-win32.whl", hash = "sha256:4b14d5e09c656de5038a3f9bfe5228f53439282abcab87317c9f7f1acb280352"}, + {file = "coverage-7.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:8361be1c2c073919500b6601220a6f2f98ea0b6d2fec5014c1d9cfa23dd07038"}, + {file = "coverage-7.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:da9b41d4539eefd408c46725fb76ecba3a50a3367cafb7dea5f250d0653c1040"}, + {file = "coverage-7.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5b15ed7644ae4bee0ecf74fee95808dcc34ba6ace87e8dfbf5cb0dc20eab45a"}, + {file = "coverage-7.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d12d076582507ea460ea2a89a8c85cb558f83406c8a41dd641d7be9a32e1274f"}, + {file = "coverage-7.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2617759031dae1bf183c16cef8fcfb3de7617f394c813fa5e8e46e9b82d4222"}, + {file = "coverage-7.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4e4881fa9e9667afcc742f0c244d9364d197490fbc91d12ac3b5de0bf2df146"}, + {file = "coverage-7.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9d58885215094ab4a86a6aef044e42994a2bd76a446dc59b352622655ba6621b"}, + {file = "coverage-7.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ffeeb38ee4a80a30a6877c5c4c359e5498eec095878f1581453202bfacc8fbc2"}, + {file = "coverage-7.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3baf5f126f30781b5e93dbefcc8271cb2491647f8283f20ac54d12161dff080e"}, + {file = "coverage-7.1.0-cp311-cp311-win32.whl", hash = "sha256:ded59300d6330be27bc6cf0b74b89ada58069ced87c48eaf9344e5e84b0072f7"}, + {file = "coverage-7.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:6a43c7823cd7427b4ed763aa7fb63901ca8288591323b58c9cd6ec31ad910f3c"}, + {file = "coverage-7.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7a726d742816cb3a8973c8c9a97539c734b3a309345236cd533c4883dda05b8d"}, + {file = "coverage-7.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc7c85a150501286f8b56bd8ed3aa4093f4b88fb68c0843d21ff9656f0009d6a"}, + {file = "coverage-7.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5b4198d85a3755d27e64c52f8c95d6333119e49fd001ae5798dac872c95e0f8"}, + {file = "coverage-7.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddb726cb861c3117a553f940372a495fe1078249ff5f8a5478c0576c7be12050"}, + {file = "coverage-7.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:51b236e764840a6df0661b67e50697aaa0e7d4124ca95e5058fa3d7cbc240b7c"}, + {file = "coverage-7.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7ee5c9bb51695f80878faaa5598040dd6c9e172ddcf490382e8aedb8ec3fec8d"}, + {file = "coverage-7.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c31b75ae466c053a98bf26843563b3b3517b8f37da4d47b1c582fdc703112bc3"}, + {file = "coverage-7.1.0-cp37-cp37m-win32.whl", hash = "sha256:3b155caf3760408d1cb903b21e6a97ad4e2bdad43cbc265e3ce0afb8e0057e73"}, + {file = "coverage-7.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2a60d6513781e87047c3e630b33b4d1e89f39836dac6e069ffee28c4786715f5"}, + {file = "coverage-7.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f2cba5c6db29ce991029b5e4ac51eb36774458f0a3b8d3137241b32d1bb91f06"}, + {file = "coverage-7.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:beeb129cacea34490ffd4d6153af70509aa3cda20fdda2ea1a2be870dfec8d52"}, + {file = "coverage-7.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c45948f613d5d18c9ec5eaa203ce06a653334cf1bd47c783a12d0dd4fd9c851"}, + {file = "coverage-7.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef382417db92ba23dfb5864a3fc9be27ea4894e86620d342a116b243ade5d35d"}, + {file = "coverage-7.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7c7c0d0827e853315c9bbd43c1162c006dd808dbbe297db7ae66cd17b07830f0"}, + {file = "coverage-7.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e5cdbb5cafcedea04924568d990e20ce7f1945a1dd54b560f879ee2d57226912"}, + {file = "coverage-7.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9817733f0d3ea91bea80de0f79ef971ae94f81ca52f9b66500c6a2fea8e4b4f8"}, + {file = "coverage-7.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:218fe982371ac7387304153ecd51205f14e9d731b34fb0568181abaf7b443ba0"}, + {file = "coverage-7.1.0-cp38-cp38-win32.whl", hash = "sha256:04481245ef966fbd24ae9b9e537ce899ae584d521dfbe78f89cad003c38ca2ab"}, + {file = "coverage-7.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:8ae125d1134bf236acba8b83e74c603d1b30e207266121e76484562bc816344c"}, + {file = "coverage-7.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2bf1d5f2084c3932b56b962a683074a3692bce7cabd3aa023c987a2a8e7612f6"}, + {file = "coverage-7.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:98b85dd86514d889a2e3dd22ab3c18c9d0019e696478391d86708b805f4ea0fa"}, + {file = "coverage-7.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38da2db80cc505a611938d8624801158e409928b136c8916cd2e203970dde4dc"}, + {file = "coverage-7.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3164d31078fa9efe406e198aecd2a02d32a62fecbdef74f76dad6a46c7e48311"}, + {file = "coverage-7.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db61a79c07331e88b9a9974815c075fbd812bc9dbc4dc44b366b5368a2936063"}, + {file = "coverage-7.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ccb092c9ede70b2517a57382a601619d20981f56f440eae7e4d7eaafd1d1d09"}, + {file = "coverage-7.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:33ff26d0f6cc3ca8de13d14fde1ff8efe1456b53e3f0273e63cc8b3c84a063d8"}, + {file = "coverage-7.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d47dd659a4ee952e90dc56c97d78132573dc5c7b09d61b416a9deef4ebe01a0c"}, + {file = "coverage-7.1.0-cp39-cp39-win32.whl", hash = "sha256:d248cd4a92065a4d4543b8331660121b31c4148dd00a691bfb7a5cdc7483cfa4"}, + {file = "coverage-7.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:7ed681b0f8e8bcbbffa58ba26fcf5dbc8f79e7997595bf071ed5430d8c08d6f3"}, + {file = "coverage-7.1.0-pp37.pp38.pp39-none-any.whl", hash = "sha256:755e89e32376c850f826c425ece2c35a4fc266c081490eb0a841e7c1cb0d3bda"}, + {file = "coverage-7.1.0.tar.gz", hash = "sha256:10188fe543560ec4874f974b5305cd1a8bdcfa885ee00ea3a03733464c4ca265"}, ] [package.extras] @@ -540,19 +540,19 @@ files = [ [[package]] name = "isort" -version = "5.11.4" +version = "5.12.0" description = "A Python utility / library to sort Python imports." category = "dev" optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.8.0" files = [ - {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"}, - {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"}, + {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, + {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, ] [package.extras] -colors = ["colorama (>=0.4.3,<0.5.0)"] -pipfile-deprecated-finder = ["pipreqs", "requirementslib"] +colors = ["colorama (>=0.4.3)"] +pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] @@ -913,14 +913,14 @@ files = [ [[package]] name = "pathspec" -version = "0.10.3" +version = "0.11.0" description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"}, - {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"}, + {file = "pathspec-0.11.0-py3-none-any.whl", hash = "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229"}, + {file = "pathspec-0.11.0.tar.gz", hash = "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"}, ] [[package]] @@ -1007,18 +1007,18 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.15.10" +version = "2.16.0" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "pylint-2.15.10-py3-none-any.whl", hash = "sha256:9df0d07e8948a1c3ffa3b6e2d7e6e63d9fb457c5da5b961ed63106594780cc7e"}, - {file = "pylint-2.15.10.tar.gz", hash = "sha256:b3dc5ef7d33858f297ac0d06cc73862f01e4f2e74025ec3eff347ce0bc60baf5"}, + {file = "pylint-2.16.0-py3-none-any.whl", hash = "sha256:55e5cf00601c4cfe2e9404355c743a14e63be85df7409da7e482ebde5f9f14a1"}, + {file = "pylint-2.16.0.tar.gz", hash = "sha256:43ee36c9b690507ef9429ce1802bdc4dcde49454c3d665e39c23791567019c0a"}, ] [package.dependencies] -astroid = ">=2.12.13,<=2.14.0-dev0" +astroid = ">=2.14.1,<=2.16.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, @@ -1122,23 +1122,23 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rich" -version = "13.2.0" +version = "13.3.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "main" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.2.0-py3-none-any.whl", hash = "sha256:7c963f0d03819221e9ac561e1bc866e3f95a02248c1234daa48954e6d381c003"}, - {file = "rich-13.2.0.tar.gz", hash = "sha256:f1a00cdd3eebf999a15d85ec498bfe0b1a77efe9b34f645768a54132ef444ac5"}, + {file = "rich-13.3.1-py3-none-any.whl", hash = "sha256:8aa57747f3fc3e977684f0176a88e789be314a99f99b43b75d1e9cb5dc6db9e9"}, + {file = "rich-13.3.1.tar.gz", hash = "sha256:125d96d20c92b946b983d0d392b84ff945461e5a06d3867e9f9e575f8697b67f"}, ] [package.dependencies] markdown-it-py = ">=2.1.0,<3.0.0" -pygments = ">=2.6.0,<3.0.0" +pygments = ">=2.14.0,<3.0.0" typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} [package.extras] -jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] +jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "six" @@ -1234,14 +1234,14 @@ test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.0" +version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, + {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, + {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, ] [package.extras] @@ -1554,18 +1554,18 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.11.0" +version = "3.12.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, - {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, + {file = "zipp-3.12.0-py3-none-any.whl", hash = "sha256:9eb0a4c5feab9b08871db0d672745b53450d7f26992fd1e4653aa43345e97b86"}, + {file = "zipp-3.12.0.tar.gz", hash = "sha256:73efd63936398aac78fd92b6f4865190119d6c91b531532e798977ea8dd402eb"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] diff --git a/pyproject.toml b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jaypore_ci" -version = "0.2.4" +version = "0.2.5" description = "" authors = ["arjoonn sharma <arjoonn.94@gmail.com>"] diff --git a/secrets/ci.enc b/secrets/ci.enc @@ -1,11 +1,12 @@ -JAYPORE_DOCKER_USER=ENC[AES256_GCM,data:EFQJF0xzRQ==,iv:FN1Lk12AMJ3AuZ1lXWR4sxS7vVsdEKoO0eWHn+OFT2Q=,tag:52mEjL0Jqe71QiT/idGAjQ==,type:str] -JAYPORE_DOCKER_PWD=ENC[AES256_GCM,data:93dY+QKRPT67vpPxy+bHvEvLebkr/DjnTN1ILOavEx8pfwyE,iv:YBy3yv+1Nr+HnxwlH4rtOHnk6GEe9sB5ZDXhZIX106I=,tag:Uu1gYvzb08a0C8F6ir/M9Q==,type:str] -JAYPORE_NETLIFY_TOKEN=ENC[AES256_GCM,data:5bPThyqEcEt84m/2DWJKTZhHMMfipFC95XCN7+7ZOyQq9cH0dGHzqP9m0w==,iv:BMuJScVsgLblV3SQ58Ct03gPR5WkEKCSyo2YVfHhMIQ=,tag:hTaFloLUMaJFrirKVWQQTQ==,type:str] -JAYPORE_NETLIFY_SITEID=ENC[AES256_GCM,data:5SO6Ynd3uWtsw61rssbQ0ibGudUc4D76mgIKPyMiMEHYxPTn,iv:npbTOB32me8w9RPj3o6ASuZVi0PhutLz4pPOUyzfr+Y=,tag:ffBx0QZhJQydPaUZW6B79Q==,type:str] -JAYPORE_PYPI_TOKEN=ENC[AES256_GCM,data:IkouQeCYtj/ci3CdHmZ9O+/tmeFtZWbneka/JexhqENdCSUCdpyWGoNppsP6ZNCBYaJMU7seH4vAAlVNBlbJ9aAgZbafHXeAbUb+j5nDuZyxVELSG/GSfoIrIJIH984QTncfrnbZ5tHjOOxl1S+Lh0vxLuMoGUPrKnJsJqhe/n6uJ1+MVoxgQrptuMPwWPGbuQFlF2G0WKZASkGzO89oI3ZclqSXan1qsC0tZMew/hwtsCVQc3w8YHxtBUDDpwbmz/q8HyzWHm8lbfC27KLGHtM=,iv:sHCltgCtsYyvEPmPNOQn+OtI4mtUH1s4wx9HBka+T9I=,tag:9y9QVv1K4vfSQNlEEvcddA==,type:str] -sops_unencrypted_suffix=_unencrypted -sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXYnpwdEZVT0Z5TStNR1lh\nUXl2Q2xMZ3M0c0xoV2NBMU5kOXZtRlNNblVZCnNxeXh6b1RXKzBmdVgydkxOWndI\nblJiZW9wUnJCRGwvY0pmNGRWSitOMUUKLS0tIDYzRzlUc1JzeXhZL2dNWjJwZUVP\nTWNoSjRFcUtieXo0Y0lvcTk1bjNxeWsKGuUO8unlGhGgTUP7ySlqYLzrF4mhhhK9\nE0rXRCAPoRxePL+1ND1772THsXBq4RIHk5e1gkOuXt7dzsR4uNdK0A==\n-----END AGE ENCRYPTED FILE-----\n -sops_mac=ENC[AES256_GCM,data:FKVKM90hkkil5Adz8xRjHF4H0hAOSBD62JeoxeQbVMUtATQOHGMvzH6/RcUtoLHOLxveaQkC7ytM7zC90YR/OkSiwCJo1fnBDPE6KHncMfxdB/xnILYqUZiyJe4RbN9EQybbjszE8qwLp5PJU2+ducQV/dS4WRKds4Jsc1jXCjQ=,iv:jg8QYEI2jXY+kDI52kXBsyRVLTBUK2cEKcG2JQxLraA=,tag:3vQ01L4ohNIX5fHqZiRDVA==,type:str] +JAYPORE_DOCKER_USER=ENC[AES256_GCM,data:bWzVvBoSwg==,iv:YZWgrVzgYAkV0UtBmMQOpcDPXCGl+RTFXGeN4+FaT8U=,tag:snItFIFsT6j/rsqJjs9UTg==,type:str] +JAYPORE_DOCKER_PWD=ENC[AES256_GCM,data:w+228n0Lu0jF6mdbo2Tl98ata8Mh7EAUiyPcDqnicpZYjGTY,iv:140Ah/i5uI9y9ZpurQFuJ0EAOSz5U2NcMT2eRZnLoI0=,tag:FTqPc+zy+aspiRKAubeGWQ==,type:str] +JAYPORE_NETLIFY_TOKEN=ENC[AES256_GCM,data:sdbG9uX53iNee1i3OVS5x5dehfDB3zvwRv1C9ziUTOCqhG4pxcb3D7+jWg==,iv:XiS/FrUAskxO8P3kpgMCn4R2OXAqOb/JuZMNnHIa2SI=,tag:Plo5Tm6mP/734EYS2JlLqQ==,type:str] +JAYPORE_NETLIFY_SITEID=ENC[AES256_GCM,data:K70Mup4c95eU3oCdY1yZwBNl2pN33RJA1SEnYbZ1NLarE/N6,iv:434UV0BG39eUwuI8TmciO6wNQbmnNZx4VtY/C8iL6R4=,tag:3+s7RIDHpogczYg7VmBanQ==,type:str] +JAYPORE_PYPI_TOKEN=ENC[AES256_GCM,data:TgiQOevajULMgnj0RwqaZ54NUbWDOOc/w9lHY3qc50cyZ+p3sIuUjmNQ+xM+aCLh68OQotRb7bzr+A999/cy1EcIdcsBJJvU4qjHGvFJ4YxsP+dgC0QeXerXqdLxCClOZ9NQ368ffKo4Htxj1mkZE2guXvYUhqR32YQ83MgKRWY8WgCtLm1xnstAAZnAOm+CHKN5jPb1jhXWXuhZk8dsGUCBDyKvQbwCFYw0DhByjQ+NSkLB1K/+s8iEla6UzBaA5AgGF0RvBSSegEhj14BACcA=,iv:UUrkczg4//aNRUSH+ZDwNwEDY8vMO5xGOHH+dXt3Suc=,tag:pIxet3/a1F5gOMDHg9ma9Q==,type:str] +JAYPORE_GITEA_TOKEN=ENC[AES256_GCM,data:hya5PF/zQbkhplmiYHBYbpWQaDxavPs15aHalftvyeuBe5BGKdFtew==,iv:za+/uLXPLD200MTcqDlBdO7aJnDw7eAF123p9yvpeK4=,tag:AUaUcSCgE/YiuUHGVHoH/w==,type:str] sops_version=3.7.3 -sops_lastmodified=2023-01-16T07:41:23Z +sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzVCtDNkZKVDRmSUVrdlR4\nczEyK1ViVlhpYzJydkR6R2FZY0JYVC9qUlQwCm41S1dkbWRWMFFFWDhKcmcwRTZI\nTFMvUzJ0RXNOYWtHYlNlSHJHVnd1RjQKLS0tIDBGUDNDSnFsak9mMm1SNnpuREY5\nSGRJVVI4ZW91SkdHYUNQeXVJUU9lS1kKvs9P+gI6AN8GWwe2opau/F4d9noxd2mm\nhlQySflV7qKMhKXdt+cct4/atsBLB9BKvcaHBx2BSYBjNA6MwGIirw==\n-----END AGE ENCRYPTED FILE-----\n +sops_mac=ENC[AES256_GCM,data:xErAenO+DaTNk/W4OOqIVNafdVmLMzVDOKb3GRzEjZBuLNNUkNBRVVAyQmkr6+9IeqINnpp+285wg9h8Qf5BPAfSScI5i8Kj/GiqHmiriE//4+bub9BYg+kdP7B3idukGoeJEGUrMBhENUuS7Z5TYgI7UgOlKXSHWWqBgn+MkWo=,iv:25fjibgI3Xd19h+SMQrJbNpJc5QoB+kwfZxo4LXydG0=,tag:lW2GPmTvq8h2Tc84F9Il1A==,type:str] sops_age__list_0__map_recipient=age1u0zd477nnqqausg4vtxl3laxz73t5tgt9qw8enmpeeadcmes3eusw3v3m9 +sops_unencrypted_suffix=_unencrypted +sops_lastmodified=2023-02-02T14:21:37Z diff --git a/setup.sh b/setup.sh @@ -14,70 +14,11 @@ main (){ from jaypore_ci import jci with jci.Pipeline() as p: - p.job("Workingdir", "pwd") - p.job("Tree", "tree") - p.job("Black", "black --check .") - p.job("PyLint", "pylint jaypore_ci/ tests/") - p.job("PyTest", "pytest tests/") + p.job("Black", "black --check .") EOF - cat > $REPO_ROOT/cicd/pre-push.sh << EOF -#! /bin/bash - -set -o errexit -set -o nounset -set -o pipefail - - -editenv() { - NAME=\$1 - SOPS_AGE_KEY_FILE=secrets/\$NAME.age sops --decrypt --input-type dotenv --output-type dotenv secrets/\$NAME.enc > secrets/\$NAME.env - vim secrets/\$NAME.env - sops --encrypt --age \$(age-keygen -y secrets/\$NAME.age) secrets/\$NAME.env > secrets/\$NAME.enc - rm secrets/\$NAME.env -} - -run() { - export SECRETS_PATH=secrets - export SECRETS_FILENAME=jaypore_ci - export \$(SOPS_AGE_KEY_FILE=/jaypore_ci/repo/\$SECRETS_PATH/\$SECRETS_FILENAME.age sops --decrypt --input-type dotenv --output-type dotenv /jaypore_ci/repo/\$SECRETS_PATH/\$SECRETS_FILENAME.enc | xargs) - cp -r /jaypore_ci/repo/. /jaypore_ci/run - cd /jaypore_ci/run/ - git clean -fdx - # Change the name of the file if this is not cicd.py - python /jaypore_ci/run/\$JAYPORE_CODE_DIR/cicd.py -} - - -hook() { - SHA=\$(git rev-parse HEAD) - REPO_ROOT=\$(git rev-parse --show-toplevel) - TOKEN=\$(echo "url=\$(git remote -v|grep push|awk '{print \$2}')"|git credential fill|grep password|awk -F= '{print \$2}') - JAYPORE_CODE_DIR=\$( cd -- "\$( dirname -- "\${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - JAYPORE_CODE_DIR=\$(basename \$JAYPORE_CODE_DIR) - # We will mount the current dir into /jaypore_ci/repo - # Then we will copy things over to /jaypore_ci/run - # Then we will run git clean to remove anything that is not in git - # Then we call the actual cicd code - # - # We also pass docker.sock to the run so that jaypore_ci can create docker containers - echo '----------------------------------------------' - echo "JayporeCi: " - JAYPORE_GITEA_TOKEN="\${JAYPORE_GITEA_TOKEN:-\$TOKEN}" docker run \\ - -d \\ - --name jaypore_ci_\$SHA \\ - -e JAYPORE_GITEA_TOKEN \\ - -e JAYPORE_CODE_DIR=\$JAYPORE_CODE_DIR \\ - -v /var/run/docker.sock:/var/run/docker.sock \\ - -v \$REPO_ROOT:/jaypore_ci/repo:ro \\ - -v /tmp/jaypore_\$SHA:/jaypore_ci/run \\ - --workdir /jaypore_ci/run \\ - $IMAGE \\ - bash -c "bash /jaypore_ci/repo/\$JAYPORE_CODE_DIR/pre-push.sh run" - echo '----------------------------------------------' -} -("\$@") -EOF + curl https://raw.githubusercontent.com/theSage21/jaypore_ci/main/cicd/pre-push.sh -o $REPO_ROOT/cicd/pre-push.sh + # -------------- echo "Creating git hook for pre-commit" chmod u+x $REPO_ROOT/cicd/pre-push.sh @@ -100,7 +41,7 @@ EOF echo "$REPO_ROOT/.git/hooks/pre-push.local" >> $REPO_ROOT/.git/hooks/pre-push fi fi - echo "$REPO_ROOT/cicd/pre-push.sh" >> $REPO_ROOT/.git/hooks/pre-push + echo "$REPO_ROOT/cicd/pre-push.sh hook" >> $REPO_ROOT/.git/hooks/pre-push chmod u+x $LOCAL_HOOK }