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
ConstructorDescriptionEiffelArtifactPublisher
(EiffelEvent contextEvent, URI runURI, VirtualFile artifactRoot) Constructs a new object instance. -
Method Summary
Modifier and TypeMethodDescriptionprepareEvent
(EiffelArtifactCreatedEvent creationEvent) Prepares aEiffelArtifactPublishedEvent
that'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 theEiffelArtifactPublishedEvent
should link to with a CONTEXT linkrunURI
- theURI
of theRun
that contains the files for the artifactartifactRoot
- aVirtualFile
that represents the Jenkins artifact root directory
-
-
Method Details
-
prepareEvent
public EiffelArtifactPublishedEvent prepareEvent(@NonNull EiffelArtifactCreatedEvent creationEvent) throws EmptyArtifactException, IOException, MissingArtifactException, URISyntaxException Prepares aEiffelArtifactPublishedEvent
that's ready to be sent.- Parameters:
creationEvent
- theEiffelArtifactCreatedEvent
that should be published- Throws:
EmptyArtifactException
- when theEiffelArtifactCreatedEvent
doesn't contain any files indata.fileInformation
IOException
- when there was a problem correlating the files in theEiffelArtifactCreatedEvent
with the files in theRun
's artifactsMissingArtifactException
- when one or more of the files listed in theEiffelArtifactCreatedEvent
'sdata.fileInformation
array doesn't exist in Jenkins's artifact directoryURISyntaxException
- when an error occurred when trying to construct a URI to an artifact file
-