From 2b8278576359cec465b697b4776d9c2b31eb9fc3 Mon Sep 17 00:00:00 2001 From: Lucas DELANIER Date: Tue, 7 May 2024 19:41:35 +0200 Subject: [PATCH] =?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 | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 30f49e5..5f35910 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,45 @@ kind: pipeline -name: default type: docker +name: Portfolio + +trigger: + event: + - push steps: - - name: build - image: node:22-alpine + - name: app-build + image: node:latest + commands: + - cd ./src + - npm install + - npm run build + + - name: docker-build-and-push + image: plugins/docker + settings: + dockerfile: src/Dockerfile + context: . + registry: hub.codefirst.iut.uca.fr + repo: hub.codefirst.iut.uca.fr/lucas.delanier/portfolio + username: + from_secret: SECRET_REGISTRY_USERNAME + password: + from_secret: SECRET_REGISTRY_PASSWORD + depends_on: [ app-build ] + + - name: deploy-container + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: hub.codefirst.iut.uca.fr/lucas.delanier/portfolio:latest + CONTAINERNAME: portfolio + COMMAND: create + OVERWRITE: true + depends_on: [ docker-build-and-push ] + - name: code-analysis + image: sonarsource/sonar-scanner-cli + environment: + SONAR_TOKEN: + from_secret: SECRET_SONAR_LOGIN commands: - - yarn install - - yarn build \ No newline at end of file + - sonar-scanner -Dsonar.projectKey=portfolio-website -Dsonar.sources=. -Dsonar.host.url=https://codefirst.iut.uca.fr/sonar -Dsonar.login=$${SONAR_TOKEN} + depends_on: [ studentbrosjs-build ] \ No newline at end of file