From 42ca152553f9943b6cc5c9dcc3fd15b14826db03 Mon Sep 17 00:00:00 2001 From: Emre KARTAL Date: Sun, 24 Sep 2023 17:38:29 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d83bf82..fe7fc40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -51,5 +51,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 + - 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 ] \ No newline at end of file From 20c5957094ede7d33e65910987657ac44721351c Mon Sep 17 00:00:00 2001 From: Emre KARTAL Date: Sun, 24 Sep 2023 20:59:15 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index fe7fc40..0cbd83e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ kind: pipeline type: docker -name: FLAD +name: FLAD-CLI trigger: event: @@ -13,7 +13,40 @@ steps: - cd ./src/FLAD/ - 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 + + - name: hadolint + image: hadolint/hadolint:latest-alpine + commands: + - cd src/Api +# - hadolint Dockerfile + # - name: docker-build-and-push # image: plugins/docker # settings: @@ -26,7 +59,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 +73,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 +83,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=./src/FLAD -D sonar.host.url=https://codefirst.iut.uca.fr/sonar - depends_on: [ app-build ] \ No newline at end of file + - sonar-scanner -D sonar.projectKey=FLAD-API -D sonar.sources=./src/Api -D sonar.host.url=https://codefirst.iut.uca.fr/sonar + depends_on: [ app-build ] From 232feb72c603155b2114d8ee1b8ba496c399b61f Mon Sep 17 00:00:00 2001 From: Emre KARTAL Date: Sun, 24 Sep 2023 21:01:15 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0cbd83e..fdeab8d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,7 +31,7 @@ steps: - 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 @@ -41,6 +41,7 @@ trigger: event: - push +steps: - name: hadolint image: hadolint/hadolint:latest-alpine commands: From 6e42a3f39ad189321951b008e9848718534b945e Mon Sep 17 00:00:00 2001 From: Emre KARTAL Date: Sun, 24 Sep 2023 21:04:03 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fdeab8d..fda5f78 100644 --- a/.drone.yml +++ b/.drone.yml @@ -85,4 +85,4 @@ steps: - export PATH=$SONAR_SCANNER_HOME/bin:$PATH - export SONAR_SCANNER_OPTS="-server" - sonar-scanner -D sonar.projectKey=FLAD-API -D sonar.sources=./src/Api -D sonar.host.url=https://codefirst.iut.uca.fr/sonar - depends_on: [ app-build ] + depends_on: [ hadolint ]