ipedrazas / drone-helm

Helm (Kubernetes) plugin for drone.io
MIT License
121 stars 90 forks source link

Having trouble with conditional builds using tag #28

Closed imranismail closed 7 years ago

imranismail commented 7 years ago
pipeline:
  ship:
    when:
      event: tag
    image: ipedrazas/drone-helm
    api_server: https://${K8S_MASTER}/
    skip_tls_verify: true
    chart: ./charts/myapp
    values: image.tag=${DRONE_COMMIT_SHA}
    release: myapp
    token: ${K8S_SERVICE_ACCOUNT_KEY}

Log shows this with exit code of 0

Creating /root/.helm 
Creating /root/.helm/repository 
Creating /root/.helm/repository/cache 
Creating /root/.helm/repository/local 
Creating /root/.helm/plugins 
Creating /root/.helm/starters 
Creating /root/.helm/repository/repositories.yaml 
Writing to /root/.helm/repository/cache/stable-index.yaml
$HELM_HOME has been configured at /root/.helm.
Warning: Tiller is already installed in the cluster.
(Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
Happy Helming!
The Kubernetes package manager
To begin working with Helm, run the 'helm init' command:
    $ helm init
This will install Tiller to your running Kubernetes cluster.
It will also set up any necessary local configuration.
Common actions from this point include:
- helm search:    search for charts
- helm fetch:     download a chart to your local directory to view
- helm install:   upload the chart to Kubernetes
- helm list:      list releases of charts
Environment:
  $HELM_HOME          set an alternative location for Helm files. By default, these are stored in ~/.helm
  $HELM_HOST          set an alternative Tiller host. The format is host:port
  $TILLER_NAMESPACE   set an alternative Tiller namespace (default "kube-namespace")
  $KUBECONFIG         set an alternative Kubernetes configuration file (default "~/.kube/config")
Usage:
  helm [command]
Available Commands:
  completion  Generate bash autocompletions script
  create      create a new chart with the given name
  delete      given a release name, delete the release from Kubernetes
  dependency  manage a chart's dependencies
  fetch       download a chart from a repository and (optionally) unpack it in local directory
  get         download a named release
  history     fetch release history
  home        displays the location of HELM_HOME
  init        initialize Helm on both client and server
  inspect     inspect a chart
  install     install a chart archive
  lint        examines a chart for possible issues
  list        list releases
  package     package a chart directory into a chart archive
  repo        add, list, remove, update, and index chart repositories
  reset       uninstalls Tiller from a cluster
  rollback    roll back a release to a previous revision
  search      search for a keyword in charts
  serve       start a local http web server
  status      displays the status of the named release
  test        test a release
  upgrade     upgrade a release
  verify      verify that a chart at the given path has been signed and is valid
  version     print the client/server version information
Flags:
      --debug                     enable verbose output
      --home string               location of your Helm config. Overrides $HELM_HOME (default "/root/.helm")
      --host string               address of tiller. Overrides $HELM_HOST
      --kube-context string       name of the kubeconfig context to use
      --tiller-namespace string   namespace of tiller (default "kube-system")
Use "helm [command] --help" for more information about a command.
svozza commented 7 years ago

I am getting this issue too although for a deployment event rather than tag one. I think the problem is that the plugin is hardcoded to only work on push events.

laghoule commented 7 years ago

https://github.com/ipedrazas/drone-helm/pull/30 Hope this will fix it

ipedrazas commented 7 years ago

The last PR merged fixes the problem.