2023-02-17 14:48:16 +00:00
|
|
|
# ----------------------------------------------
|
2023-03-06 20:42:35 +00:00
|
|
|
# -- Update the helm chart
|
|
|
|
# ----------------------------------------------
|
|
|
|
kind: pipeline
|
2023-05-21 09:52:24 +00:00
|
|
|
type: docker
|
2023-03-06 20:42:35 +00:00
|
|
|
name: Publish the helm chart
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
steps:
|
|
|
|
- name: Publish the Helm chart
|
|
|
|
image: alpine/helm
|
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: GITEA_TOKEN
|
|
|
|
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
|
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
2023-02-17 14:48:16 +00:00
|
|
|
# -- Build the site and push it to the registry
|
|
|
|
# ----------------------------------------------
|
2023-02-17 14:19:49 +00:00
|
|
|
kind: pipeline
|
2023-05-21 09:52:24 +00:00
|
|
|
type: docker
|
2023-02-17 14:19:49 +00:00
|
|
|
name: Build badhouseplants.net
|
2023-02-17 14:48:16 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
2023-03-06 20:42:35 +00:00
|
|
|
- push
|
2023-04-24 16:01:13 +00:00
|
|
|
clone:
|
|
|
|
disable: true
|
2023-02-17 14:19:49 +00:00
|
|
|
steps:
|
2023-04-24 16:01:13 +00:00
|
|
|
- name: clone
|
2023-03-06 20:42:35 +00:00
|
|
|
image: alpine/git
|
2023-04-24 16:01:13 +00:00
|
|
|
environment:
|
|
|
|
GIT_LFS_SKIP_SMUDGE: 1
|
2023-03-06 20:42:35 +00:00
|
|
|
commands:
|
2023-05-10 15:08:45 +00:00
|
|
|
- git clone $DRONE_REMOTE_URL .
|
2023-04-26 05:17:19 +00:00
|
|
|
- git checkout $DRONE_BRANCH
|
2023-05-10 15:08:45 +00:00
|
|
|
- git submodule update --init --recursive
|
2023-03-06 20:42:35 +00:00
|
|
|
- name: Test a build
|
2023-09-29 08:10:32 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/hugo-container
|
2023-05-02 12:47:34 +00:00
|
|
|
depends_on:
|
2023-04-24 16:01:13 +00:00
|
|
|
- clone
|
2023-03-06 20:42:35 +00:00
|
|
|
commands:
|
2023-05-08 12:48:02 +00:00
|
|
|
- hugo -s ./src
|
2023-03-06 20:42:35 +00:00
|
|
|
- name: Build and push the docker image
|
2023-08-07 08:09:40 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3
|
2023-04-24 16:01:13 +00:00
|
|
|
privileged: true
|
2023-05-02 12:47:34 +00:00
|
|
|
depends_on:
|
2023-04-24 16:01:13 +00:00
|
|
|
- Test a build
|
|
|
|
environment:
|
2023-08-14 08:47:52 +00:00
|
|
|
BUILDER_COMMIT: 2449b73b13a62ae916c6703778d096e5290157b3
|
2023-04-24 16:01:13 +00:00
|
|
|
GITEA_TOKEN:
|
2023-03-06 20:42:35 +00:00
|
|
|
from_secret: GITEA_TOKEN
|
|
|
|
commands:
|
2023-04-24 16:01:13 +00:00
|
|
|
- ./scripts/build-container.pl
|
2023-03-06 20:42:35 +00:00
|
|
|
- name: Sync pictures from lfs to Minio
|
2023-08-07 08:09:40 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3
|
2023-05-02 12:47:34 +00:00
|
|
|
depends_on:
|
2023-04-24 16:01:13 +00:00
|
|
|
- Test a build
|
2023-03-06 20:42:35 +00:00
|
|
|
environment:
|
|
|
|
RCLONE_CONFIG_CONTENT:
|
|
|
|
from_secret: RCLONE_CONFIG_CONTENT_PRIVATE
|
|
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
|
|
commands:
|
|
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
2023-03-29 16:13:55 +00:00
|
|
|
- ./scripts/upload-media.pl
|
2023-05-15 09:25:55 +00:00
|
|
|
- name: Deploy the application
|
2023-08-07 08:09:40 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3
|
2023-04-24 16:01:13 +00:00
|
|
|
depends_on:
|
|
|
|
- Build and push the docker image
|
|
|
|
- Sync pictures from lfs to Minio
|
2023-03-06 20:42:35 +00:00
|
|
|
environment:
|
|
|
|
ARGOCD_SERVER:
|
|
|
|
from_secret: ARGOCD_SERVER
|
|
|
|
ARGOCD_AUTH_TOKEN:
|
|
|
|
from_secret: ARGOCD_AUTH_TOKEN
|
2023-05-15 09:25:55 +00:00
|
|
|
ARGO_GITHUB_OAUTH_KEY:
|
|
|
|
from_secret: GITHUB_OAUTH_KEY
|
|
|
|
ARGO_GOOGLE_OAUTH_KEY:
|
|
|
|
from_secret: GOOGLE_OAUTH_KEY
|
2023-03-06 20:42:35 +00:00
|
|
|
commands:
|
2023-05-15 09:25:55 +00:00
|
|
|
- ./scripts/deploy-app.pl
|
2023-03-06 20:42:35 +00:00
|
|
|
- name: Cleanup everything
|
2023-08-07 08:09:40 +00:00
|
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3
|
2023-04-24 16:01:13 +00:00
|
|
|
depends_on:
|
2023-05-15 09:25:55 +00:00
|
|
|
- Deploy the application
|
2023-03-06 20:42:35 +00:00
|
|
|
environment:
|
|
|
|
RCLONE_CONFIG_CONTENT:
|
|
|
|
from_secret: RCLONE_CONFIG_CONTENT_PRIVATE
|
|
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: GITEA_TOKEN
|
2023-04-24 15:57:11 +00:00
|
|
|
ARGOCD_SERVER:
|
|
|
|
from_secret: ARGOCD_SERVER
|
|
|
|
ARGOCD_AUTH_TOKEN:
|
|
|
|
from_secret: ARGOCD_AUTH_TOKEN
|
2023-03-06 20:42:35 +00:00
|
|
|
commands:
|
|
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
|
|
|
- ./scripts/cleanup.pl
|
2023-05-02 12:47:34 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2023-05-21 09:52:24 +00:00
|
|
|
type: docker
|
2023-05-02 12:47:34 +00:00
|
|
|
name: Spell-Checker
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
image: alpine/git
|
|
|
|
environment:
|
|
|
|
GIT_LFS_SKIP_SMUDGE: 1
|
|
|
|
commands:
|
|
|
|
- git clone $DRONE_REMOTE_URL --recurse-submodules .
|
|
|
|
- git checkout $DRONE_BRANCH
|
|
|
|
- name: Spell-Checker
|
|
|
|
image: node
|
2023-08-14 08:47:52 +00:00
|
|
|
commands:
|
2023-05-02 12:47:34 +00:00
|
|
|
- npm i markdown-spellcheck -g
|
2023-08-14 08:47:52 +00:00
|
|
|
- mdspell "src/content/**/*.md" -n -r
|