From f2ef447f2b331b9cae65637dfdaaf8894d4f2b79 Mon Sep 17 00:00:00 2001 From: Clay Oster Date: Sun, 15 Sep 2024 15:18:16 -0500 Subject: [PATCH] Add CICD --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ .pylintrc | 8 ++++++++ 2 files changed, 41 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 .pylintrc diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..fb62564 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +stages: + - lint + #- test + - build + +lint-pylint: + stage: lint + image: python:3.12-slim + script: + - pip install --no-cache-dir -r requirements.txt + - pip install pylint + - pylint app.py + +#test-app: +# stage: test +# image: python:3.12-slim +# script: +# - pip install --no-cache-dir -r requirements.txt +# - pip install pytest pytest-flask +# - python -m pytest -v + +build: + stage: build + image: + name: gcr.io/kaniko-project/executor:v1.20.0-debug + entrypoint: [""] + script: + - /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}" + rules: + - if: $CI_COMMIT_TAG diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..9292cf9 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,8 @@ +# Documentation: https://pylint.readthedocs.io/en/latest/ +[MESSAGES CONTROL] +disable= + line-too-long, + fixme, + missing-function-docstring, + missing-module-docstring, + trailing-newlines