From 2960b936b1165d314d09d132190c3b2a933a6e37 Mon Sep 17 00:00:00 2001 From: Simon C Date: Thu, 19 Oct 2023 15:55:56 +0200 Subject: [PATCH] feat Ajout du build automatique de staging --- .drone.yml | 82 +++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/.drone.yml b/.drone.yml index 43df5b2..688f0aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -78,48 +78,48 @@ volumes: host: path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules -# --- -# kind: pipeline -# type: docker -# name: staging +--- +kind: pipeline +type: docker +name: staging -# steps: -# - name: install npm -# image: node:current-alpine -# volumes: -# - name: node_modules -# path: /drone/src/node_modules -# commands: -# - npm i -# - npm run fetchData -# - npm run lint -# - npm run build -# environment: -# NODE_ENV: 'staging' +steps: +- name: install npm + image: node:current-alpine + volumes: + - name: node_modules + path: /drone/src/node_modules + commands: + - npm i + - npm run fetchData + - npm run lint + - npm run build + environment: + NODE_ENV: 'staging' -# - name: deploy on s3 -# image: minio/mc -# environment: -# AWS_ACCESS_KEY_ID: -# from_secret: STAGING_AWS_ACCESS_KEY_ID -# AWS_SECRET_ACCESS_KEY: -# from_secret: STAGING_AWS_SECRET_ACCESS_KEY -# commands: -# - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 -# - mc mirror --overwrite /drone/src/dist garage/staging.scores.ceiba-conseil.com +- name: deploy on s3 + image: minio/mc + environment: + AWS_ACCESS_KEY_ID: + from_secret: STAGING_AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY: + from_secret: STAGING_AWS_SECRET_ACCESS_KEY + commands: + - mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 + - mc mirror --overwrite /drone/src/dist garage/staging.scores.ceiba-conseil.com -# - name: notify -# image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f -# settings: -# homeserver: https://converser.eu -# roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" -# userid: "resilien:converser.eu" -# accesstoken: -# from_secret: MATRIX_ACCESSTOKEN -# when: -# status: [ failure ] +- name: notify + image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f + settings: + homeserver: https://converser.eu + roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" + userid: "resilien:converser.eu" + accesstoken: + from_secret: MATRIX_ACCESSTOKEN + when: + status: [ failure ] -# volumes: -# - name: node_modules -# host: -# path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules +volumes: +- name: node_modules + host: + path: /tmp/drone/cache/weko/staging.scores.ceiba-conseil.com/node_modules