Welcome to mirror list, hosted at ThFree Co, Russian Federation.

azure-pipelines.yml - github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 07838959220d2a9034b9812e8f8d306543787071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- '*'

name: $(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.r)

pool:
  vmImage: 'macos-latest'

variables:
  mdocPath: 'bin/$(buildConfiguration)'
  
steps:
- task: NuGetToolInstaller@1
  displayName: Install NuGet Tool

- task: Bash@3
  displayName: Run Unit and Integration Tests
  inputs:
    targetType: 'inline'
    script: 'make prepare all check CONFIGURATION=$(buildConfiguration)'

- task: EsrpCodeSigning@1
  displayName: Sign executable and dll files
  condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
  inputs:
    ConnectedServiceName: 'CodeSigning-APEX'
    FolderPath: '$(mdocPath)'
    UseMinimatch: true
    signConfigType: inlineSignParams
    SessionTimeout: '60'
    MaxConcurrency: '100'
    MaxRetryAttempts: '5'
    Pattern: |
        *.dll
        *.exe
    inlineOperation: |
      [
        {
          "KeyCode": "CP-230012",
          "OperationSetCode": "SigntoolSign",
          "parameters": [
            {
              "parameterName": "OpusName",
              "parameterValue": "Microsoft"
            },
            {
              "parameterName": "OpusInfo",
              "parameterValue": "http://www.microsoft.com"
            },
            {
              "parameterName": "PageHash",
              "parameterValue": "/NPH"
            },
            {
              "parameterName": "TimeStamp",
              "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
            },
            {
              "parameterName": "FileDigest",
              "parameterValue": "/fd \"SHA256\""
            }
          ],
          "ToolName": "sign",
          "ToolVersion": "1.0"
        },
        {
          "KeyCode": "CP-230012",
          "OperationSetCode": "SigntoolVerify",
          "Parameters": [
            {
              "parameterName": "VerifyAll",
              "parameterValue": "/all"
            }
          ],
          "ToolName": "sign",
          "ToolVersion": "1.0"
        }
      ]

- task: ArchiveFiles@2
  displayName: Archive mdoc Files
  inputs:
    rootFolderOrFile: '$(mdocPath)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/zips/mdoc-$(Build.BuildNumber).zip'
    replaceExistingArchive: true

- task: PublishBuildArtifacts@1
  displayName: 'Publish mdoc Artifact'
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)/zips'
    ArtifactName: 'mdoc.Artifact'
- task: PowerShell@2
  name: 'mdocVersion'
  displayName: 'Checking remote and local version of mdoc'
  condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
  inputs:
    filePath: 'mdoc/CheckNugetPublish.ps1'

- task: NuGetCommand@2
  displayName: 'Create a NuGet package for mdoc'
  condition: eq(variables['mdocVersion.NeedUpdate'], true)
  inputs:
    command: 'pack'
    packagesToPack: 'mdoc/mdoc.nuspec'

- task: EsrpCodeSigning@1
  displayName: 'Sign NuGet packages'
  condition: eq(variables['mdocVersion.NeedUpdate'], true)
  inputs:
    ConnectedServiceName: 'CodeSigning-APEX'
    FolderPath: '$(Build.ArtifactStagingDirectory)'
    Pattern: '*.nupkg'
    signConfigType: inlineSignParams
    inlineOperation: |
     [
             {
                 "KeyCode" : "CP-401405",
                 "OperationSetCode" : "NuGetSign",
                 "Parameters" : [
                    {
                      "parameterName": "TimeStamp",
                      "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
                    },
                    {
                      "parameterName": "FileDigest",
                      "parameterValue": "/fd \"SHA256\""
                    }
                 ],
                 "ToolName" : "sign",
                 "ToolVersion" : "1.0"
             },
             {
                 "KeyCode" : "CP-401405",
                 "OperationSetCode" : "NuGetVerify",
                 "Parameters" : [],
                 "ToolName" : "sign",
                 "ToolVersion" : "1.0"
             }
      ]
    SessionTimeout: 20

- task: NuGetCommand@2
  displayName: 'Publishing mdoc package to nuget.org'
  condition: eq(variables['mdocVersion.NeedUpdate'], true)
  inputs:
    command: 'push'
    packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
    nuGetFeedType: 'external'
    publishFeedCredentials: 'modc_nuget_org'