mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
fe4af3af7b
* Update gradleExecuteBuild to apply publish and cyclonedx for all projects Co-authored-by: “Raman <“raman_susla@epam.com”>
20 lines
349 B
Go
20 lines
349 B
Go
package piperenv
|
|
|
|
type Artifact struct {
|
|
Id string `json:"id,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
}
|
|
|
|
type Artifacts []Artifact
|
|
|
|
func (a Artifacts) FindByName(name string) Artifacts {
|
|
var filtered Artifacts
|
|
|
|
for _, artifact := range a {
|
|
if artifact.Name == name {
|
|
filtered = append(filtered, artifact)
|
|
}
|
|
}
|
|
return filtered
|
|
}
|