Skip to content

Commit 33cf898

Browse files
committed
[dailybuild] bump version and sign
1 parent d43632f commit 33cf898

File tree

4 files changed

+163
-22
lines changed

4 files changed

+163
-22
lines changed

.azure-pipelines/daily-build.yml

Lines changed: 145 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,148 @@ schedules:
99

1010
pr: none
1111

12-
pool:
13-
vmImage: 'windows-2019'
14-
15-
steps:
16-
- task: DotNetCoreCLI@2
17-
displayName: Build for Version Bump
18-
inputs:
19-
command: 'custom'
20-
custom: 'msbuild'
21-
arguments: 'build.proj'
22-
23-
- task: ComponentGovernanceComponentDetection@0
24-
displayName: Component Detection
25-
inputs:
26-
scanType: 'Register'
27-
verbosity: 'Normal'
28-
alertWarningLevel: 'High'
12+
jobs:
13+
- job: DailyBuild
14+
timeoutInMinutes: 180
15+
pool:
16+
vmImage: 'windows-2019'
17+
steps:
18+
- task: PowerShell@2
19+
displayName: 'Initialization'
20+
inputs:
21+
targetType: 'inline'
22+
script: |
23+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
24+
# Avoid issue of filename too long
25+
git config --global core.longpaths true
26+
# Wipe any changes from a previous branch
27+
git clean -xdf
28+
29+
- task: PowerShell@2
30+
displayName: Prepare Powershell $(PSVersion)
31+
inputs:
32+
filePath: 'tools/Test/SmokeTest/PrepareRequiredPowershell.ps1'
33+
arguments: '-RequiredPsVersion $(PSVersion)'
34+
35+
- task: PowerShell@2
36+
displayName: 'Install platyPS'
37+
inputs:
38+
targetType: 'inline'
39+
script: |
40+
$command = "`$PSVersionTable `
41+
Install-Module platyPS -Force -Confirm:`$false -Scope CurrentUser `
42+
Exit"
43+
dotnet tool run pwsh -c $command
44+
45+
- task: DotNetCoreCLI@2
46+
displayName: 'Build for Bumping Version'
47+
inputs:
48+
command: custom
49+
custom: msbuild
50+
arguments: 'build.proj /t:"Build" /p:"Configuration=Release"'
51+
52+
- task: PowerShell@2
53+
displayName: 'Bump Version'
54+
inputs:
55+
targetType: 'inline'
56+
script: |
57+
$command = "`$PSVersionTable `
58+
./tools/RunVersionController.ps1 -MonthName $(MonthName) -Year $(Year) `
59+
Exit"
60+
dotnet tool run pwsh -c $command
61+
62+
- task: PowerShell@2
63+
displayName: 'Push to Branch internal/dailybuild'
64+
inputs:
65+
targetType: 'inline'
66+
script: |
67+
git config user.email "[email protected]"
68+
git config user.name "azuresdkci"
69+
git remote set-url origin https://$(Token)@github.com/Azure/azure-powershell.git
70+
git checkout -b internal/dailybuild
71+
git add .
72+
git commit -m "Bump Version"
73+
git status
74+
git push -u origin internal/dailybuild --force
75+
76+
- task: PowerShell@2
77+
displayName: 'Clean artifacts folder'
78+
inputs:
79+
targetType: 'inline'
80+
script: |
81+
Remove-Item -Force -Recurse -Path artifacts
82+
83+
- task: DotNetCoreCLI@2
84+
displayName: 'Build for Test'
85+
inputs:
86+
command: custom
87+
custom: msbuild
88+
arguments: 'build.proj /t:Build /p:Configuration=Release'
89+
90+
- task: EsrpCodeSigning@1
91+
inputs:
92+
ConnectedServiceName: '$(signServiceConnection)'
93+
FolderPath: 'artifacts'
94+
Pattern: |
95+
Release/**/Microsoft*Azure*PowerShell*Cmdlets*.dll
96+
Release/**/Az.*.private.dll
97+
Release/**/Microsoft.Azure.PowerShell.Authentication.dll
98+
Release/**/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll
99+
Release/**/Microsoft.Azure.PowerShell.Authenticators.dll
100+
!Release/**/Microsoft*Azure*PowerShell*Cmdlets*.Test.dll
101+
UseMinimatch: true
102+
signConfigType: 'inlineSignParams'
103+
inlineOperation: |
104+
[
105+
{
106+
"KeyCode": "CP-233863-SN",
107+
"OperationCode": "StrongNameSign",
108+
"Parameters": {},
109+
"ToolName": "sign",
110+
"ToolVersion": "1.0"
111+
},
112+
{
113+
"KeyCode": "CP-233863-SN",
114+
"OperationCode": "StrongNameVerify",
115+
"Parameters": {},
116+
"ToolName": "sign",
117+
"ToolVersion": "1.0"
118+
},
119+
{
120+
"KeyCode": "CP-230012",
121+
"OperationCode": "SigntoolSign",
122+
"Parameters": {
123+
"OpusName": "Microsoft",
124+
"OpusInfo": "http://www.microsoft.com",
125+
"FileDigest": "/fd \"SHA256\"",
126+
"PageHash": "/NPH",
127+
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
128+
},
129+
"ToolName": "sign",
130+
"ToolVersion": "1.0"
131+
},
132+
{
133+
"KeyCode": "CP-230012",
134+
"OperationCode": "SigntoolVerify",
135+
"Parameters": {},
136+
"ToolName": "sign",
137+
"ToolVersion": "1.0"
138+
}
139+
]
140+
SessionTimeout: '60'
141+
MaxConcurrency: '50'
142+
MaxRetryAttempts: '5'
143+
144+
- task: DotNetCoreCLI@2
145+
displayName: Publish
146+
inputs:
147+
command: custom
148+
custom: msbuild
149+
arguments: 'build.proj /t:Publish /p:Configuration=Release;NuGetKey=$(NuGetKey)'
150+
151+
- task: PublishPipelineArtifact@0
152+
displayName: 'Save artifacts'
153+
inputs:
154+
artifactName: artifacts
155+
targetPath: artifacts
156+
condition: succeededOrFailed()

tools/Az/Az.psd1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.1.2'; },
5757
@{ModuleName = 'Az.Aks'; RequiredVersion = '2.0.0'; },
5858
@{ModuleName = 'Az.AnalysisServices'; RequiredVersion = '1.1.4'; },
5959
@{ModuleName = 'Az.ApiManagement'; RequiredVersion = '2.1.0'; },
60-
@{ModuleName = 'Az.AppConfiguration'; RequiredVersion = '1.0.0'; },
6160
@{ModuleName = 'Az.ApplicationInsights'; RequiredVersion = '1.1.0'; },
6261
@{ModuleName = 'Az.Automation'; RequiredVersion = '1.4.0'; },
6362
@{ModuleName = 'Az.Batch'; RequiredVersion = '3.1.0'; },

tools/RunVersionController.ps1

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55

66
[CmdletBinding(DefaultParameterSetName="ReleaseAz")]
77
Param(
8-
[Parameter(ParameterSetName='ReleaseAz', Mandatory = $true)]
8+
[Parameter(ParameterSetName='ReleaseAz', Mandatory = $false)]
99
[string]$Release,
1010

11+
[Parameter(ParameterSetName='ReleaseAz', Mandatory = $false)]
12+
[string]$MonthName,
13+
14+
[Parameter(ParameterSetName='ReleaseAz', Mandatory = $false)]
15+
[string]$Year,
16+
1117
[Parameter(ParameterSetName='ReleaseSingleModule', Mandatory = $true)]
1218
[string]$ModuleName,
1319

@@ -188,6 +194,15 @@ switch ($PSCmdlet.ParameterSetName)
188194
"ReleaseAz"
189195
{
190196

197+
if('' -eq $Release)
198+
{
199+
if(('' -eq $MonthName) -or ('' -eq $Year))
200+
{
201+
throw "Must given parameter Release or MonthName&Year"
202+
}
203+
$Release = "$MonthName $Year"
204+
}
205+
191206
# clean the unnecessary SerializedCmdlets json file
192207
$ExistSerializedCmdletJsonFile = Get-ExistSerializedCmdletJsonFile
193208
$ExpectJsonHashSet = @{}
@@ -315,4 +330,4 @@ switch ($PSCmdlet.ParameterSetName)
315330
Update-ModuleManifest -Path "$PSScriptRoot\Az\Az.psd1" -ModuleVersion $newVersion -ReleaseNotes $releaseNotes
316331
Update-ChangeLog -Content $changeLog -RootPath $rootPath
317332
}
318-
}
333+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
"Module","Minimal Version"
2-
"Az.AppConfiguration","1.0.0"
1+
"Module","Minimal Version"

0 commit comments

Comments
 (0)