Commit 38ca67bb authored by François Agneray's avatar François Agneray
Browse files

Change gitlab-ci (registry gitlab)

parent e7662337
Pipeline #4650 passed with stages
in 5 minutes and 31 seconds
stages:
- install
- install_dependencies
- test
- sonar
- build
- deploy
variables:
VERSION: "3.5"
VERSION: "3.6"
SONARQUBE_URL: https://sonarqube.lam.fr
CONTAINER_IMAGE: portus.lam.fr/anis/anis-server
install:
install_dependencies:
image: jakzal/phpqa:php7.4
stage: install
stage: install_dependencies
script:
- composer install --ignore-platform-reqs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor
policy: push
policy: pull-push
only:
refs:
- develop
phpunit:
test:
image: jakzal/phpqa:php7.4
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor
policy: pull
script:
- phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --whitelist src --coverage-clover ./coverage/clover.xml --log-junit ./coverage/junit-logfile.xml --colors=never ./tests
cache:
artifacts:
paths:
- vendor
- coverage
policy: pull-push
only:
refs:
- develop
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
image: sonarsource/sonar-scanner-cli:latest
stage: sonar
script:
- sonar-scanner -Dsonar.projectKey=anis-server -Dsonar.sources=src -Dsonar.projectVersion=$VERSION -Dsonar.host.url=$SONARQUBE_URL -Dsonar.login=$SONAR_TOKEN -Dsonar.php.tests.reportPath=./coverage/junit-logfile.xml -Dsonar.php.coverage.reportPaths=./coverage/clover.xml
cache:
paths:
- coverage
policy: pull
only:
refs:
- develop
......@@ -53,15 +52,17 @@ sonar_scanner:
build:
image: docker:stable
stage: build
script:
- docker login -u fagneray -p $PORTUS_TOKEN portus.lam.fr
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:latest .
- docker push $CONTAINER_IMAGE:latest
cache:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor
policy: pull
dependencies: []
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY/anis/anis-server:latest || true
- docker build --cache-from $CI_REGISTRY/anis/anis-server:latest -t $CI_REGISTRY/anis/anis-server:latest .
- docker push $CI_REGISTRY/anis/anis-server:latest
only:
refs:
- develop
......@@ -69,6 +70,10 @@ build:
deploy:
image: alpine
stage: deploy
variables:
GIT_STRATEGY: none
cache: {}
dependencies: []
script:
- apk add --update curl
- curl -XPOST $DEV_WEBHOOK
......
......@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.6.0]
- In progress...
## [3.5.0]
### Added
- #7: Protected routes with SSO JWT
......
3.5.0
\ No newline at end of file
3.6.0
\ No newline at end of file
......@@ -60,11 +60,6 @@ services:
- ./conf-dev/aspic_vipers_dr2_w1.sql:/sql/aspic_vipers_dr2_w1.sql
- ./conf-dev/aspic_gama_g02.sql:/sql/aspic_gama_g02.sql
- ./conf-dev/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
adminer:
image: adminer
ports:
- 8083:8080
mailer:
image: djfarrelly/maildev
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment