137 lines
3.6 KiB
YAML
137 lines
3.6 KiB
YAML
---
|
|
# ----------------------------------------------
|
|
# -- Update the helm chart
|
|
# ----------------------------------------------
|
|
kind: pipeline
|
|
type: docker
|
|
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
|
|
---
|
|
# ----------------------------------------------
|
|
# -- Build the site and push it to the registry
|
|
# ----------------------------------------------
|
|
kind: pipeline
|
|
type: docker
|
|
name: Build badhouseplants.net
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
clone:
|
|
disable: true
|
|
|
|
steps:
|
|
- name: clone
|
|
image: alpine/git
|
|
environment:
|
|
GIT_LFS_SKIP_SMUDGE: 1
|
|
commands:
|
|
- git clone $DRONE_REMOTE_URL .
|
|
- git checkout $DRONE_BRANCH
|
|
- git submodule update --init --recursive
|
|
|
|
- name: Test a build
|
|
image: git.badhouseplants.net/badhouseplants/hugo-builder
|
|
depends_on:
|
|
- clone
|
|
commands:
|
|
- hugo -s ./src
|
|
|
|
- name: Build and push the docker image
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:80ffd53372652576fa3c36a56b351b448a025c6a
|
|
privileged: true
|
|
depends_on:
|
|
- Test a build
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: GITEA_TOKEN
|
|
commands:
|
|
- ./scripts/build-container.pl
|
|
|
|
- name: Sync pictures from lfs to Minio
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:80ffd53372652576fa3c36a56b351b448a025c6a
|
|
depends_on:
|
|
- Test a build
|
|
environment:
|
|
RCLONE_CONFIG_CONTENT:
|
|
from_secret: RCLONE_CONFIG_CONTENT_PRIVATE
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
commands:
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
|
- ./scripts/upload-media.pl
|
|
|
|
- name: Deploy the application
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:80ffd53372652576fa3c36a56b351b448a025c6a
|
|
depends_on:
|
|
- Build and push the docker image
|
|
- Sync pictures from lfs to Minio
|
|
environment:
|
|
ARGOCD_SERVER:
|
|
from_secret: ARGOCD_SERVER
|
|
ARGOCD_AUTH_TOKEN:
|
|
from_secret: ARGOCD_AUTH_TOKEN
|
|
ARGO_GITHUB_OAUTH_KEY:
|
|
from_secret: GITHUB_OAUTH_KEY
|
|
ARGO_GOOGLE_OAUTH_KEY:
|
|
from_secret: GOOGLE_OAUTH_KEY
|
|
commands:
|
|
- ./scripts/deploy-app.pl
|
|
|
|
- name: Cleanup everything
|
|
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:80ffd53372652576fa3c36a56b351b448a025c6a
|
|
depends_on:
|
|
- Deploy the application
|
|
environment:
|
|
RCLONE_CONFIG_CONTENT:
|
|
from_secret: RCLONE_CONFIG_CONTENT_PRIVATE
|
|
RCLONE_CONFIG: /tmp/rclone.conf
|
|
GITEA_TOKEN:
|
|
from_secret: GITEA_TOKEN
|
|
ARGOCD_SERVER:
|
|
from_secret: ARGOCD_SERVER
|
|
ARGOCD_AUTH_TOKEN:
|
|
from_secret: ARGOCD_AUTH_TOKEN
|
|
commands:
|
|
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
|
- ./scripts/cleanup.pl
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
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
|
|
commands:
|
|
- npm i markdown-spellcheck -g
|
|
- mdspell "src/content/**/*.md" -n -r
|