Skip to content

Commit

Permalink
Annotate TargetPath and OutputImageDir with omitempty
Browse files Browse the repository at this point in the history
This omits them from YAML output if the value isn't specified. Before
this change, YAMLs would print `outputImageDir: ""` if it was
unspecified.
  • Loading branch information
imjasonh authored and tekton-robot committed Aug 21, 2019
1 parent 0d7f515 commit c371bef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1alpha1/task_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ type TaskResource struct {
// TargetPath is the path in workspace directory where the task resource
// will be copied.
// +optional
TargetPath string `json:"targetPath"`
TargetPath string `json:"targetPath,omitempty"`
// Path to the index.json file for output container images.
// +optional
OutputImageDir string `json:"outputImageDir"`
OutputImageDir string `json:"outputImageDir,omitempty"`
}

// Outputs allow a task to declare what data the Build/Task will be producing,
Expand Down

0 comments on commit c371bef

Please sign in to comment.