remove pipeline

This commit is contained in:
Aaron Riedel 2024-10-10 21:31:56 +02:00
parent 114b6560eb
commit a8b31c4c23
Signed by: aaron
GPG key ID: 643004654D40D577
6 changed files with 3 additions and 233 deletions

View file

@ -1,88 +0,0 @@
kind: pipeline
name: deploy
steps:
- name: kustomize build hoylogo (prod + staging)
image: git.ar21.de/aaron/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/aaron/k8s-deployments.git .
- cd /deployment-repo/hoylogo/overlays/prod
- kustomize build -o /deployment-repo/hoylogo/prod/hoylogo.yaml
- cd /deployment-repo/hoylogo/overlays/staging
- kustomize build -o /deployment-repo/hoylogo/staging/hoylogo.yaml
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
- name: kustomize build hoylogo (staging)
image: git.ar21.de/aaron/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/aaron/k8s-deployments.git .
- cd /staging-repo
- git clone -b $DRONE_BRANCH https://git.ar21.de/aaron/k8s-deployments.git .
- cd /staging-repo/hoylogo/overlays/staging
- kustomize build -o /deployment-repo/hoylogo/staging/hoylogo.yaml
volumes:
- name: deployment-repo
path: /deployment-repo
- name: staging-repo
path: /staging-repo
when:
branch:
exclude:
- main
event:
- push
- name: kustomize push hoylogo changes (prod + staging)
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/aaron/k8s-deployments.git
path: /deployment-repo
force: false
commit: true
commit_message: "KUSTOMIZE BUILD: rebuild hoylogo deployment with kustomize ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline) [CI SKIP]"
ssh_key:
from_secret: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
- name: kustomize push hoylogo changes (staging)
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/aaron/k8s-deployments.git
path: /deployment-repo
force: false
commit: true
commit_message: "KUSTOMIZE BUILD STAGING: rebuild hoylogo deployment with kustomize ${DRONE_BUILD_NUMBER} [CI SKIP]"
ssh_key:
from_secret: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
exclude:
- main
event:
- push
volumes:
- name: deployment-repo
temp: {}
- name: staging-repo
temp: {}
when:
event:
exclude:
- pull_request

View file

@ -79,7 +79,7 @@ spec:
source: source:
repoURL: https://git.ar21.de/aaron/k8s-deployments.git repoURL: https://git.ar21.de/aaron/k8s-deployments.git
targetRevision: HEAD targetRevision: HEAD
path: hoylogo/prod path: hoylogo/overlays/prod
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: hoylogo namespace: hoylogo
@ -99,7 +99,7 @@ spec:
source: source:
repoURL: https://git.ar21.de/aaron/k8s-deployments.git repoURL: https://git.ar21.de/aaron/k8s-deployments.git
targetRevision: HEAD targetRevision: HEAD
path: hoylogo/staging path: hoylogo/overlays/staging
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: hoylogo-staging namespace: hoylogo-staging
@ -127,4 +127,4 @@ spec:
syncOptions: syncOptions:
- CreateNamespace=true - CreateNamespace=true
automated: automated:
prune: true prune: true

View file

View file

@ -1,71 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: hoylogo
---
apiVersion: v1
kind: Service
metadata:
name: hoylogo-service
namespace: hoylogo
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: hoylogo
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hoylogo
name: hoylogo-deployment
namespace: hoylogo
spec:
replicas: 3
selector:
matchLabels:
app: hoylogo
template:
metadata:
labels:
app: hoylogo
spec:
containers:
- image: git.ar21.de/aaron/hoylogo:27
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 4
periodSeconds: 3
name: hoylogo
ports:
- containerPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/tls-acme: "true"
name: hoylogo-ingress
namespace: hoylogo
spec:
rules:
- host: hoylogo-prod.apps.yolokube.de
http:
paths:
- backend:
service:
name: hoylogo-service
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- hoylogo-prod.apps.yolokube.de
secretName: hoylogo-tls-key

View file

@ -1,71 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: hoylogo-staging
---
apiVersion: v1
kind: Service
metadata:
name: hoylogo-service
namespace: hoylogo-staging
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: hoylogo
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hoylogo
name: hoylogo-deployment
namespace: hoylogo-staging
spec:
replicas: 1
selector:
matchLabels:
app: hoylogo
template:
metadata:
labels:
app: hoylogo
spec:
containers:
- image: git.ar21.de/aaron/hoylogo:staging-28
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 4
periodSeconds: 3
name: hoylogo
ports:
- containerPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/tls-acme: "true"
name: hoylogo-ingress
namespace: hoylogo-staging
spec:
rules:
- host: staging.hoylogo.de
http:
paths:
- backend:
service:
name: hoylogo-service
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- staging.hoylogo.de
secretName: hoylogo-tls-key