Reduce verbosity of docker build, gofmt and uncommenting helm uninstall

This commit is contained in:
smruthi2187
2018-02-08 13:58:44 -08:00
parent 266922da26
commit 818876dd08
6 changed files with 36 additions and 36 deletions
+5 -5
View File
@@ -18,10 +18,10 @@ package controller
import (
"log"
"os/signal"
"syscall"
"os"
"os/signal"
"runtime/debug"
"syscall"
"github.com/fission/fission/crd"
)
@@ -33,13 +33,13 @@ func dumpStackTrace() {
func Start(port int) {
// register signal handler for dumping stack trace.
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGTERM)
go func() {
signal.Notify(c, syscall.SIGTERM)
go func() {
<-c
log.Println("Dumping stack trace")
dumpStackTrace()
os.Exit(1)
}()
}()
fc, _, apiExtClient, err := crd.MakeFissionClient()
if err != nil {
+6 -6
View File
@@ -10,11 +10,11 @@ import (
"net/http"
"net/url"
"os"
"strconv"
"time"
"os/signal"
"syscall"
"runtime/debug"
"strconv"
"syscall"
"time"
"github.com/fission/fission"
"github.com/fission/fission/environments/fetcher"
@@ -28,12 +28,12 @@ func dumpStackTrace() {
func main() {
// register signal handler for dumping stack trace.
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGTERM)
go func() {
signal.Notify(c, syscall.SIGTERM)
go func() {
<-c
dumpStackTrace()
os.Exit(1)
}()
}()
flag.Usage = fetcherUsage
specializeOnStart := flag.Bool("specialize-on-startup", false, "Flag to activate specialize process at pod starup")
+7 -7
View File
@@ -18,13 +18,13 @@ package executor
import (
"log"
"strings"
"sync"
"time"
"os"
"os/signal"
"syscall"
"runtime/debug"
"strings"
"sync"
"syscall"
"time"
"github.com/dchest/uniuri"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -194,12 +194,12 @@ func dumpStackTrace() {
func StartExecutor(fissionNamespace string, functionNamespace string, port int) error {
// register signal handler for dumping stack trace.
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGTERM)
go func() {
signal.Notify(c, syscall.SIGTERM)
go func() {
<-c
dumpStackTrace()
os.Exit(1)
}()
}()
fissionClient, kubernetesClient, _, err := crd.MakeFissionClient()
restClient := fissionClient.GetCrdClient()
+5 -5
View File
@@ -45,10 +45,10 @@ import (
"log"
"net/http"
"os"
"time"
"os/signal"
"syscall"
"runtime/debug"
"syscall"
"time"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
@@ -81,12 +81,12 @@ func dumpStackTrace() {
func Start(port int, executorUrl string) {
// register signal handler for dumping stack trace.
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGTERM)
go func() {
signal.Notify(c, syscall.SIGTERM)
go func() {
<-c
dumpStackTrace()
os.Exit(1)
}()
}()
fmap := makeFunctionServiceMap(time.Minute)
+6 -6
View File
@@ -22,11 +22,11 @@ import (
"fmt"
"net/http"
"os"
"strconv"
"time"
"os/signal"
"syscall"
"runtime/debug"
"strconv"
"syscall"
"time"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
@@ -181,12 +181,12 @@ func dumpStackTrace() {
func RunStorageService(storageType StorageType, storagePath string, containerName string, port int, enablePruner bool) *StorageService {
// register signal handler for dumping stack trace.
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGTERM)
go func() {
signal.Notify(c, syscall.SIGTERM)
go func() {
<-c
dumpStackTrace()
os.Exit(1)
}()
}()
// initialize logger
log.SetLevel(log.InfoLevel)
+7 -7
View File
@@ -59,7 +59,7 @@ build_and_push_fission_bundle() {
pushd $ROOT/fission-bundle
./build.sh
docker build -t $image_tag .
docker build -q -t $image_tag .
gcloud_login
@@ -72,7 +72,7 @@ build_and_push_fetcher() {
pushd $ROOT/environments/fetcher/cmd
./build.sh
docker build -t $image_tag .
docker build -q -t $image_tag .
gcloud_login
@@ -86,7 +86,7 @@ build_and_push_builder() {
pushd $ROOT/builder/cmd
./build.sh
docker build -t $image_tag .
docker build -q -t $image_tag .
gcloud_login
@@ -98,7 +98,7 @@ build_and_push_fluentd(){
image_tag=$1
pushd $ROOT/logger/fluentd
docker build -t $image_tag .
docker build -q -t $image_tag .
gcloud_login
@@ -112,7 +112,7 @@ build_and_push_env_runtime() {
image_tag=$2
pushd $ROOT/environments/$env/
docker build -t $image_tag .
docker build -q -t $image_tag .
gcloud_login
@@ -127,7 +127,7 @@ build_and_push_env_builder() {
pushd $ROOT/environments/$env/builder
docker build -t $image_tag --build-arg BUILDER_IMAGE=${builder_image} .
docker build -q -t $image_tag --build-arg BUILDER_IMAGE=${builder_image} .
gcloud_login
@@ -461,7 +461,7 @@ install_and_test() {
clean_tpr_crd_resources
id=$(generate_test_id)
#trap "helm_uninstall_fission $id" EXIT
trap "helm_uninstall_fission $id" EXIT
if ! helm_install_fission $id $image $imageTag $fetcherImage $fetcherImageTag $controllerPort $routerPort $fluentdImage $fluentdImageTag $pruneInterval
then
describe_all_pods $id