Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
1bf524b4
Commit
1bf524b4
authored
Oct 06, 2016
by
Brian
Committed by
GitHub
Oct 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1289 from fibonacci1729/fix/history-output
fix(cmd/hist): print revision history with unix synergy
parents
2136253f
00938d2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
history.go
cmd/helm/history.go
+5
-4
history_test.go
cmd/helm/history_test.go
+2
-2
No files found.
cmd/helm/history.go
View file @
1bf524b4
...
...
@@ -38,10 +38,10 @@ The historical release set is printed as a formatted table, e.g:
$ helm history angry-bird --max=4
REVISION UPDATED STATUS CHART
4 Mon Oct 3 10:15:13 2016 DEPLOYED alpine-0.1.0
3 Mon Oct 3 10:15:13 2016 SUPERSEDED alpine-0.1.0
2 Mon Oct 3 10:15:13 2016 SUPERSEDED alpine-0.1.0
1 Mon Oct 3 10:15:13 2016 SUPERSEDED alpine-0.1.0
2 Mon Oct 3 10:15:13 2016 SUPERSEDED alpine-0.1.0
3 Mon Oct 3 10:15:13 2016 SUPERSEDED alpine-0.1.0
4 Mon Oct 3 10:15:13 2016 DEPLOYED alpine-0.1.0
`
type
historyCmd
struct
{
...
...
@@ -96,7 +96,8 @@ func formatHistory(rls []*release.Release) string {
tbl
:=
uitable
.
New
()
tbl
.
MaxColWidth
=
30
tbl
.
AddRow
(
"REVISION"
,
"UPDATED"
,
"STATUS"
,
"CHART"
)
for
_
,
r
:=
range
rls
{
for
i
:=
len
(
rls
)
-
1
;
i
>=
0
;
i
--
{
r
:=
rls
[
i
]
c
:=
fmt
.
Sprintf
(
"%s-%s"
,
r
.
Chart
.
Metadata
.
Name
,
r
.
Chart
.
Metadata
.
Version
)
t
:=
timeconv
.
String
(
r
.
Info
.
LastDeployed
)
s
:=
r
.
Info
.
Status
.
Code
.
String
()
...
...
cmd/helm/history_test.go
View file @
1bf524b4
...
...
@@ -50,7 +50,7 @@ func TestHistoryCmd(t *testing.T) {
mk
(
"angry-bird"
,
2
,
rpb
.
Status_SUPERSEDED
),
mk
(
"angry-bird"
,
1
,
rpb
.
Status_SUPERSEDED
),
},
xout
:
"REVISION
\t
UPDATED
\t
STATUS
\t
CHART
\n
4
\t
(.*)
\t
DEPLOYED
\t
foo-0.1.0-beta.1
\n
3
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
2
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
1
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
"
,
xout
:
"REVISION
\t
UPDATED
\t
STATUS
\t
CHART
\n
1
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
2
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
3
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
4
\t
(.*)
\t
DEPLOYED
\t
foo-0.1.0-beta.1
\n
"
,
},
{
cmds
:
"helm history --max=MAX RELEASE_NAME"
,
...
...
@@ -60,7 +60,7 @@ func TestHistoryCmd(t *testing.T) {
mk
(
"angry-bird"
,
4
,
rpb
.
Status_DEPLOYED
),
mk
(
"angry-bird"
,
3
,
rpb
.
Status_SUPERSEDED
),
},
xout
:
"REVISION
\t
UPDATED
\t
STATUS
\t
CHART
\n
4
\t
(.*)
\t
DEPLOYED
\t
foo-0.1.0-beta.1
\n
3
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
"
,
xout
:
"REVISION
\t
UPDATED
\t
STATUS
\t
CHART
\n
3
\t
(.*)
\t
SUPERSEDED
\t
foo-0.1.0-beta.1
\n
4
\t
(.*)
\t
DEPLOYED
\t
foo-0.1.0-beta.1
\n
"
,
},
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment