Laying A Pipeline For The Future
The following repository contains sample code and configuration to run a full end-to-end Salesforce release pipeline using Azure Dev Ops.
This implementation has been based on the great work done by Stafford Williams in his public blog post. This particular implementation relies heavily on SF Power Scripts, which is handy SFDX cli wrapper specifically attuned to Azure DevOps' lingo.
- First fork the repo
- Install SF Power Scripts extension into your Azure DevOps instance.
- Build a new pipeline in Azure DevOps
- Connect to your forked repo, and when choosing the project type, point to the yaml file inside
- Edit the pipeline config and ensure that the tasks you're using are properly aligned
- Make sure your pipeline has the variables
SalesforceUsername
,SalesforcePassword
, andSalesforceSecurityToken
defined for it. - Ensure that the versions and attributes for each task align with whatever updates have happened on the extension's task APIs.
- Run the pipeline.
This pipeline is set up to do the following whenever the master branch of the repo is updated:
- Authenticate with an org
- Push source from the master branch of the repo to the org
- Run tests and validate
- Clean up
Oh, and if you're not familiar with the whole Security Token thing, you can retrieve your Token from the user profile page of your user in the Salesforce org. Alternatively, you can turn off IP protections on the Salesforce side to allow all kinds of willy-nilly madness, but why would you do that?
- Create a multi-stage pipeline that includes a sandbox environment
- Run tests in sandbox prior to prod deploy
Made with love. Use with care. No warranties, etc.