[CI] Use "plugin" to manage auth with kubectl
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:
parent
fd5ad2fb2f
commit
804019a0dc
1 changed files with 8 additions and 35 deletions
43
.drone.yml
43
.drone.yml
|
@ -32,28 +32,6 @@ steps:
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: build
|
name: build
|
||||||
#
|
|
||||||
#steps:
|
|
||||||
#- name: build image
|
|
||||||
# image: docker
|
|
||||||
# environment:
|
|
||||||
# DOCKER_HOST: tcp://docker
|
|
||||||
# USERNAME:
|
|
||||||
# from_secret: dockerhub_username
|
|
||||||
# PASSWORD:
|
|
||||||
# from_secret: dockerhub_password
|
|
||||||
# commands:
|
|
||||||
# - docker build -t kleph/beer .
|
|
||||||
# - docker login -u $USERNAME -p $PASSWORD
|
|
||||||
# - docker image push kleph/beer
|
|
||||||
#
|
|
||||||
#services:
|
|
||||||
#- name: docker
|
|
||||||
# image: docker:dind
|
|
||||||
# environment:
|
|
||||||
# DOCKER_TLS_CERTDIR: ""
|
|
||||||
# command: ["--storage-driver=vfs", "--tls=false"]
|
|
||||||
# privileged: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build image
|
- name: build image
|
||||||
|
@ -73,21 +51,16 @@ kind: pipeline
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy app
|
- name: deploy
|
||||||
image: bitnami/kubectl
|
image: sinlead/drone-kubectl
|
||||||
environment:
|
settings:
|
||||||
KUBE_USERNAME:
|
kubernetes_server:
|
||||||
from_secret: kubectl_username
|
|
||||||
KUBE_PASSWORD:
|
|
||||||
from_secret: kubectl_password
|
|
||||||
KUBE_URI:
|
|
||||||
from_secret: kubectl_uri
|
from_secret: kubectl_uri
|
||||||
KUBE_CA:
|
kubernetes_cert:
|
||||||
form_secret: kubectl_ca
|
from_secret: kubectl_cert
|
||||||
|
kubernetes_token:
|
||||||
|
from_secret: kubectl_token
|
||||||
commands:
|
commands:
|
||||||
- sudo apt-get update
|
|
||||||
- sudo apt-get install gettext-base
|
|
||||||
- cat kube/kubeconfig_template.yaml | envsubst > /.kube/config
|
|
||||||
- kubectl get pods
|
- kubectl get pods
|
||||||
- kubectl get deployments
|
- kubectl get deployments
|
||||||
- kubectl get svc
|
- kubectl get svc
|
||||||
|
|
Loading…
Reference in a new issue