Adding CI and values for Halloween static site
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
77
.drone.yml
77
.drone.yml
@@ -2,7 +2,6 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
service_account_name: dronesome-app
|
||||
|
||||
steps:
|
||||
- name: lint
|
||||
@@ -11,56 +10,32 @@ steps:
|
||||
- pip3 install yamllint==1.29.0
|
||||
- yamllint .
|
||||
|
||||
# yamllint disable rule:line-length
|
||||
# - name: deploy
|
||||
# image: alpine/k8s:1.31.2
|
||||
# environment:
|
||||
# CACRT:
|
||||
# from_secret: clusterprism_some-app_kubernetes_ca_cert
|
||||
# TOKEN:
|
||||
# from_secret: clusterprism_some-app_kubernetes_token
|
||||
# # yamllint disable rule:line-length
|
||||
# commands:
|
||||
# - kubectl config set-cluster clusterprism --server=https://192.168.1.201:6443
|
||||
# - kubectl config set-credentials drone-some-app --token=$TOKEN
|
||||
# - kubectl config set-context clusterprism --user=drone-some-app --cluster=clusterprism
|
||||
# - kubectl config use-context clusterprism
|
||||
# - echo $CACRT > cacert.pem
|
||||
# - kubectl config set-context clusterprism --certificate-authority=cacert.pem
|
||||
# - kubectl config set clusters.clusterprism.insecure-skip-tls-verify true
|
||||
# - helm repo add bjw-s https://bjw-s.github.io/helm-charts
|
||||
# - helm upgrade some-app --install bjw-s/app-template -n localassist -f clusterprism_some-app_values.yaml --version 3.6.1
|
||||
# # yamllint enable rule:line-length
|
||||
# when:
|
||||
# branch:
|
||||
# - main
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
|
||||
# yamllint disable rule:line-length
|
||||
# - name: rawkubectl
|
||||
# image: alpine/k8s:1.31.2
|
||||
# environment:
|
||||
# CACRT:
|
||||
# from_secret: clusterprism_some-app_ca_cert
|
||||
# TOKEN:
|
||||
# from_secret: clusterprism_some-app_kubernetes_token
|
||||
# commands:
|
||||
# - 'kubectl config set-cluster clusterprism
|
||||
# --server=https://192.168.1.201:6443'
|
||||
# - kubectl config set-credentials dronesome-app --token=$TOKEN
|
||||
# - 'kubectl config set-context clusterprism
|
||||
# --user=dronesome-app --cluster=clusterprism'
|
||||
# - kubectl config use-context clusterprism
|
||||
# - echo $CACRT > cacert.pem
|
||||
# - 'kubectl config set-context clusterprism
|
||||
# --certificate-authority=cacert.pem'
|
||||
# - kubectl config set clusters.clusterprism.insecure-skip-tls-verify true
|
||||
# - kubectl apply -f raw_kubectl/manifest.yml
|
||||
# when:
|
||||
# branch:
|
||||
# - main
|
||||
# yamllint enable rule:line-length- name: rawkubectl
|
||||
- name: deploy
|
||||
image: alpine/k8s:1.31.2
|
||||
environment:
|
||||
CACRT:
|
||||
from_secret: clusterprism_halloween_kubernetes_ca_cert
|
||||
TOKEN:
|
||||
from_secret: clusterprism_halloween_kubernetes_token
|
||||
commands:
|
||||
- kubectl config set-cluster clusterprism --server=https://192.168.1.201:6443
|
||||
- kubectl config set-credentials drone-halloween --token=$TOKEN
|
||||
- |
|
||||
kubectl config set-context clusterprism --user=drone-halloween
|
||||
--cluster=clusterprism
|
||||
- kubectl config use-context clusterprism
|
||||
- echo $CACRT > cacert.pem
|
||||
- |
|
||||
kubectl config set-context clusterprism
|
||||
--certificate-authority=cacert.pem
|
||||
- kubectl config set clusters.clusterprism.insecure-skip-tls-verify true
|
||||
- helm repo add bjw-s https://bjw-s.github.io/helm-charts
|
||||
- |
|
||||
helm upgrade halloween-static-site --install onechart/static-site
|
||||
-n halloween -f clusterprism_halloween_values.yaml
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
- name: notify
|
||||
image: plugins/webhook
|
||||
|
||||
Reference in New Issue
Block a user