mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fix(uiveri5ExecuteTests): add 'tests' stash to step yaml (#2641)
* add tests stash to uiveri5 step * add stash to uiveri5 * extend step generator with input resources * add step generator test
This commit is contained in:
parent
d2eb2877e0
commit
4ca9186f39
@ -271,6 +271,9 @@ func checkmarxExecuteScanMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "checkmarx", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "avoidDuplicateProjectScans",
|
||||
|
@ -127,6 +127,9 @@ func cloudFoundryCreateServiceMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "cfApiEndpoint",
|
||||
|
@ -105,6 +105,9 @@ func cloudFoundryCreateSpaceMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "cfApiEndpoint",
|
||||
|
@ -105,6 +105,9 @@ func cloudFoundryDeleteSpaceMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "cfApiEndpoint",
|
||||
|
@ -136,6 +136,10 @@ func detectExecuteScanMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "checkmarx", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "token",
|
||||
|
@ -258,6 +258,13 @@ func fortifyExecuteScanMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "commonPipelineEnvironment"},
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
{Name: "tests", Type: "stash"},
|
||||
{Name: "opensourceConfiguration", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "authToken",
|
||||
|
@ -128,6 +128,9 @@ func gitopsUpdateDeploymentMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "branchName",
|
||||
|
@ -105,6 +105,10 @@ func karmaExecuteTestsMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "tests", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "installCommand",
|
||||
|
@ -156,6 +156,9 @@ func kubernetesDeployMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "deployDescriptor", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "additionalParameters",
|
||||
|
@ -126,6 +126,10 @@ func nexusUploadMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "buildResult", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "version",
|
||||
|
@ -100,6 +100,9 @@ func npmExecuteScriptsMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "source", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "install",
|
||||
|
@ -99,6 +99,10 @@ func uiVeri5ExecuteTestsMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "tests", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "installCommand",
|
||||
|
@ -216,6 +216,11 @@ func whitesourceExecuteScanMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "buildDescriptor", Type: "stash"},
|
||||
{Name: "opensourceConfiguration", Type: "stash"},
|
||||
{Name: "checkmarx", Type: "stash"},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "agentDownloadUrl",
|
||||
|
@ -34,6 +34,7 @@ type stepInfo struct {
|
||||
Containers []config.Container
|
||||
Sidecars []config.Container
|
||||
Outputs config.StepOutputs
|
||||
Resources []config.StepResources
|
||||
}
|
||||
|
||||
//StepGoTemplate ...
|
||||
@ -171,6 +172,17 @@ func {{ .StepName }}Metadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
{{ if .Resources -}}
|
||||
Resources: []config.StepResources{
|
||||
{{- range $resource := .Resources }}
|
||||
{
|
||||
{{- if $resource.Name -}} Name: "{{$resource.Name}}",{{- end }}
|
||||
{{- if $resource.Description -}} Description: "{{$resource.Description}}",{{- end }}
|
||||
{{- if $resource.Type -}} Type: "{{$resource.Type}}",{{- end }}
|
||||
{{- if $resource.Conditions -}} Conditions: []config.Condition{ {{- range $i, $cond := $resource.Conditions }} {ConditionRef: "{{$cond.ConditionRef}}", Params: []config.Param{ {{- range $j, $p := $cond.Params}} { Name: "{{$p.Name}}", Value: "{{$p.Value}}" }, {{end -}} } }, {{ end -}} },{{ end }}
|
||||
},{{- end }}
|
||||
},
|
||||
{{ end -}}
|
||||
Parameters: []config.StepParameters{
|
||||
{{- range $key, $value := .StepParameters }}
|
||||
{
|
||||
@ -223,6 +235,7 @@ func {{ .StepName }}Metadata() config.StepData {
|
||||
{{ if $p.tags}}{"tags": []map[string]string{ {{- range $j, $t := $p.tags}} {"name": "{{$t.name}}"}, {{end -}} } },{{ end -}}
|
||||
{{ end }}
|
||||
{{ if $res.Parameters -}} }, {{- end }}
|
||||
{{- if $res.Conditions -}} Conditions: []config.Condition{ {{- range $i, $cond := $res.Conditions }} {ConditionRef: "{{$cond.ConditionRef}}", Params: []config.Param{ {{- range $j, $p := $cond.Params}} { Name: "{{$p.Name}}", Value: "{{$p.Value}}" }, {{end -}} } }, {{ end -}} },{{ end }}
|
||||
}, {{- end }}
|
||||
},
|
||||
}, {{- end }}
|
||||
@ -542,6 +555,7 @@ func getStepInfo(stepData *config.StepData, osImport bool, exportPrefix string)
|
||||
Containers: stepData.Spec.Containers,
|
||||
Sidecars: stepData.Spec.Sidecars,
|
||||
Outputs: stepData.Spec.Outputs,
|
||||
Resources: stepData.Spec.Inputs.Resources,
|
||||
},
|
||||
err
|
||||
}
|
||||
|
@ -42,6 +42,9 @@ spec:
|
||||
tags:
|
||||
- name: t1
|
||||
inputs:
|
||||
resources:
|
||||
- name: stashName
|
||||
type: stash
|
||||
params:
|
||||
- name: param0
|
||||
type: string
|
||||
|
@ -174,6 +174,10 @@ func testStepMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "stashName",Type: "stash",
|
||||
},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "param0",
|
||||
|
@ -173,6 +173,10 @@ func testStepMetadata() config.StepData {
|
||||
},
|
||||
Spec: config.StepSpec{
|
||||
Inputs: config.StepInputs{
|
||||
Resources: []config.StepResources{
|
||||
{Name: "stashName",Type: "stash",
|
||||
},
|
||||
},
|
||||
Parameters: []config.StepParameters{
|
||||
{
|
||||
Name: "param0",
|
||||
|
@ -12,6 +12,11 @@ metadata:
|
||||
# In a Kubernetes environment, the containers both need to be referenced with `localhost`.
|
||||
spec:
|
||||
inputs:
|
||||
resources:
|
||||
- name: buildDescriptor
|
||||
type: stash
|
||||
- name: tests
|
||||
type: stash
|
||||
params:
|
||||
- name: installCommand
|
||||
type: string
|
||||
|
Loading…
Reference in New Issue
Block a user