2021-11-17 22:45:32 +01:00
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $REGISTRY_PASSWORD
|
|
|
|
kind: secret
|
|
|
|
name: REGISTRY_PASSWORD
|
2022-01-27 17:51:50 +01:00
|
|
|
data: Q/Y+XPpJN0vxgDWzGVIVUZJ8PE0ngvYT/1NEFG+ZfnvoFa1c+ZSkhCeMk8OE/IC12Uw2VGebBsD1iCrkffKnA5GPIS+uCmtF1K/2o4+/
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $REGISTRY_USER
|
|
|
|
kind: secret
|
|
|
|
name: REGISTRY_USER
|
2022-01-27 17:51:50 +01:00
|
|
|
data: wr3cyRh4G34wu8sbhEm96IUXZft0rDeGkkc5M/1N501H9Q==
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval "{\"auths\":{\"https://registry.weko.io\":{\"auth\":\"$(echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64)\",\"email\":\"$REGISTRY_USER\"}}}"
|
|
|
|
kind: secret
|
|
|
|
name: REGISTRY_CONFIG
|
2022-01-27 17:51:50 +01:00
|
|
|
data: lmQ25YQEai7VpYj8lUz9859JAV/aeQ9V5ulZhqVVQcni8usA9LF2IQFisekF69yu6ksp+9PBDHNKQA4GX7N/tFAlEdJySHUyr3qtrjUXRBs54E1G/GHVzY1/NwCytIT8Ro9d9H0XRiAbGnOQA2sjPFcb7CZ5kDZRmNHHHq6fplOdIM5ysYhiDIYH7TW+7dYm4ke8SBFhk4oKR7OMsAC+mo9++2dJ5W0FCro/
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $DIRECTUS_URL
|
|
|
|
kind: secret
|
|
|
|
name: DIRECTUS_URL
|
2022-01-27 17:51:50 +01:00
|
|
|
data: hYUC351igGt4WLCCbtrT1R3szBAuzdEv/n1J6onJJRQUTLZ8v4Hj/wysho0smBsASoZv/hzdZrPRy0gi
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
2022-01-27 17:51:50 +01:00
|
|
|
# drone encrypt weko/lestoitsduval $DIRECTUS_TOKEN
|
2021-11-17 22:45:32 +01:00
|
|
|
kind: secret
|
2022-01-27 17:51:50 +01:00
|
|
|
name: DIRECTUS_TOKEN
|
|
|
|
data: 1aojESEVwAY0jmHQfpWt5bGbbnMtFiv6mQMEQjC368oJZeMSFPTZL9/mTQAAqSbEHyEHV1r19Hf/k/Oq
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-01-31 08:59:01 +01:00
|
|
|
name: prod
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
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
|
2022-01-27 17:51:50 +01:00
|
|
|
DIRECTUS_TOKEN:
|
|
|
|
from_secret: DIRECTUS_TOKEN
|
2021-11-17 22:45:32 +01:00
|
|
|
commands:
|
|
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
2022-01-27 17:51:50 +01:00
|
|
|
- node scripts/directus-to-markdown/index.js
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
- 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/lestoitsduval
|
|
|
|
registry: registry.weko.io
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
|
|
|
|
image_pull_secrets:
|
|
|
|
- REGISTRY_CONFIG
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|
2022-01-31 08:59:01 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
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
|
|
|
|
environment:
|
|
|
|
DIRECTUS_URL:
|
|
|
|
from_secret: DIRECTUS_URL
|
|
|
|
DIRECTUS_TOKEN:
|
|
|
|
from_secret: DIRECTUS_TOKEN
|
|
|
|
commands:
|
|
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
|
|
|
- DRAFT=true node scripts/directus-to-markdown/index.js
|
|
|
|
|
|
|
|
- name: build website
|
|
|
|
image: jakejarvis/hugo-extended
|
|
|
|
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/lestoitsduval
|
|
|
|
registry: registry.weko.io
|
|
|
|
tags:
|
|
|
|
- staging
|
|
|
|
|
|
|
|
image_pull_secrets:
|
|
|
|
- REGISTRY_CONFIG
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|