Init Commit
Start following the GitFLow
This commit is contained in:
84
.drone.yml
Normal file
84
.drone.yml
Normal file
@ -0,0 +1,84 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Build badhouseplants.net
|
||||
|
||||
steps:
|
||||
- name: Publish the Helm chart
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
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 allanger-charts https://git.badhouseplants.net/api/packages/allanger/helm
|
||||
- helm cm-push "./chart-package/$(ls chart-package)" allanger-charts
|
||||
|
||||
- name: Init git submodules
|
||||
image: alpine/git
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
|
||||
- name: Get static content
|
||||
image: rclone/rclone:latest
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
environment:
|
||||
RCLONE_CONFIG_CONTENT:
|
||||
from_secret: RCLONE_CONFIG_CONTENT
|
||||
RCLONE_CONFIG: /tmp/rclone.conf
|
||||
commands:
|
||||
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
||||
- rclone copy -P badhouseplants-public:/badhouseplants-static static
|
||||
|
||||
- name: Build and push the docker image
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.badhouseplants.net
|
||||
username: allanger
|
||||
password:
|
||||
from_secret: GITEA_TOKEN
|
||||
repo: git.badhouseplants.net/allanger/badhouseplants-net
|
||||
tags: latest
|
||||
depends_on:
|
||||
- Init git submodules
|
||||
- Get static content
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: CV Builder
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
steps:
|
||||
- name: Build the CV
|
||||
image: ghcr.io/puppeteer/puppeteer
|
||||
commands:
|
||||
- cp -R ./content/cv/* $HOME
|
||||
- cd $HOME
|
||||
- npm install md-to-pdf
|
||||
- npx md-to-pdf index.md
|
||||
- mkdir $DRONE_WORKSPACE/cv
|
||||
- mv index.pdf $DRONE_WORKSPACE/cv/n.rodionov.pdf
|
||||
|
||||
- name: Upload the CV
|
||||
image: rclone/rclone:latest
|
||||
environment:
|
||||
RCLONE_CONFIG_CONTENT:
|
||||
from_secret: RCLONE_CONFIG_CONTENT_PRIVATE
|
||||
RCLONE_CONFIG: /tmp/rclone.conf
|
||||
commands:
|
||||
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
|
||||
- rclone copy -P $DRONE_WORKSPACE/cv badhouseplants-minio:/public-download
|
Reference in New Issue
Block a user