feat: Ajout du déploiement sur Garage

This commit is contained in:
Simon 2022-12-02 10:18:02 +01:00
parent 96011e1646
commit 680d8c0463
3 changed files with 58 additions and 2 deletions

View File

@ -28,6 +28,30 @@ kind: secret
name: DIRECTUS_TOKEN
data: BBCI/bTmqZh9VlbVpSnT9ZI5BotPlQOpJeo8G60XILi4N910Fx4E5fSVaHlM/vnHDGr0rp/01NEHVfyU
---
# drone encrypt weko/cremeaux $AWS_ACCESS_KEY_ID
kind: secret
name: STAGING_AWS_ACCESS_KEY_ID
data: SieGQfPorTIJA3vr162NjnUZ3/RsK7YH2A3fw/UcyL3d5l+pYrlfSH6+E8JY7j1u0cxEowsU
---
# drone encrypt weko/cremeaux $AWS_SECRET_ACCESS_KEY
kind: secret
name: STAGING_AWS_SECRET_ACCESS_KEY
data: wtK0NBQL5ZovW/ElM2fHThZlF6Sxy/ZFydrwf7vj1iNjHodw2U7lIIBO5L8Cbns/+AiZJ1SQHLlRgVD8O6NvIAho8yCnhF/xm42zR+G6KpQJdZPNaUbOVKWlfEk=
---
# drone encrypt weko/cremeaux $AWS_ACCESS_KEY_ID
kind: secret
name: PRODUCTION_AWS_ACCESS_KEY_ID
data: Of3qL0gBgFRImSFgZtqxRUiwXgEveEC6YXwzwlFR2vxV3fxTX3FxGGYZZhtH/AmnOzLgB2F9
---
# drone encrypt weko/cremeaux $AWS_SECRET_ACCESS_KEY
kind: secret
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
data: fCZeV+TBazRF7UAoRpyeKGQ0xvhzzbFp5vO7NXFsWu8IgHV/uD7fA0tQQYAqjKxu1OwTDitK/4rJQl20SGNqHw9X+pHWY4h2wDbOuhQD0L2VNIsuLpZcnipBbYA=
---
kind: pipeline
type: docker
@ -58,7 +82,7 @@ steps:
- node scripts/directus-to-markdown/index.js
- name: build website
image: jakejarvis/hugo-extended
image: klakegg/hugo:0.101.0-ext-debian-ci
commands:
- hugo --minify --environment production
@ -82,6 +106,16 @@ steps:
tags:
- latest
- name: deploy
image: klakegg/hugo:0.101.0-ext-debian-ci
environment:
AWS_ACCESS_KEY_ID:
from_secret: PRODUCTION_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY
commands:
- hugo deploy --environment production
image_pull_secrets:
- REGISTRY_CONFIG
@ -120,7 +154,7 @@ steps:
- DRAFT=true node scripts/directus-to-markdown/index.js
- name: build website
image: jakejarvis/hugo-extended
image: klakegg/hugo:0.101.0-ext-debian-ci
commands:
- hugo --minify --buildDrafts --buildFuture --environment staging
@ -144,6 +178,16 @@ steps:
tags:
- staging
- name: deploy
image: klakegg/hugo:0.101.0-ext-debian-ci
environment:
AWS_ACCESS_KEY_ID:
from_secret: STAGING_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: STAGING_AWS_SECRET_ACCESS_KEY
commands:
- hugo deploy --environment staging
image_pull_secrets:
- REGISTRY_CONFIG

View File

@ -1 +1,7 @@
baseURL: https://cremeaux.fr/
deployment:
targets:
- name: staging
URL: >-
s3://cremeaux.fr?endpoint=http://10.20.20.25:3900&disableSSL=true&s3ForcePathStyle=true&region=garage

View File

@ -1 +1,7 @@
baseURL: https://staging.cremeaux.fr/
deployment:
targets:
- name: staging
URL: >-
s3://staging.cremeaux.fr?endpoint=http://10.20.20.25:3900&disableSSL=true&s3ForcePathStyle=true&region=garage