As a:
Developer
I want:
The Bedrock CLI to support templating when generating pipelines such as:
So that:
I can customize and extend GitOps pipeline logic.
Describe the solution you'd like:
The end solution should allow conditional configuration. This can be in the form of conditional yaml statements in the AzDO yaml pipeline that can enable/disable reusable templates. I've created a proof of concept here.
An example of what build-update-hld.yaml could be:
# File: azure-pipelines.ymltrigger:
- mastervariables:
- group: quick-start-vg
- name: APP_NAMEvalue: quick-start-appstages:
- stage: buildjobs:
- job: run_build_push_acrpool:
vmImage: ubuntu-lateststeps:
- template: templates/azure-login.yml # Template referenceparameters:
appId: $(SP_APP_ID)password: $(SP_PASS)tenantId: $(SP_TENANT)
- template: templates/container-build-strategy.yml # Template referenceparameters:
downloadTools: falseimageRepoType: ACRimageName: "$(APP_NAME)-$(Build.SourceBranchName)"imageTag: $(Build.BuildNumber)buildArgs:
- AZP_POOL
- ACR_NAME
- stage: hld_updatedependsOn: buildcondition: succeeded('build')jobs:
- job: update_image_tagpool:
vmImage: ubuntu-lateststeps:
- template: templates/git-update-strategy.yml # Template referenceparameters:
downloadFab: truedownloadTools: trueazureContainerRegistry: $(ACR_NAME)gitUpdateType: HLDgitRepoURL: $(HLD_REPO)gitAccessToken: $(PAT)imageName: "$(APP_NAME)-$(Build.SourceBranchName)"imageTag: $(Build.BuildNumber)I would also consider maintaining a library of GitOps focused AzDO templates (and possibly bash scripts) that can be hosted from Bedrock, can be optionally downloaded to local repositories, or be hosted on a user's private repository.
If applicable it might make sense to encapsulate heavily re-used components of the Bedrock CLI GitOps pipelines in Azure DevOps Extension Tasks.
Acceptance Criteria:
- As a user I can easily extend Bedrock CLI generated pipelines with my own AzDO templates and scripts in a clear encapsulated manner.
- There is flexibility of where the templates and script are hosted (Bedrock repo, in the local service repo, in a private 3rd party repo)
Does this require updates to documentation?:
Yes
As a:
Developer
I want:
The Bedrock CLI to support templating when generating pipelines such as:
bedrock service createbedrock hld init(bedrock hld initshould produce a templated pipeline bedrock-cli#56)bedrock project initSo that:
I can customize and extend GitOps pipeline logic.
Describe the solution you'd like:
The end solution should allow conditional configuration. This can be in the form of conditional yaml statements in the AzDO yaml pipeline that can enable/disable reusable templates. I've created a proof of concept here.
An example of what
build-update-hld.yamlcould be:I would also consider maintaining a library of GitOps focused AzDO templates (and possibly bash scripts) that can be hosted from Bedrock, can be optionally downloaded to local repositories, or be hosted on a user's private repository.
If applicable it might make sense to encapsulate heavily re-used components of the Bedrock CLI GitOps pipelines in Azure DevOps Extension Tasks.
Acceptance Criteria:
Does this require updates to documentation?:
Yes