Class EiffelArtifactPublisher
java.lang.Object
com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.EiffelArtifactPublisher
Transforms an
EiffelArtifactCreatedEvent with one or more files declared into an
EiffelArtifactPublishedEvent that contains the URIs to the Jenkins artifacts that
correspond to the Eiffel artifact's files.-
Constructor Summary
ConstructorsConstructorDescriptionEiffelArtifactPublisher(EiffelEvent contextEvent, URI runURI, VirtualFile artifactRoot) Constructs a new object instance. -
Method Summary
Modifier and TypeMethodDescriptionprepareEvent(EiffelArtifactCreatedEvent creationEvent) Prepares aEiffelArtifactPublishedEventthat's ready to be sent.
-
Constructor Details
-
EiffelArtifactPublisher
public EiffelArtifactPublisher(@NonNull EiffelEvent contextEvent, @NonNull URI runURI, @NonNull VirtualFile artifactRoot) Constructs a new object instance.- Parameters:
contextEvent- the event that theEiffelArtifactPublishedEventshould link to with a CONTEXT linkrunURI- theURIof theRunthat contains the files for the artifactartifactRoot- aVirtualFilethat represents the Jenkins artifact root directory
-
-
Method Details
-
prepareEvent
public EiffelArtifactPublishedEvent prepareEvent(@NonNull EiffelArtifactCreatedEvent creationEvent) throws EmptyArtifactException, IOException, MissingArtifactException, URISyntaxException Prepares aEiffelArtifactPublishedEventthat's ready to be sent.- Parameters:
creationEvent- theEiffelArtifactCreatedEventthat should be published- Throws:
EmptyArtifactException- when theEiffelArtifactCreatedEventdoesn't contain any files indata.fileInformationIOException- when there was a problem correlating the files in theEiffelArtifactCreatedEventwith the files in theRun's artifactsMissingArtifactException- when one or more of the files listed in theEiffelArtifactCreatedEvent'sdata.fileInformationarray doesn't exist in Jenkins's artifact directoryURISyntaxException- when an error occurred when trying to construct a URI to an artifact file
-