Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
Attempt decoding pod
Browse files Browse the repository at this point in the history
  • Loading branch information
me committed Dec 22, 2017
1 parent deab6e8 commit 081a0f4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cli/pipeline/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"io/ioutil"
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
)

var stepName string
Expand Down Expand Up @@ -63,6 +64,12 @@ func runPipeline(path string) {
}
fmt.Printf("{}", list)
for _, step := range pipeline.Steps {
compilePodTemplate(pipeline, &step)
stepPod := compilePodTemplate(pipeline, &step)
decode := scheme.Codecs.UniversalDeserializer().Decode
obj, groupVersionKind, err := decode([]byte(stepPod), nil, nil)

if err != nil {
log.Fatal(fmt.Sprintf("Error while decoding YAML object. Err was: %s", err))
}
}
}

0 comments on commit 081a0f4

Please sign in to comment.