My TFS CICD setup for Sitefinity Project – Part 2

Link to Part 1

Important Notes

  • Planning before execution
  • Clearly understand each command / argument
  • Must confirm input path are correct (no turn back if CD server erase all files)

Strategy

1. Developer push code to TFS and it will send signal to CI server if it is a watching branch (in our case the branch is develop-int).

2. CI server will carry on tasks, continue every next task when current task has no error. Finally, it will publish an artifact that is ready for CD server.

3. CI server will trigger CD to start working and finally deploy the published artifacts if everything go smooth.

My CI Pipeline Setting

Here we only make use of Tasks, Variables and Triggers.
We also skip VS Test as the sample is a dummy site.

1. Select repository and branch

2. Select ASP.NET template and apply

3. Select Agent Queue, path to solution

4. Navigate Get source
Set
– Clean: true
– Clean Option: All build directories

5. Update Use Nuget x.x.x
Set
– Version: >=4.0.0-0 (can be other version)
– Run this task: Only when all previous tasks have succeeded

6. Update NuGet restore
Set
– Feeds in my NuGet.config
– Path to Nuget: Nuget.config (that in project root)
– Run this task: Only when all previous tasks have succeeded

7. Update Build solution
– MSBuild Arguments:
– /p:DeployOnBuild=true
– /p:PublishProfile=WsPublishProfile.pubxml
– /p:SkipInvalidConfigurations=true
– /p:AutoParameterizationWebConfigConnectionStrings=False
– /p:VisualStudioVersion=15.0
– Clean: true
– Run this task: Only when all previous tasks have succeeded

8. Disable Test Assemblies and Publish Symbols for future

9. Create Copy File
– Source Folder: DemoServer
– Contents: *.config
– Target Folder: .\Publish\App_Data\Sitefinity\Configuration\
– Overwrite: true
– Run this task: Only when all previous tasks have succeeded

10. Clone a copy file
– Source Folder: DemoServer
– Contents: Sitefinity.lic
– Target Folder: .\Publish\App_Data\Sitefinity\
– Overwrite: true
– Run this task: Only when all previous tasks have succeeded

11. Update Publish Build Artifacts
– Path to public: .\Publish
– Run this task: Only when all previous tasks have succeeded

12. Save and queue for a build. Finally see build succeeded!

Link to Part 3

One thought on “My TFS CICD setup for Sitefinity Project – Part 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s