mirror of
https://github.com/danielgormly/drone-plugin-kube.git
synced 2026-06-04 18:23:48 +08:00
Debug
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
rm -rf build/kubano
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/kubano
|
||||
|
||||
# docker build -t danielgormly/drone-plugin-kube build
|
||||
# docker push danielgormly/drone-plugin-kube
|
||||
docker build -t danielgormly/drone-plugin-kube:beta2 build
|
||||
docker push danielgormly/drone-plugin-kube:beta2
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
@@ -16,6 +17,7 @@ func main() {
|
||||
InsecureSkipTLSVerify: os.Getenv("PLUGIN_SKIP_TLS") == "false",
|
||||
},
|
||||
}
|
||||
fmt.Printf(os.Getenv("PLUGIN_SKIP_TLS"))
|
||||
err := plugin.Exec()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
@@ -70,11 +70,11 @@ func (p Plugin) Exec() error {
|
||||
panic(err)
|
||||
}
|
||||
// Connect to Kubernetes
|
||||
// clientset, err := p.CreateKubeClient()
|
||||
clientset, err := p.CreateKubeClient()
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
// deployment := CreateDeploymentObj(depYaml)
|
||||
// UpdateDeployment(clientset, p.KubeConfig.Namespace, deployment)
|
||||
deployment := CreateDeploymentObj(depYaml)
|
||||
UpdateDeployment(clientset, p.KubeConfig.Namespace, deployment)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user