154 lines
3.8 KiB
YAML
154 lines
3.8 KiB
YAML
|
---
|
||
|
# drone encrypt weko/cremeaux $REGISTRY_PASSWORD
|
||
|
kind: secret
|
||
|
name: REGISTRY_PASSWORD
|
||
|
data: LBA/OxVYdvjpnkkt4xIf5qtGyr4ih3bPlp8M+ApLDuCDwzXsbzhjzNWoN46gynvrK4arcrDERtjTZmsK/m2WJyBhsQH4lPnIYHauZG/K
|
||
|
|
||
|
---
|
||
|
# drone encrypt weko/cremeaux $REGISTRY_USER
|
||
|
kind: secret
|
||
|
name: REGISTRY_USER
|
||
|
data: Pbz4Z6a319mG7QOUsPuAV79rlEkrMvNB4Ce+ePAGsdDKuQ==
|
||
|
|
||
|
---
|
||
|
# drone encrypt weko/cremeaux "{\"auths\":{\"https://registry.weko.io\":{\"auth\":\"$(echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64)\",\"email\":\"$REGISTRY_USER\"}}}"
|
||
|
kind: secret
|
||
|
name: REGISTRY_CONFIG
|
||
|
data: bfQfncKvtcLiePl+YODLHN5LyQ5mB3eWj2dVqbyDd78gv1E+jzhb/4W/B3u1bMyMPlw1Q2/XIWBF5D9kVcTHjh/x2fo7LpYPmk5JZeXEP9qsRk+Td/JEmCm9Bbp+uUEigs2jZFAebAfGseP9rS7KyYEmEkO/JcXVjFZAWgmjvnuZBi8jApUJEorqo+e6lhclceljCSITIC6jA/bwggeqtVxoNVf2r8BBLIL3
|
||
|
|
||
|
---
|
||
|
# drone encrypt weko/cremeaux $DIRECTUS_URL
|
||
|
kind: secret
|
||
|
name: DIRECTUS_URL
|
||
|
data: ES7uXGzaLMrydnCpt7+IC2m2mCUbtrKN66hQzVuwJH/aSZFtRWlugAWSQEfdAGyuhgYuJCPouQ==
|
||
|
|
||
|
---
|
||
|
# drone encrypt weko/cremeaux $DIRECTUS_TOKEN
|
||
|
kind: secret
|
||
|
name: DIRECTUS_TOKEN
|
||
|
data: BBCI/bTmqZh9VlbVpSnT9ZI5BotPlQOpJeo8G60XILi4N910Fx4E5fSVaHlM/vnHDGr0rp/01NEHVfyU
|
||
|
|
||
|
---
|
||
|
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/cremeaux
|
||
|
registry: registry.weko.io
|
||
|
tags:
|
||
|
- latest
|
||
|
|
||
|
image_pull_secrets:
|
||
|
- REGISTRY_CONFIG
|
||
|
|
||
|
# volumes:
|
||
|
# - name: hugo-theme-lowtech_node_modules
|
||
|
# host:
|
||
|
# path: /tmp/drone/cache/weko/cremeaux/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
|
||
|
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/cremeaux
|
||
|
registry: registry.weko.io
|
||
|
tags:
|
||
|
- staging
|
||
|
|
||
|
image_pull_secrets:
|
||
|
- REGISTRY_CONFIG
|
||
|
|
||
|
# volumes:
|
||
|
# - name: hugo-theme-lowtech_node_modules
|
||
|
# host:
|
||
|
# path: /tmp/drone/cache/weko/cremeaux/themes/hugo-theme-lowtech
|