Skip to content
Snippets Groups Projects
Commit 3fe093f0 authored by Mahyar Vahabi's avatar Mahyar Vahabi
Browse files

Update .gitlab-ci.yml file

parent d5ac9b3a
No related branches found
No related tags found
No related merge requests found
Pipeline #617383 failed
......@@ -6,21 +6,60 @@
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
sast:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
# Services
services:
- docker:dind # Docker-in-Docker service for the CI jobs
variables:
DOCKER_DRIVER: overlay2
before_script:
- docker info # Confirm Docker is working
# Test Stage (replace Herokuish with pytest)
test:
stage: test
include:
- template: Auto-DevOps.gitlab-ci.yml
image: python:3.8 # Python image
before_script:
- pip install -r requirements.txt # Install dependencies
script:
- pytest # Run tests with pytest
artifacts:
paths:
- gl-code-quality-report.json # Ensure this path matches your generated file
# Code Quality Job (Ensure Docker can pull image)
code_quality:
stage: test
script:
- if [ -n "$CODECLIMATE_REGISTRY_USERNAME" ] && [ -n "$CODECLIMATE_REGISTRY_PASSWORD" ] && [ -n "$CODECLIMATE_PREFIX" ]; then
docker login -u "$CODECLIMATE_REGISTRY_USERNAME" -p "$CODECLIMATE_REGISTRY_PASSWORD" "$CODECLIMATE_PREFIX";
docker pull --quiet "$CODE_QUALITY_IMAGE";
fi
artifacts:
paths:
- gl-code-quality-report.json
# Build Stage
build:
stage: build
script:
- /build/build.sh # Modify to match your actual build script
# Other stages...
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