JustAMartin
JustAMartin

Reputation: 13753

Building and deployment of SSRS reports in Team Foundation Server 2018 Express

What kind of tasks or custom commands could be used to generate artifacts for rptproj projects during TFS build process and then to publish the reports to local ReportServer later during deployment process?

The long story.

I have a setup with separate Build and Deployment pipelines in TFS 2018 Express.

My Visual Studio 2017 solution has three ASP.NET MVC web app projects and two SSRS projects (rptproj).

Currently, I'm triggering a build using the following MSBuild parameters:

/p:DeployOnBuild=true /p:WebPublishMethod=Package
 /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true
 /p:PackageLocation="$(build.artifactstagingdirectory)\\"
 /p:AutoParameterizationWebConfigConnectionStrings=false

and also I have specified an output folder for artifacts.

After a build, the artifact folder contains three zip files for the websites and some deployment helper scripts. However, there is no any output from my rptproj projects (and I'm not sure what should the output be for these). The report projects are built without any issues, judging from the build log, they just don't generate any artifact outputs.

I have configured the deploy pipeline to take the zips and deploy to local IIS server. It works just fine, also web.config transforms get applied.

I did it all using TFS 2018 built-in tasks and everything seemed mostly straight forward. But there are no built-in tasks for SSRS.

I found some third party SSRS tasks in the TFS online gallery but, if I understand correctly, they all seem to be deploying immediately during build. I don't need that - I want first to collect the rptproj output in the artifacts and then later deploy it during the deploy pipeline step because sometimes I want to trigger a manual release for some older build without actually rebuilding everything.

Upvotes: 0

Views: 1719

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59035

I want first to collect the rptproj output in the artifacts and then later deploy it during the deploy pipeline step

You just stated the exact solution to the problem:

Add a Publish Artifacts task, point it to the folder containing your report output, and publish your reports as an artifact. Then it will be available in a release. In my experience, you don't need to "build" report projects, you can just publish the folder containing your reports from $(Build.SourcesDirectory)/Path/To/Your/Reports.

Upvotes: 1

Related Questions