Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get artifacts from ContextProvider in web-panel?

castus December 10, 2020

Could you help me to get an artifact from ContextProvider in web-panel? I tried the following code but I can't find any method with URL or some path to get it.

 

@Override
public Map<String, Object> getContextMap(Map<String, Object> context) {
final ImmutableJobImpl plan = (ImmutableJobImpl) context.get("plan");
final BuildResultsSummaryImpl results = (BuildResultsSummaryImpl) context.get("resultSummary");

List<ArtifactLink> artifacts = results.getProducedArtifactLinks();
if (!artifacts.isEmpty()) {
for (ArtifactLink item: artifacts) {
/// TODO: Get artifact contents (item.getArtifact()??)
}
}

return context;
}

Please help.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events