Link to part 1/3: https://sharepointologic.blogspot.fr/2017/01/sharepoint-online-continuous-delivery_17.html
Link to part 2/3: https://sharepointologic.blogspot.fr/2017/02/sharepoint-online-continuous-delivery.html
In this post I'll focus on how to configure Visual Studio Team Services to enable automatic deployment.
Now that source code and deployment agent are ready (see post 1 & 2) we can proceed configuring the deploy pipeline.
Select create a new build definition and just select the "Visual Studio" template and hit Next.
You should get to this:
To make it simple just remove tasks for : NuGet, Buil solution, Test and Publish. You should be left with the following:
Edit the "Copy Files" task and set Contents to "**" to select all files.
Then go to "Options" and select "Default" in the "Default agent queue" menu. This will make the job run on our custom Agent (see blog post 2/3)
Then click "Save & queue"
Agent queue should be on "Default", then click "Queue"
Build should complete and source copied in the Artefact:
You can check the content of the Artefact using the dedicated tab after build success:
Go to the Release Tab and click "+ New Definition"
Select the "Empty" template
Select the Build Definition created previously. If you need to automate deployment process to start after build check "Continuous deployment" else you can change this setting later.
You will be brought to this screen
Click "Run on agent" link
And set Deploymnent queue to "Default" (to select our custom agent)
Then click "Add tasks" and select "PowerShell" under "Utility"
For script path select the "prov.ps1" file from the sources:
Then with the environment menu select "Configure variables…"
If you remind post 1 we had prepared these lines in the script:
So add variables accordingly and click OK:
Then with the environment menu Clone as much as needed
You should end with this:
The last step required is setting up variables for each environment. Go to "Variables" tab then select "Environment variables"
Complete UAT and PRD values. This is what enables using the same "prov.ps1" script for multiple environments:
Now save the definition and test it with "Create Release"
From here you should have a functional basic deployment pipeline for your SharePoint Online Sites and you can start playing DevOps style
Link to part 2/3: https://sharepointologic.blogspot.fr/2017/02/sharepoint-online-continuous-delivery.html
In this post I'll focus on how to configure Visual Studio Team Services to enable automatic deployment.
Now that source code and deployment agent are ready (see post 1 & 2) we can proceed configuring the deploy pipeline.
Making the Build Definition
First you need to create a Build Definition in order to create an Artefact with your source code. Go ahead and go to "Build & Release > Builds".Select create a new build definition and just select the "Visual Studio" template and hit Next.
You should get to this:
To make it simple just remove tasks for : NuGet, Buil solution, Test and Publish. You should be left with the following:
Edit the "Copy Files" task and set Contents to "**" to select all files.
Then go to "Options" and select "Default" in the "Default agent queue" menu. This will make the job run on our custom Agent (see blog post 2/3)
Then click "Save & queue"
Agent queue should be on "Default", then click "Queue"
Build should complete and source copied in the Artefact:
You can check the content of the Artefact using the dedicated tab after build success:
Make Release Definition
Now that the Artefact is generated we can make the Release Definition that will handle deployment to target environments.Go to the Release Tab and click "+ New Definition"
Select the "Empty" template
Select the Build Definition created previously. If you need to automate deployment process to start after build check "Continuous deployment" else you can change this setting later.
You will be brought to this screen
Click "Run on agent" link
And set Deploymnent queue to "Default" (to select our custom agent)
Then click "Add tasks" and select "PowerShell" under "Utility"
For script path select the "prov.ps1" file from the sources:
Then with the environment menu select "Configure variables…"
If you remind post 1 we had prepared these lines in the script:
# Get site url set-variable -scope Global -name siteUrl -value $env:siteUrl # Get credentials $password = $env:deploypassword | ConvertTo-SecureString -asPlainText -Force $username = $env:deployusername $cred = New-Object System.Management.Automation.PSCredential($username,$password)
So add variables accordingly and click OK:
Then with the environment menu Clone as much as needed
You should end with this:
The last step required is setting up variables for each environment. Go to "Variables" tab then select "Environment variables"
Complete UAT and PRD values. This is what enables using the same "prov.ps1" script for multiple environments:
Now save the definition and test it with "Create Release"
From here you should have a functional basic deployment pipeline for your SharePoint Online Sites and you can start playing DevOps style
Comments
Question , only with VSTS is possible to make DevOps pipeline?
Thanks in advance!!
Sharepoint training institute in Gurgaon