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

Update .gitlab-ci.yml file

parent 3fe093f0
No related branches found
No related tags found
Loading
Pipeline #617384 failed
......@@ -21,45 +21,32 @@ stages:
- performance
- cleanup
# Services
# Use Docker-in-Docker (DinD) for the CI jobs
services:
- docker:dind # Docker-in-Docker service for the CI jobs
- name: docker:dind
command: ["--host=tcp://0.0.0.0:2375", "--add-host=host.docker.internal:host-gateway"]
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375 # Set the Docker host to Docker-in-Docker
# You can also configure specific Docker versions if necessary
# DOCKER_VERSION: "19.03.12"
before_script:
- docker info # Confirm Docker is working
- docker info # Confirm Docker is working inside the job
# Test Stage (replace Herokuish with pytest)
# Define the test stage where Docker is used
test:
stage: test
image: python:3.8 # Python image
image: python:3.8 # Use the Python image or another image as needed
before_script:
- pip install -r requirements.txt # Install dependencies
script:
- pytest # Run tests with pytest
- docker info # Check if Docker is available
- pytest # Run your tests here
artifacts:
paths:
- gl-code-quality-report.json # Ensure this path matches your generated file
- gl-code-quality-report.json # Ensure this is generated if needed
# 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...
# Define other stages as needed...
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