Build Artifacts Store

Hi,

we build our projects using Continua and FinalBuilder. FinalBuilder will compile and copy build artifacts to our package repository. Now, that we are in the process of introducing CI’s notification system, we need a way to tell people where those artifacts are stored. Right now, it is FinalBuilder handling this, by sending an E-Mail containing the path to the files.

Any suggestions how to do this with CI only, is appreciated. Thanks.

Thomas

Hi Thomas,

The build notification templates have access to the list of Artifacts. Each artifact includes the following properties:

Created DateTime When this artifact file was created
DownloadUrl String URL to download this artifact file
FileName String Artifact file name
FileSize Int64 Size of artifact file in bytes
Id Guid identifier for artifact
RelativePath String Relative path to artifact file
ViewerUrl String URL to viewer for this artifact file
ViewRawUrl String URL to view the raw text of this artifact file

Example URLs

  • DownloadUrl: http://hostname/projectName/ci/builds/downloadartifact/123?artifactId=34436854-ad84-4683-8a4a-9f2395ab4c45
  • ViewerUrl: http://hostname/projectName/ci/builds/artifacts/123?artifactId=34436854-ad84-4683-8a4a-9f2395ab4c45&viewerType=variable
  • ViewRawUrl: http://hostname/projectName/ci/builds/ViewArtifact/123?artifactId=34436854-ad84-4683-8a4a-9f2395ab4c45

You can list and filter the artifacts in your template as follows:

{% for artifact in Artifacts  %}
{% if artifact.FileName contains '.xml' %}Artifact '{{artifact.FileName}}'. View: {{artifact.ViewRawUrl}}. Download: {{artifact.DownloadUrl}}{% endif %}
{% endfor %}