feat: Ajout de la prod

This commit is contained in:
Simon 2022-04-05 15:46:38 +02:00
parent 22a69b6162
commit 917115d851
1 changed files with 40 additions and 61 deletions

View File

@ -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