azure-sdk-tools/eng/pipelines/setup-tutorial-branch.yml

62 строки
2.3 KiB
YAML

pr: none
trigger: none
# This pipeline is used to trigger a script which creates a branch in the repository specified
# by the Repository parameter below. It creates a branch with the name feature/tutorial/<alias>
# and will be used in training to help training participants get a branch setup to merge their
# code into to simulate real world CI/CD usage without poluting the main branch.
#
# The Alias parameter forms part of the branch name above, and the GitReference parameter which
# has a default of refs/heads/feature/tutorial can be overriden if a different base branch is
# desired (this parameter may be removed in the future once our approach is more settled).
parameters:
- name: Repository
type: string
values:
- azure-sdk-for-net
- azure-sdk-for-java
- azure-sdk-for-python
- azure-sdk-for-js
- name: Alias
type: string
- name: GitReference
type: string
default: refs/heads/feature/tutorial/api-design/starter
values:
- refs/heads/feature/tutorial/api-design/starter
- refs/heads/feature/tutorial/api-design/complete
- refs/heads/feature/tutorial/implementation/starter
- refs/heads/feature/tutorial/implementation/complete
- refs/heads/feature/tutorial/engsys/starter
- refs/heads/feature/tutorial/engsys/complete
- refs/heads/feature/tutorial/quality/starter
- refs/heads/feature/tutorial/quality/complete
- refs/heads/feature/tutorial/xyz/starter
- refs/heads/feature/tutorial/xyz/complete
- refs/heads/feature/tutorial/starter
- refs/heads/feature/tutorial/complete
variables:
skipComponentGovernanceDetection: true
NugetSecurityAnalysisWarningLevel: none
jobs:
- job: SetupTutorialBranch
pool:
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: ubuntu-22.04
steps:
- task: PowerShell@2
displayName: 'Setup Tutorial Branch'
inputs:
targetType: filePath
filePath: "eng/scripts/Setup-TutorialBranch.ps1"
arguments: >
-GitHubRepositoryOwner Azure
-GitHubRepositoryName ${{parameters.Repository}}
-GitReference ${{parameters.GitReference}}
-BranchName "feature/tutorial/${{parameters.Alias}}"
-GitHubPersonalAccessToken "$(azuresdk-github-pat)"
pwsh: true