Use commit hash as image tag
This commit is contained in:
parent
eaef2d67e2
commit
0bfd66b78d
14
.drone.yml
14
.drone.yml
@ -7,8 +7,6 @@ type: kubernetes
|
|||||||
name: Build badhouseplants.net
|
name: Build badhouseplants.net
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
@ -29,16 +27,6 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Get static content
|
|
||||||
image: rclone/rclone:latest
|
|
||||||
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
|
- name: Build and push the docker image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
@ -47,7 +35,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: GITEA_TOKEN
|
from_secret: GITEA_TOKEN
|
||||||
repo: git.badhouseplants.net/allanger/badhouseplants-net
|
repo: git.badhouseplants.net/allanger/badhouseplants-net
|
||||||
tags: latest
|
tags: ${DRONE_COMMIT_SHA}
|
||||||
depends_on:
|
depends_on:
|
||||||
- Init git submodules with themes
|
- Init git submodules with themes
|
||||||
- Get static content
|
- Get static content
|
||||||
|
30
kube/applicationset.yaml
Normal file
30
kube/applicationset.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ApplicationSet
|
||||||
|
metadata:
|
||||||
|
name: badhouseplants-net
|
||||||
|
namespace: argo-system
|
||||||
|
spec:
|
||||||
|
generators:
|
||||||
|
- list:
|
||||||
|
elements:
|
||||||
|
- name: dynamic-charts
|
||||||
|
app: badhouseplants
|
||||||
|
branch: dynamic-charts
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: "{{ app }}-{{ name }}"
|
||||||
|
namespace: argo-system
|
||||||
|
spec:
|
||||||
|
project: "default"
|
||||||
|
source:
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- values.yaml
|
||||||
|
values: |-
|
||||||
|
{{ values }}
|
||||||
|
repoURL: https://git.badhouseplants.net/api/packages/allanger/helm
|
||||||
|
targetRevision: "{{ chart.version }}"
|
||||||
|
chart: badhouseplants-net
|
||||||
|
destination:
|
||||||
|
server: "{{ argo.cluster }}"
|
||||||
|
namespace: "{{ app }}-{{ name }}"
|
Reference in New Issue
Block a user