Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devops_mohi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MENACER Mohamed
devops_mohi
Commits
e65592db
Commit
e65592db
authored
4 months ago
by
MENACER Mohamed
Browse files
Options
Downloads
Patches
Plain Diff
test5
parent
43c45645
No related branches found
No related tags found
1 merge request
!4
Br1
Pipeline
#47527
failed
4 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+24
-23
24 additions, 23 deletions
.gitlab-ci.yml
with
24 additions
and
23 deletions
.gitlab-ci.yml
+
24
−
23
View file @
e65592db
st
age
s
:
im
age
:
docker:latest
-
install
-
t
es
t
servic
es
:
-
d
eploy
# Optionnel, à activer si nécessaire
-
d
ocker:dind
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
PHP_VERSION
:
"
8.2"
PHP_VERSION
:
"
8.2"
COMPOSER_CACHE_DIR
:
"
$CI_PROJECT_DIR/var/cache/composer"
COMPOSER_CACHE_DIR
:
"
$CI_PROJECT_DIR/var/cache/composer"
stages
:
-
build
-
test
cache
:
cache
:
key
:
composer
key
:
composer
paths
:
paths
:
-
vendor/
-
vendor/
-
var/cache/composer/
-
var/cache/composer/
install_dependencies
:
before_script
:
stage
:
install
-
apk add --no-cache bash git unzip curl docker-compose
image
:
php:$PHP_VERSION
-
docker --version
-
docker-compose --version
build
:
stage
:
build
script
:
script
:
-
apt-get update && apt-get install -y unzip git
-
docker-compose up -d
-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
-
docker-compose exec php composer install --no-interaction --prefer-dist
-
composer install --no-interaction --prefer-dist
artifacts
:
artifacts
:
paths
:
paths
:
-
vendor/
-
vendor/
run_
test
s
:
test
:
stage
:
test
stage
:
test
image
:
php:$PHP_VERSION
script
:
script
:
-
chmod +x bin/phpunit
# Ajoute cette ligne
-
docker-compose exec php chmod +x bin/phpunit
-
./bin/phpunit
-
docker-compose exec php ./bin/phpunit
dependencies
:
# Déploiement (à adapter selon ton serveur)
-
build
deploy
:
stage
:
deploy
only
:
-
main
# Modifier selon la branche utilisée
script
:
-
echo "Déploiement en cours..."
# Ajouter ici les commandes pour le déploiement
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