From 917115d85165e745881b431a6d98b3e0b8f0ada5 Mon Sep 17 00:00:00 2001 From: Simon C Date: Tue, 5 Apr 2022 15:46:38 +0200 Subject: [PATCH] feat: Ajout de la prod --- .drone.yml | 101 +++++++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 61 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1f42fed..e6c1148 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,67 +28,46 @@ kind: secret name: DIRECTUS_TOKEN data: C4N8jh2kDORa5vo2mqOcqbBLLBXdcnHNDq9sK6+R9gzemeyzLp3K7ENw5ZibVYAJ2VEYylQr9zvHFeFE -# --- -# kind: pipeline -# type: docker -# name: prod -# -# platform: -# os: linux -# arch: arm64 -# -# steps: -# - name: install submodule -# image: drone/git -# commands: -# - git submodule update --init -# -# - name: install npm -# image: node:current-alpine -# volumes: -# - name: hugo-theme-lowtech_node_modules -# path: /drone/src/themes/hugo-theme-lowtech/node_modules -# # environment: -# # DIRECTUS_URL: -# # from_secret: DIRECTUS_URL -# # DIRECTUS_TOKEN: -# # from_secret: DIRECTUS_TOKEN -# commands: -# - (cd themes/hugo-theme-lowtech && npm i) -# # - node scripts/directus-to-markdown/index.js -# -# - name: build website -# image: jakejarvis/hugo-extended -# commands: -# - hugo --minify --environment production -# -# - name: typo -# image: node:current-alpine -# volumes: -# - name: hugo-theme-lowtech_node_modules -# path: /drone/src/themes/hugo-theme-lowtech/node_modules -# commands: -# - node themes/hugo-theme-lowtech/scripts/typo -# -# - name: push docker image on registry -# image: plugins/docker -# settings: -# username: -# from_secret: REGISTRY_USER -# password: -# from_secret: REGISTRY_PASSWORD -# repo: registry.weko.io/sisa-urfe_fr -# registry: registry.weko.io -# tags: -# - latest -# -# image_pull_secrets: -# - REGISTRY_CONFIG -# -# volumes: -# - name: hugo-theme-lowtech_node_modules -# host: -# path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/themes/hugo-theme-lowtech +--- +kind: pipeline +type: docker +name: prod + +platform: + os: linux + arch: arm64 + +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 + +- name: push docker image on registry + image: plugins/docker + settings: + username: + from_secret: REGISTRY_USER + password: + from_secret: REGISTRY_PASSWORD + repo: registry.weko.io/scores_ceiba + registry: registry.weko.io + tags: + - latest + +image_pull_secrets: +- REGISTRY_CONFIG + +volumes: +- name: node_modules + host: + path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules --- kind: pipeline