Skip to content

Commit

Permalink
fix: add msg field to pipelineActivity Spec and Steps
Browse files Browse the repository at this point in the history
- Tekton PipelineRun provides the message & this PR will add that Message field to Spec and Steps in the pipelineActivity.
- This PR also adds test for 4 testcases:
	- timeout
	- cancelled
	- success
	- timedout-success
- This also adds the message fields to the expected.yaml.
- Instead of using `testhelpers.AssertTextFilesEqual` we're now just comparing the generated pa and expected pa.
- Also removes `t.TempDir()`
- Adds comments to help understand the steps

related to jenkins-x/jx-ui#23

Signed-off-by: rajatgupta24 <[email protected]>
  • Loading branch information
rajatgupta24 committed Sep 14, 2022
1 parent 55287b5 commit 97f4a8d
Show file tree
Hide file tree
Showing 12 changed files with 5,528 additions and 179 deletions.
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ require (
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/jenkins-x-plugins/jx-gitops v0.7.22
github.com/jenkins-x/go-scm v1.11.16
github.com/jenkins-x/jx-api/v4 v4.4.0
github.com/jenkins-x/jx-api/v4 v4.6.1
github.com/jenkins-x/jx-helpers/v3 v3.4.0
github.com/jenkins-x/jx-kube-client/v3 v3.0.4
github.com/jenkins-x/jx-logging/v3 v3.0.9
github.com/jenkins-x/jx-logging/v3 v3.0.10
github.com/jenkins-x/lighthouse-client v0.0.504
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
Expand All @@ -22,6 +22,7 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tektoncd/pipeline v0.29.0
gocloud.dev v0.25.0
golang.org/x/text v0.3.7
k8s.io/api v0.21.14
k8s.io/apimachinery v0.21.14
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
Expand Down Expand Up @@ -148,13 +149,11 @@ require (
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/oauth2 v0.0.0-20220628200809-02e64fa58f26 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
golang.org/x/tools v0.1.11 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
Expand Down
18 changes: 7 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1057,26 +1057,21 @@ github.com/jenkins-x/go-scm v1.11.5/go.mod h1:GB6XjszezsDOxKTsPoyk4MT/cKw30qkPdJ
github.com/jenkins-x/jx-api/v4 v4.1.5/go.mod h1:l11kHlFy40UGu9pdhCRxDiJcEgRubSVzybWB2jXjLcs=
github.com/jenkins-x/jx-api/v4 v4.3.3/go.mod h1:l11kHlFy40UGu9pdhCRxDiJcEgRubSVzybWB2jXjLcs=
github.com/jenkins-x/jx-api/v4 v4.3.5/go.mod h1:iHK40sCT1ct/C5cIa+Uo+MDFFAjXfnA88MImhPfiTmY=
github.com/jenkins-x/jx-api/v4 v4.3.6/go.mod h1:BjLd7lmBB0CpqA1U2IZ2AyEQ2A66U1lDUBz/lsvld3A=
github.com/jenkins-x/jx-api/v4 v4.3.7 h1:SHDH+Z7kN8YBS/LzQTa69u5qWaYxraXIYjPSTmNnad8=
github.com/jenkins-x/jx-api/v4 v4.3.7/go.mod h1:1ZPMGLTfWeDz4CoB+QBScVQM+AjS780osJ4W6mHJWlk=
github.com/jenkins-x/jx-api/v4 v4.4.0 h1:N7nd0ao7sxv8l12YIMYSjRnbmhFn6qLQM4wBbI/n1o0=
github.com/jenkins-x/jx-api/v4 v4.4.0/go.mod h1:1ZPMGLTfWeDz4CoB+QBScVQM+AjS780osJ4W6mHJWlk=
github.com/jenkins-x/jx-api/v4 v4.6.1 h1:E86DW66wLxjbxzvbu4ys4jeCRClb4szbtFVmkB9kvTw=
github.com/jenkins-x/jx-api/v4 v4.6.1/go.mod h1:1ZPMGLTfWeDz4CoB+QBScVQM+AjS780osJ4W6mHJWlk=
github.com/jenkins-x/jx-helpers/v3 v3.0.127/go.mod h1:0U5fcXnqSv5ugx+XMZ2rYT+VU3o+pyJeXJEiNMAVeSU=
github.com/jenkins-x/jx-helpers/v3 v3.2.5/go.mod h1:w0isjFV0n85jYJogjTW9cdm8vM/8k1mLhTfLXrb4lCs=
github.com/jenkins-x/jx-helpers/v3 v3.2.16 h1:DwN0vxSJHz1L8yaZaJxqYOjDZ0evLpdRosWxW8JvQsI=
github.com/jenkins-x/jx-helpers/v3 v3.2.16/go.mod h1:qC+koAUZJwftXaovby2FU2nawpGGXQaDVb5Q/FIuwzs=
github.com/jenkins-x/jx-helpers/v3 v3.4.0 h1:1e5qFTj4+yjJsu8D+tshIc79lq8GsMVs2+7u1U2Xxfc=
github.com/jenkins-x/jx-helpers/v3 v3.4.0/go.mod h1:pMYPHl6NVsd0vqKf28azwzElNPm97YlJUrAYXwMAHRY=
github.com/jenkins-x/jx-kube-client/v3 v3.0.2/go.mod h1:C/mKnCT5wvolX61eLKJVBNev9sqnkGNpi4skTQ1Gr3Q=
github.com/jenkins-x/jx-kube-client/v3 v3.0.3 h1:yEHZKfVe9THcDSchwWuGKvIDydVzLUdJDxVss9vWmnk=
github.com/jenkins-x/jx-kube-client/v3 v3.0.3/go.mod h1:qiVO4ufdpbSXBFx3EDhjk4VUpHVoE0ItvnPYQe5hpPc=
github.com/jenkins-x/jx-kube-client/v3 v3.0.4 h1:/MbqKke3q9/JYrXCHCyqDXiyD0ybnouK7fIfCPCJ/Ck=
github.com/jenkins-x/jx-kube-client/v3 v3.0.4/go.mod h1:suKBiBs7DKHzOEyhcsr5QhFs/Wcm0agLFMoYlIf3bPA=
github.com/jenkins-x/jx-logging/v3 v3.0.6/go.mod h1:Vp2ER2SYgGhAgEEHlLwfi2ZB54tz6ya1qExq0A4CKMI=
github.com/jenkins-x/jx-logging/v3 v3.0.7/go.mod h1:jcsQ9d8L6ugVH8WefsJqFgXB8+rtXzyz0nYRLFBPUzw=
github.com/jenkins-x/jx-logging/v3 v3.0.9 h1:/5XOnxFKPb9ABciZHUzTDYrubXkd+KxPUPhgn2+xbt4=
github.com/jenkins-x/jx-logging/v3 v3.0.9/go.mod h1:jcsQ9d8L6ugVH8WefsJqFgXB8+rtXzyz0nYRLFBPUzw=
github.com/jenkins-x/jx-logging/v3 v3.0.10 h1:V0Qy9eknxRs5S82yjHT+bYcXWNn5zduanDGLqy04dDQ=
github.com/jenkins-x/jx-logging/v3 v3.0.10/go.mod h1:BkAtAxG0/9+6vitlR86NXBUUd0ytrULZ2/RODKZrtKA=
github.com/jenkins-x/lighthouse-client v0.0.438/go.mod h1:N7QjV8q6Pc72XiEWdEJAfx/HxO4XyiDj7H9l6ah6mcE=
github.com/jenkins-x/lighthouse-client v0.0.504 h1:DvoB/9XdXSDtt9d0SJ5OW4E4iszAVUOjC5TCJwF1CpU=
github.com/jenkins-x/lighthouse-client v0.0.504/go.mod h1:I9X3DWr2OlNQIeeD3GP2p5a4LyoQ3drox5YSexNmGc0=
Expand Down Expand Up @@ -1621,6 +1616,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
Expand Down Expand Up @@ -1770,7 +1766,6 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.0 h1:UG21uOlmZabA4fW5i7ZX6bjw1xELEGg/ZLgZq9auk/Q=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand Down Expand Up @@ -1841,6 +1836,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
Expand Down Expand Up @@ -2008,6 +2004,7 @@ golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down Expand Up @@ -2139,7 +2136,6 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
Expand Down
40 changes: 40 additions & 0 deletions pkg/pipelines/pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,46 @@ func ToPipelineActivity(pr *v1beta1.PipelineRun, pa *v1.PipelineActivity, overwr
}

activities.UpdateStatus(pa, false, nil)

addConditionsMessage(pr, pa)
addTaskRunsMessage(pr, pa)
}

// addConditionsMessage reads the pr and gets the message for each condition then add it to the pa as Spec.Message
// It also edit the message so that it says PipelineActivity instead of PipelineRun
// It also replaces the pr.name with pa.name
func addConditionsMessage(pr *v1beta1.PipelineRun, pa *v1.PipelineActivity) {
for k := range pr.Status.Conditions {
msg := pr.Status.Conditions[k].GetMessage()

if strings.Contains(msg, "PipelineRun") {
msg = strings.ReplaceAll(msg, "PipelineRun", "PipelineActivity")
}

if strings.Contains(msg, pa.Labels["tekton.dev/pipeline"]) {
msg = strings.ReplaceAll(msg, pa.Labels["tekton.dev/pipeline"], pa.Name)
}

pa.Spec.Message = v1.ActivityMessageType(msg)
}
}

// addConditionsMessage reads the pr and gets the message for each taskrun then add it to the pa as Spec.Steps[k].Stage.Message
// It replace TaskRun with Stage
func addTaskRunsMessage(pr *v1beta1.PipelineRun, pa *v1.PipelineActivity) {
k1 := 0
for k := range pr.Status.TaskRuns {
msg := ""

for k2 := range pr.Status.TaskRuns[k].Status.Conditions {
msg = pr.Status.TaskRuns[k].Status.Conditions[k2].Message
}

msg = strings.ReplaceAll(msg, "TaskRun", "Stage")
pa.Spec.Steps[k1].Stage.Message = v1.ActivityMessageType(msg)

k1++
}
}

// Humanize splits into words and capitalises
Expand Down
110 changes: 82 additions & 28 deletions pkg/pipelines/pipelines_test.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
package pipelines_test

import (
"os"
"path/filepath"
"testing"

"github.com/jenkins-x-plugins/jx-pipeline/pkg/pipelines"
"github.com/jenkins-x-plugins/jx-pipeline/pkg/testpipelines"
v1 "github.com/jenkins-x/jx-api/v4/pkg/apis/jenkins.io/v1"
"github.com/jenkins-x/jx-helpers/v3/pkg/testhelpers"
"github.com/jenkins-x/jx-helpers/v3/pkg/yamls"
"github.com/stretchr/testify/require"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

const (
Expand All @@ -36,60 +33,61 @@ func TestCreatePipelineActivity(t *testing.T) {
}

func AssertPipelineActivityMapping(t *testing.T, folder string) {
// getting path of prfile
prFile := filepath.Join("testdata", folder, "pipelinerun.yaml")
require.FileExists(t, prFile)

tmpDir := t.TempDir()

data, err := os.ReadFile(prFile)
require.NoError(t, err, "failed to load %s", prFile)

// loading a prfile
pr := &v1beta1.PipelineRun{}
err = yaml.Unmarshal(data, pr)
err := yamls.LoadFile(prFile, pr)
require.NoError(t, err, "failed to unmarshal %s", prFile)

// generating pa from pr
pa := &v1.PipelineActivity{}
pipelines.ToPipelineActivity(pr, pa, false)

// removing timestamps
testpipelines.ClearTimestamps(pa)

paFile := filepath.Join(tmpDir, "pa.yaml")
err = yamls.SaveFile(pa, paFile)
require.NoError(t, err, "failed to save %s", paFile)
// expected pa
expectedFile := filepath.Join("testdata", folder, "expected.yaml")
require.FileExists(t, expectedFile)

t.Logf("created PipelineActivity %s\n", paFile)
expectedPa := &v1.PipelineActivity{}
err = yamls.LoadFile(expectedFile, expectedPa)
require.NoError(t, err, "failed to load %s", expectedPa)

testhelpers.AssertTextFilesEqual(t, filepath.Join("testdata", folder, "expected.yaml"), paFile, "generated git credentials file")
require.Equal(t, expectedPa, pa)
}

func TestMergePipelineActivity(t *testing.T) {
// copying pr path
prFile := filepath.Join("testdata", "merge", "pipelinerun.yaml")
require.FileExists(t, prFile)

paFile := filepath.Join("testdata", "merge", "pa.yaml")
require.FileExists(t, prFile)

tmpDir := t.TempDir()
// copying expected pa path
expectedFile := filepath.Join("testdata", "merge", "expected.yaml")
require.FileExists(t, expectedFile)

// loading the pr
pr := &v1beta1.PipelineRun{}
err := yamls.LoadFile(prFile, pr)
require.NoError(t, err, "failed to load %s", prFile)

pa := &v1.PipelineActivity{}
err = yamls.LoadFile(paFile, pa)
require.NoError(t, err, "failed to load %s", paFile)
// loading expectedPa
expectedPa := &v1.PipelineActivity{}
err = yamls.LoadFile(expectedFile, expectedPa)
require.NoError(t, err, "failed to load %s", expectedPa)

// creating pa from pr
pa := &v1.PipelineActivity{}
pipelines.ToPipelineActivity(pr, pa, false)

// removing the timestamp from pa
testpipelines.ClearTimestamps(pa)

paFile = filepath.Join(tmpDir, "pa.yaml")
err = yamls.SaveFile(pa, paFile)
require.NoError(t, err, "failed to save %s", paFile)

t.Logf("created PipelineActivity %s\n", paFile)

testhelpers.AssertTextFilesEqual(t, filepath.Join("testdata", "merge", "expected.yaml"), paFile, "generated git credentials file")
// compare the pa with expected.yaml (expectedPa)
require.Equal(t, expectedPa, pa)
}

func generatePipelineRunWithLabels(branch, org, repo, buildNum string) *v1beta1.PipelineRun {
Expand Down Expand Up @@ -273,3 +271,59 @@ func TestPipelineActivityStatus(t *testing.T) {
require.Equal(t, v.expectedStatus, pa.Spec.Status.String())
}
}

var activityMessageTestCases = []struct {
description string
folder string
name string
expectedMessage string
}{
{
description: "Jenkins X PipelineActivity has been successful run and message exists",
folder: "message/success",
name: "rajatgupta24-quickstart-004-pr-1-7",
expectedMessage: `Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0`,
},
{
description: "Jenkins X PipelineActivity has been timedout and message exists",
folder: "message/timeout",
name: "rajatgupta24-quickstart-004-pr-1-7",
expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-1-7" failed to finish within "1h0m0s"`,
},
{
description: "Jenkins X PipelineActivity has been cancelled and message exists",
folder: "message/cancelled",
name: "rajatgupta24-quickstart-004-pr-2-7",
expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-2-7" was cancelled`,
},
{
description: "Jenkins X PipelineActivity has two steps, one step that been timedout and other Succeeded",
folder: "message/timedout-succeeded",
name: "rajatgupta24-quickstart-004-pr-2-7",
expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-2-7" failed to finish within "1m0s"`,
},
}

func TestPipelineActivityMessage(t *testing.T) {
for k, v := range activityMessageTestCases {
t.Logf("Running test case %d: %s", k+1, v.description)
prFile := filepath.Join("testdata", v.folder, "pr.yaml")
require.FileExists(t, prFile)

pr := &v1beta1.PipelineRun{}
err := yamls.LoadFile(prFile, pr)
require.NoError(t, err, "failed to load %s", prFile)

pa := &v1.PipelineActivity{}

pa.Name = v.name
pipelines.ToPipelineActivity(pr, pa, false)

for k2 := range pa.Spec.Steps {
require.NotEqual(t, "", pa.Spec.Steps[k2].Stage.Message.String())
}

require.NotEqual(t, "", pa.Spec.Message.String())
require.Equal(t, v.expectedMessage, pa.Spec.Message.String())
}
}
64 changes: 33 additions & 31 deletions pkg/pipelines/testdata/create/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,40 @@ spec:
gitRepository: nodey510
gitUrl: https://github.com/jstrachan/nodey510.git
lastCommitSHA: 5a694a615045f2821aa40aefe86aab9192667193
message: "Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0"
pipeline: jstrachan/nodey510/master
status: Running
steps:
- kind: Stage
stage:
name: from build pack
status: Running
steps:
- name: Git Clone
status: Succeeded
- name: Git Setup
status: Succeeded
- name: Next Version
status: Succeeded
- name: Tag Version
status: Succeeded
- name: Setup Builder Home
status: Succeeded
- name: Git Merge
status: Succeeded
- name: Build Npmrc
status: Succeeded
- name: Build Npm Install
- kind: Stage
stage:
message: Not all Steps in the Task have finished executing
name: from build pack
status: Running
- name: Build Npm Test
status: Pending
- name: Build Container Build
status: Pending
- name: Promote Changelog
status: Pending
- name: Promote Helm Release
status: Pending
- name: Promote Jx Promote
status: Pending
status: {}
steps:
- name: Git Clone
status: Succeeded
- name: Git Setup
status: Succeeded
- name: Next Version
status: Succeeded
- name: Tag Version
status: Succeeded
- name: Setup Builder Home
status: Succeeded
- name: Git Merge
status: Succeeded
- name: Build Npmrc
status: Succeeded
- name: Build Npm Install
status: Running
- name: Build Npm Test
status: Pending
- name: Build Container Build
status: Pending
- name: Promote Changelog
status: Pending
- name: Promote Helm Release
status: Pending
- name: Promote Jx Promote
status: Pending
status: {}
Loading

0 comments on commit 97f4a8d

Please sign in to comment.