You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web/.drone.yml

76 lines
2.0 KiB

kind: pipeline
type: docker
name: HeartWave
# dev is DMZ
trigger:
event:
- push
steps:
# - name: test
# image: php:7.4
# commands:
# - cd Sources
# # Installe les dépendances PHP si nécessaire
# - composer install
# # - composer require phpunit/phpunit
# - vendor/bin/phpunit common/Tests
# build test X
- name: docker-build
image: php.8.2-apache
commands:
- cd folderA/
- npm run build:css
- build cmd
# Sonar static code analisis deployment ✔️
- name: code-analysis
image: php:8.2-cli
environment:
SONAR_TOKEN:
from_secret: SONAR_TOKEN
settings:
sources: ./Sources/
commands:
- export SONAR_SCANNER_VERSION=4.7.0.2747
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- sonar-scanner -D sonar.projectKey=HeartTrack -D sonar.sources=./Sources -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
# -D sonar.flutter.coverage.reportPath=./Sources/bowlin_project/coverage/lcov.info
depends_on: [ docker-build ]
# build image and push on the registry ✔️
- name: docker-build-and-push
image: plugins/docker
settings:
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
dockerfile: Sources/config
context: Sources
registry: hub.codefirst.iut.uca.fr
repo: https://codefirst.iut.uca.fr/git/HeartDev/Web
depends_on: [ docker-build ]
- name: notify
image: ruby:2.1
rules:
- if: "$CI_COMMIT_TAG =~ /^.*-demo$/"
when: on_success
script:
- sh ./notifymail.sh
volumes:
db-data:
networks:
admin: