Skip to content
Snippets Groups Projects
Verified Commit 3854eb3e authored by Sarthik Gupta's avatar Sarthik Gupta :alien:
Browse files

feat: added pseudocode for gitlab ci

parent f0157998
No related branches found
No related tags found
No related merge requests found
variables:
PYTHON_VERSION: "3.9"
# PIP_CACHE_DIR: .pipenv/pipcache
# cache:
# key: pipenv
# paths:
# - .pipenv
# Defining the stages in the Pipeline
stages:
- Formatting and Verification
- Inspection
- Build
# Defining the Jobs in the Pipeline tagged with the stages they are in
.install_dependencies:
......@@ -19,32 +14,46 @@ stages:
- "python3 -m pip install --upgrade pip"
- "python3 -m pip install pipenv"
- "pipenv --python $PYTHON_VERSION"
# - "pipenv install --dev"
# - "export PYTHONPATH=src/main/python"
black:
extends: .install_dependencies
stage: Formatting and Verification
stage: Inspection
script:
- pipenv install black
- pipenv run black --check .
flake8:
extends: .install_dependencies
stage: Formatting and Verification
stage: Inspection
script:
- pipenv install flake8
- pipenv run flake8 --config setup.cfg
bandit:
extends: .install_dependencies
stage: Formatting and Verification
stage: Inspection
script:
- pipenv install bandit
- pipenv run bandit -r .
# sast:
# stage: Formatting & Verification
# TODO: To be added in the Inspection stage:
# 1. SAST
# 2. MyPy (repo not yet compatible)
# 3. Pytest
# 4. Pytest coverage
# 5. Test running the server
# TODO: To be added in the Build stage:
# 1. Create a container with the flask application
# 2. Upload the container in the Gitlab registry
# NOTES: To be done only on main branch
# TODO: To be added in the Deploy-Preprod stage:
# 1. Execute the commands to deploy the latest container on preprod instance
# 2. Test the deployment
# NOTES: To be done only on main branch
# Adding template for SAST Tests
# include:
# - template: Security/SAST.gitlab-ci.yml
# TODO: To be added in the Deploy-Prod stage:
# 1. Execute the commands to deploy the latest container on prod instance
# 2. Test the deployment
# NOTES: To be done manually only
# NOTES: To be done only on main branch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment