Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor-Weather
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bauruine
Tor-Weather
Commits
3854eb3e
Verified
Commit
3854eb3e
authored
2 years ago
by
Sarthik Gupta
Browse files
Options
Downloads
Patches
Plain Diff
feat: added pseudocode for gitlab ci
parent
f0157998
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-17
26 additions, 17 deletions
.gitlab-ci.yml
with
26 additions
and
17 deletions
.gitlab-ci.yml
+
26
−
17
View file @
3854eb3e
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 Verifica
tion
stage
:
Inspec
tion
script
:
-
pipenv install black
-
pipenv run black --check .
flake8
:
extends
:
.install_dependencies
stage
:
Formatting and Verifica
tion
stage
:
Inspec
tion
script
:
-
pipenv install flake8
-
pipenv run flake8 --config setup.cfg
bandit
:
extends
:
.install_dependencies
stage
:
Formatting and Verifica
tion
stage
:
Inspec
tion
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment