Skip to content

Commit

Permalink
Update input manifest
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <divyaasm@amazon.com>
  • Loading branch information
Divyaasm committed Mar 6, 2024
1 parent 6407739 commit b740891
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/jenkins/InputManifest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,35 @@ class InputManifest {
}
}

class Components extends HashMap<String, Component> {

Components(ArrayList data) {
data.each { item ->
Component component = new Component(item)
this[component.name] = component
}
}
}

class Component implements Serializable {
String name
String repository

Component(Map data) {
this.name = data.name
this.repository = data.repository
}

}

Build build
Ci ci
Components components

InputManifest(Map data) {
this.build = new InputManifest.Build(data.build)
this.ci = data.ci ? new InputManifest.Ci(data.ci) : null
this.components = new InputManifest.Components(data.components)
}

String getSHAsRoot(String jobName) {
Expand All @@ -68,4 +91,14 @@ class InputManifest {
'shas'
].join("/")
}

public ArrayList getNames() {
def componentsName = []
this.components.each { key, value -> componentsName.add(key) }
return componentsName
}

public String getRepo(String name) {
return this.components.get(name).repository
}
}

0 comments on commit b740891

Please sign in to comment.