Skip to content

Commit b2bce40

Browse files
authored
Vikas/azure (#83)
* Update azure-pipelines.yml * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * updated * Updated pipeline file * Updated pipeline file
1 parent 6da25c6 commit b2bce40

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

azure-pipelines.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,40 @@ steps:
2525
inputs:
2626
command: 'pack'
2727
packagesToPack: 'Microsoft.Azure.IoT.Edge.Module.nuspec'
28+
packDestination: '$(Build.ArtifactStagingDirectory)'
2829
versioningScheme: 'off'
2930

3031
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
3132
displayName: 'SBOM Generation Task'
3233
inputs:
3334
BuildDropPath: '$(Build.ArtifactStagingDirectory)'
35+
36+
- task: EsrpCodeSigning@1
37+
inputs:
38+
ConnectedServiceName: 'Templates-Azure-IoT-Edge Sign'
39+
FolderPath: '$(Build.ArtifactStagingDirectory)'
40+
Pattern: '*.nupkg'
41+
signConfigType: 'inlineSignParams'
42+
inlineOperation: |
43+
[
44+
{
45+
"keyCode": "CP-401405",
46+
"operationSetCode": "NuGetSign",
47+
"parameters": [ ],
48+
"toolName": "sign",
49+
"toolVersion": "1.0"
50+
},
51+
{
52+
"keyCode": "CP-401405",
53+
"operationSetCode": "NuGetVerify",
54+
"parameters": [ ],
55+
"toolName": "sign",
56+
"toolVersion": "1.0"
57+
}
58+
]
59+
SessionTimeout: '20'
60+
MaxConcurrency: '50'
61+
MaxRetryAttempts: '5'
3462

3563
- task: PublishBuildArtifacts@1
3664
inputs:
@@ -48,5 +76,20 @@ steps:
4876
tagSource: 'manual'
4977
tag: '$(Build.SourceBranch)'
5078
releaseNotesSource: 'input'
51-
isPreRelease: false
52-
addChangeLog: false
79+
assets: '$(Build.ArtifactStagingDirectory)/*.nupkg'
80+
addChangeLog: false
81+
82+
- task: Bash@3
83+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
84+
displayName: "nuget Publishing"
85+
inputs:
86+
targetType: 'inline'
87+
script: |
88+
echo $(Build.SourceBranch)
89+
if [[ $(Build.SourceBranch) =~ ^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
90+
echo "starting NuGet Push"
91+
nuget push *.nupkg $(apikey) -Source https://api.nuget.org/v3/index.json
92+
else
93+
echo "skipping NuGet Push"
94+
fi
95+
workingDirectory: '$(Build.ArtifactStagingDirectory)'

0 commit comments

Comments
 (0)