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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.