ceiba-scores/content/.drone.yml

168 lines
4.2 KiB
YAML

---
# drone encrypt weko/sisa-urfe_fr $REGISTRY_PASSWORD
kind: secret
name: REGISTRY_PASSWORD
data: g8m2Y3gcKcCC10HLLVQDTlsxIGBeAaNqAXXjOzFId3Ib88cvCGxqkE5su7Qvo97xvoqu/09jIWXjf30vecYiqum+pQv4imYfhuzzsrag
---
# drone encrypt weko/sisa-urfe_fr $REGISTRY_USER
kind: secret
name: REGISTRY_USER
data: pe0ODYOxonYnAjd2YR3O5LN/sHjWJc31Lmvom+VfnuKrrQ==
---
# drone encrypt weko/sisa-urfe_fr "{\"auths\":{\"https://registry.weko.io\":{\"auth\":\"$(echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64)\",\"email\":\"$REGISTRY_USER\"}}}"
kind: secret
name: REGISTRY_CONFIG
data: i5xaNdkAH0n5IDgIn4OVRwViez97c62RHau8eELYJHnossMU797dow6bW77bGyMIx0ONwcOmdtDH92kpci/GeZmyPrCvODrXwt9pTAMEdVelQ3jy/mxpdtB/p5qJ6u+9CrUBw/S67ImY3yhr8o95pdpJFclkqWRsrjeg1BSHRF8RnEAQ9yBwXxoEXpSZBCnlSwG1z0cDY3JwFUH8LVQgldopiiaDAhk09dpk
---
# drone encrypt weko/sisa-urfe_fr $DIRECTUS_URL
kind: secret
name: DIRECTUS_URL
data: 3SzmP61E8oSo5PLSWnHRBUfUCa0Fe9cfc3C2ADXe7cvuY45sNXCn+YjVCL1M3yG5wJsEbEUh
---
# drone encrypt weko/sisa-urfe_fr $DIRECTUS_TOKEN
kind: secret
name: DIRECTUS_TOKEN
data: Dxlod5HBIa5S897CsQsaDPbZDqYLuIL7z4kQahf4jlWxyme79fsK7LhZVHPDRfQJf1HknAgGWJUUqhL3
# ---
# 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/sisa-urfe_fr/themes/hugo-theme-lowtech
---
kind: pipeline
type: docker
name: staging
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
- name: assets
path: /drone/src/assets/node_modules
environment:
DIRECTUS_URL:
from_secret: DIRECTUS_URL
DIRECTUS_TOKEN:
from_secret: DIRECTUS_TOKEN
commands:
- (cd themes/hugo-theme-lowtech && npm i)
- (cd assets && npm i)
- DRAFT=true node scripts/directus-to-markdown/index.js
- name: build website
image: jakejarvis/hugo-extended
environment:
HUGO_PARAMS_DIRECTUS_URL:
from_secret: DIRECTUS_URL
HUGO_PARAMS_DIRECTUS_TOKEN:
from_secret: DIRECTUS_TOKEN
volumes:
- name: assets
path: /drone/src/assets/node_modules
commands:
- hugo --minify --buildDrafts --buildFuture --environment staging
- 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:
- staging
image_pull_secrets:
- REGISTRY_CONFIG
volumes:
- name: assets
host:
path: /tmp/drone/cache/weko/sisa-urfe_fr/assets/node_modules
- name: hugo-theme-lowtech_node_modules
host:
path: /tmp/drone/cache/weko/sisa-urfe_fr/themes/hugo-theme-lowtech