[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
|
||||
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:
|
||||
- name: build image
|
||||
|
@ -73,21 +51,16 @@ kind: pipeline
|
|||
name: deploy
|
||||
|
||||
steps:
|
||||
- name: deploy app
|
||||
image: bitnami/kubectl
|
||||
environment:
|
||||
KUBE_USERNAME:
|
||||
from_secret: kubectl_username
|
||||
KUBE_PASSWORD:
|
||||
from_secret: kubectl_password
|
||||
KUBE_URI:
|
||||
- name: deploy
|
||||
image: sinlead/drone-kubectl
|
||||
settings:
|
||||
kubernetes_server:
|
||||
from_secret: kubectl_uri
|
||||
KUBE_CA:
|
||||
form_secret: kubectl_ca
|
||||
kubernetes_cert:
|
||||
from_secret: kubectl_cert
|
||||
kubernetes_token:
|
||||
from_secret: kubectl_token
|
||||
commands:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install gettext-base
|
||||
- cat kube/kubeconfig_template.yaml | envsubst > /.kube/config
|
||||
- kubectl get pods
|
||||
- kubectl get deployments
|
||||
- kubectl get svc
|
||||
|
|
Loading…
Reference in a new issue