drop status field from yamls
Signed-off-by: shubhindia <shubhindia123@gmail.com>
This commit is contained in:
parent
7826534666
commit
21d8dc8a81
@ -22,6 +22,7 @@ import (
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
dockerlib "github.com/fsouza/go-dockerclient"
|
||||
@ -274,6 +275,10 @@ func ConfigAnnotations(service kobject.ServiceConfig) map[string]string {
|
||||
// Print either prints to stdout or to file/s
|
||||
func Print(name, path string, trailing string, data []byte, toStdout, generateJSON bool, f *os.File, provider string) (string, error) {
|
||||
file := ""
|
||||
// simple hack to remove status from the output
|
||||
re := regexp.MustCompile(`(?s)status:.*`)
|
||||
data = re.ReplaceAll(data, nil)
|
||||
|
||||
if generateJSON {
|
||||
file = fmt.Sprintf("%s-%s.json", name, trailing)
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user