|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: FLAD
|
|
|
|
|
name: FLAD-CLI
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
@ -14,6 +14,40 @@ steps:
|
|
|
|
|
- npm install
|
|
|
|
|
- npm run
|
|
|
|
|
|
|
|
|
|
- name: code-analysis
|
|
|
|
|
image: node:latest
|
|
|
|
|
environment:
|
|
|
|
|
SONAR_TOKEN:
|
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
|
settings:
|
|
|
|
|
sources: ./src/FLAD/
|
|
|
|
|
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=FLAD -D sonar.sources=./src/FLAD -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
|
|
|
|
|
depends_on: [ app-build ]
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: FLAD-API
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
- push
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: hadolint
|
|
|
|
|
image: hadolint/hadolint:latest-alpine
|
|
|
|
|
commands:
|
|
|
|
|
- cd src/Api
|
|
|
|
|
# - hadolint Dockerfile
|
|
|
|
|
|
|
|
|
|
# - name: docker-build-and-push
|
|
|
|
|
# image: plugins/docker
|
|
|
|
|
# settings:
|
|
|
|
@ -26,7 +60,6 @@ steps:
|
|
|
|
|
# password:
|
|
|
|
|
# from_secret: SECRET_REGISTRY_PASSWORD
|
|
|
|
|
|
|
|
|
|
#container deployment
|
|
|
|
|
# - name: deploy-container
|
|
|
|
|
# image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
|
# environment:
|
|
|
|
@ -41,9 +74,9 @@ steps:
|
|
|
|
|
image: node:latest
|
|
|
|
|
environment:
|
|
|
|
|
SONAR_TOKEN:
|
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
|
from_secret: SONAR_TOKEN_API
|
|
|
|
|
settings:
|
|
|
|
|
sources: ./src/FLAD/
|
|
|
|
|
sources: ./src/Api/
|
|
|
|
|
commands:
|
|
|
|
|
- export SONAR_SCANNER_VERSION=4.7.0.2747
|
|
|
|
|
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
|
|
|
@ -51,5 +84,5 @@ steps:
|
|
|
|
|
- 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=FLAD -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
|
|
|
|
|
depends_on: [ app-build ]
|
|
|
|
|
- sonar-scanner -D sonar.projectKey=FLAD-API -D sonar.sources=./src/Api -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
|
|
|
|
|
depends_on: [ hadolint ]
|
|
|
|
|