Skip to content

Commit c59f8ab

Browse files
committed
adding the old file without any changes
1 parent 0dddc0b commit c59f8ab

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# This pipeline is used to do new release of Azure DevOps CLI extension
2+
# This
3+
# 1. Runs test cases
4+
# 2. Creates a wheel and publishes it as artifact
5+
# 3. Creates a tag in github
6+
7+
pr: none
8+
9+
trigger: none
10+
11+
jobs:
12+
13+
- job: 'Build_Publish_Azure_DevOps_CLI_Extension'
14+
pool:
15+
vmImage: 'ubuntu-latest'
16+
17+
steps:
18+
- task: UsePythonVersion@0
19+
inputs:
20+
versionSpec: '3.x'
21+
architecture: 'x64'
22+
- script: pip install setuptools
23+
displayName: 'install setuptools'
24+
25+
- template: templates/setup-ci-machine.yml
26+
27+
- template: templates/build-publish-azure-devops-cli-extension.yml
28+
29+
- job: 'Build_Publish_Azure_CLI_Test_SDK'
30+
pool:
31+
vmImage: 'ubuntu-latest'
32+
33+
steps:
34+
- task: UsePythonVersion@0
35+
inputs:
36+
versionSpec: '3.x'
37+
architecture: 'x64'
38+
- script: pip install setuptools
39+
displayName: 'install setuptools'
40+
41+
- template: templates/setup-ci-machine.yml
42+
43+
- template: templates/build-publish-azure-cli-test-sdk.yml
44+
45+
- job: 'Run_Test'
46+
dependsOn : Build_Publish_Azure_CLI_Test_SDK
47+
pool:
48+
vmImage: 'macOS-latest'
49+
50+
steps:
51+
- template: templates/run-tests.yml
52+
parameters:
53+
pythonVersion: '3.10'
54+
55+
- script: 'pip install .'
56+
displayName: 'Install the whl locally'
57+
workingDirectory: 'azure-devops/'
58+
59+
- task: PythonScript@0
60+
displayName : 'setupVersion'
61+
name: 'setupVersion'
62+
inputs:
63+
scriptSource: 'inline'
64+
script: |
65+
from azext_devops.version import VERSION
66+
print("##vso[task.setvariable variable=CLIVersion;isOutput=true]"+VERSION)
67+
print("##vso[task.setvariable variable=RTitle;isOutput=true]"+'Azure DevOps CLI extension for Azure CLI ' + VERSION)
68+
69+
- job: 'Calculate_Sha_And_Create_Release'
70+
dependsOn : Run_Test
71+
pool:
72+
vmImage: 'windows-latest'
73+
variables:
74+
CLIVersion: $[dependencies.Run_Test.outputs['setupVersion.CLIVersion']]
75+
RTitle: $[dependencies.Run_Test.outputs['setupVersion.RTitle']]
76+
77+
steps:
78+
- task: DownloadBuildArtifacts@0
79+
displayName : 'Download Extension wheel from Build Artifacts'
80+
inputs:
81+
buildType: 'current'
82+
downloadType: 'single'
83+
artifactName: 'azure-devops-cli-extension'
84+
downloadPath: '$(System.ArtifactsDirectory)/extension'
85+
86+
- task: PowerShell@2
87+
displayName: 'Calculate Sha for downloaded extension'
88+
inputs:
89+
targetType: 'inline'
90+
script: |
91+
$extensions = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName
92+
Foreach ($extension in $extensions)
93+
{
94+
Write-Host "calculating sha for " $extension.FullName
95+
certutil -hashfile $extension.FullName sha256
96+
}
97+
Write-Host "done"
98+
workingDirectory: '$(System.ArtifactsDirectory)/extension'
99+
100+
- task: GitHubRelease@0
101+
inputs:
102+
gitHubConnection: github.com_v-soujanya
103+
repositoryName: Azure/azure-devops-cli-extension
104+
action: 'create'
105+
target: '$(Build.SourceVersion)'
106+
tagSource: manual
107+
tag: $(Build.BuildNumber)
108+
title: $(RTitle)
109+
assets: '$(System.ArtifactsDirectory)/extension/**/*.whl'
110+
assetUploadMode: 'delete'
111+
isDraft: true
112+
isPreRelease: false
113+
addChangeLog: true

0 commit comments

Comments
 (0)