-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add porcaline output * feat(du-cli): add create-stale action add create-stale action Signed-off-by: nils måsén * test(flags): add alias tests * fix stray format string ref * fix shell liniting problems * feat(du-cli): remove created images * add test for common template * fix interval/schedule logic * use porcelain arg as template version * fix editor save artifacts * use simpler v1 template Signed-off-by: nils måsén
- Loading branch information
Showing
13 changed files
with
344 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package notifications | ||
|
||
var commonTemplates = map[string]string{ | ||
`default-legacy`: "{{range .}}{{.Message}}{{println}}{{end}}", | ||
|
||
`default`: ` | ||
{{- if .Report -}} | ||
{{- with .Report -}} | ||
{{- if ( or .Updated .Failed ) -}} | ||
{{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed | ||
{{- range .Updated}} | ||
- {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}} | ||
{{- end -}} | ||
{{- range .Fresh}} | ||
- {{.Name}} ({{.ImageName}}): {{.State}} | ||
{{- end -}} | ||
{{- range .Skipped}} | ||
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} | ||
{{- end -}} | ||
{{- range .Failed}} | ||
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}} | ||
{{- end -}}`, | ||
|
||
`porcelain.v1.summary-no-log`: ` | ||
{{- if .Report -}} | ||
{{- range .Report.All }} | ||
{{- .Name}} ({{.ImageName}}): {{.State -}} | ||
{{- with .Error}} Error: {{.}}{{end}}{{ println }} | ||
{{- else -}} | ||
no containers matched filter | ||
{{- end -}} | ||
{{- end -}}`, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.