2024-05-27 07:34:42 +00:00
|
|
|
---
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- image: alpine/helm
|
|
|
|
name: Publish the Helm chart
|
|
|
|
commands:
|
|
|
|
- helm plugin install https://github.com/chartmuseum/helm-push
|
|
|
|
- helm package chart -d chart-package
|
|
|
|
- helm repo add --username allanger --password $GITEA_TOKEN badhouseplants-net https://git.badhouseplants.net/api/packages/badhouseplants/helm
|
|
|
|
- helm cm-push "./chart-package/$(ls chart-package)" badhouseplants-net
|
|
|
|
secrets:
|
|
|
|
- gitea_token
|
|
|
|
|
|
|
|
- name: Test a build
|
|
|
|
image: git.badhouseplants.net/badhouseplants/hugo-container
|
|
|
|
commands:
|
|
|
|
- hugo -s ./src
|
|
|
|
|
|
|
|
- name: Build and push the docker image
|
2024-07-11 10:32:44 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7
|
2024-05-27 07:34:42 +00:00
|
|
|
privileged: true
|
|
|
|
depends_on:
|
|
|
|
- Test a build
|
|
|
|
secrets:
|
|
|
|
- gitea_token
|
|
|
|
environment:
|
|
|
|
BUILDER_COMMIT: 2449b73b13a62ae916c6703778d096e5290157b3
|
|
|
|
commands:
|
|
|
|
- rm -rf $DRONE_WORKSPACE/src/assets/
|
|
|
|
- ./scripts/build-container.pl
|
|
|
|
backend_options:
|
|
|
|
kubernetes:
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: 500Mi
|
|
|
|
cpu: 200m
|
|
|
|
limits:
|
|
|
|
memory: 1000Mi
|
|
|
|
cpu: 1000m
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
- name: Sync pictures from lfs to Minio
|
2024-07-11 10:32:44 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7
|
2024-05-27 07:34:42 +00:00
|
|
|
depends_on:
|
|
|
|
- Test a build
|
|
|
|
secrets:
|
|
|
|
- rclone_config_content
|
|
|
|
environment:
|
|
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
|
|
commands:
|
|
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
|
|
|
- ./scripts/upload-media.pl
|
|
|
|
|
|
|
|
- name: Deploy the application
|
2024-07-11 10:32:44 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7
|
2024-05-27 07:34:42 +00:00
|
|
|
depends_on:
|
|
|
|
- Build and push the docker image
|
|
|
|
- Sync pictures from lfs to Minio
|
|
|
|
secrets:
|
|
|
|
- gitea_token
|
|
|
|
- argocd_auth_token
|
|
|
|
- argo_github_oauth_key
|
|
|
|
- argo_google_oauth_key
|
|
|
|
environment:
|
|
|
|
ARGOCD_SERVER: argo.badhouseplants.net:443
|
|
|
|
commands:
|
|
|
|
- ./scripts/deploy-app.pl
|
|
|
|
|
|
|
|
- name: Cleanup everything
|
2024-07-11 10:32:44 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7
|
2024-05-27 07:34:42 +00:00
|
|
|
depends_on:
|
|
|
|
- Deploy the application
|
|
|
|
secrets:
|
|
|
|
- gitea_token
|
|
|
|
- argocd_auth_token
|
|
|
|
- rclone_config_content
|
|
|
|
environment:
|
|
|
|
ARGOCD_SERVER: argo.badhouseplants.net:443
|
|
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
|
|
commands:
|
|
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
|
|
|
- ./scripts/cleanup.pl
|
|
|
|
|
|
|
|
- name: Spell-Checker
|
|
|
|
failure: ignore
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm i markdown-spellcheck -g
|
|
|
|
- mdspell "src/content/**/*.md" -n -r
|