This commit is contained in:
Daniel Gormly
2019-09-04 08:22:44 +10:00
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -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:0.0.1 build
docker push danielgormly/drone-plugin-kube
docker build -t danielgormly/drone-plugin-kube:0.0.2 build
docker push danielgormly/drone-plugin-kube:0.0.2
+1 -3
View File
@@ -47,7 +47,6 @@ func waitUntilDeploymentSettled(clientset *kubernetes.Clientset, namespace strin
watcher, error := clientset.AppsV1().Deployments(namespace).Watch(watchOptions)
liveDeployment, error := clientset.AppsV1().Deployments(namespace).Get(name, meta.GetOptions{})
log.Printf("📦 Unavailable replicas: %d", liveDeployment.Status.UnavailableReplicas)
log.Printf("📦 %s", liveDeployment)
if liveDeployment.Status.UnavailableReplicas == 0 {
return "📦 Updated", error
}
@@ -55,11 +54,10 @@ func waitUntilDeploymentSettled(clientset *kubernetes.Clientset, namespace strin
for {
event := <-watcher.ResultChan()
deployment := event.Object.(*appv1.Deployment)
if liveDeployment.Status.UnavailableReplicas == 0 {
if deployment.Status.UnavailableReplicas == 0 {
return "📦 Updated", error
}
log.Printf("📦 Unavailable replicas: %d", deployment.Status.UnavailableReplicas)
i++
}
return "failed", error
}
+1 -1
View File
@@ -19,7 +19,7 @@ func main() {
},
}
fmt.Printf(os.Getenv("PLUGIN_SKIP_TLS"))
fmt.Println("kubano v0.0.1 https://github.com/danielgormly/drone-plugin-kube")
fmt.Println("danielgormly/drone-plugin-kube@0.0.2 https://github.com/danielgormly/drone-plugin-kube")
err := plugin.Exec()
if err != nil {
log.Fatalf("⛔️ Fatal error: \n%s", err)