Commit 6624403f authored by Manuel Kieweg's avatar Manuel Kieweg 🤷
Browse files

nightly builds for k8s

parent 63a3d594
package main
import (
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"context"
"os"
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
log "github.com/sirupsen/logrus"
appv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
......@@ -12,7 +14,6 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"os"
)
func main() {
......@@ -28,7 +29,7 @@ func main() {
}
var tag string
switch os.Getenv("CI_COMMIT_BRANCH") {
case "master":
case os.Getenv("CI_DEFAULT_BRANCH"):
tag = "latest"
case "develop":
tag = "develop"
......@@ -36,6 +37,15 @@ func main() {
tag = os.Getenv("CI_COMMIT_SHA")
}
switch os.Getenv("CI_NIGHTLY") {
case "mainline":
tag = "nightly"
case "develop":
tag = "nightly-develop"
default:
tag = os.Getenv("CI_COMMIT_SHA")
}
switch os.Getenv("K8S_OP") {
case "create":
if err := create(clientset, tag); err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment