• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

samsmithnz / AzurePipelinesToGitHubActionsConverterWeb / 16726922363

04 Aug 2025 03:07PM UTC coverage: 0.0% (-92.4%) from 92.429%
16726922363

push

github

web-flow
Bump AzurePipelinesToGitHubActionsConverter.Core from 1.3.65 to 1.3.66 (#351)

---
updated-dependencies:
- dependency-name: AzurePipelinesToGitHubActionsConverter.Core
  dependency-version: 1.3.66
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

0 of 62 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 638 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/PipelinesToActions/PipelinesToActions/Models/Examples.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Threading.Tasks;
5

6
namespace PipelinesToActionsWeb.Models
7
{
8
    public class Examples
9
    {
10
        public static string CIExample()
11
        {
×
12
            string yaml = @"
×
13
trigger:
×
14
- main
×
15

×
16
variables:
×
17
  buildConfiguration: 'Release'
×
18
  buildPlatform: 'Any CPU'
×
19

×
20
jobs:
×
21
- job: Build
×
22
  displayName: 'Build job'
×
23
  pool:
×
24
    vmImage: windows-latest
×
25
  steps:
×
26
  - task: DotNetCoreCLI@2
×
27
    displayName: 'Test dotnet code projects'
×
28
    inputs:
×
29
      command: test
×
30
      projects: |
×
31
       MyProject/MyProject.Tests/MyProject.Tests.csproj
×
32
      arguments: --configuration $(buildConfiguration) 
×
33
  - task: DotNetCoreCLI@2
×
34
    displayName: 'Publish dotnet core projects'
×
35
    inputs:
×
36
      command: publish
×
37
      publishWebProjects: false
×
38
      projects: |
×
39
        MyProject/MyProject.Web/MyProject.Web.csproj
×
40
      arguments: --configuration $(buildConfiguration) --output $(build.artifactstagingdirectory) 
×
41
      zipAfterPublish: true
×
42
  - task: PublishBuildArtifacts@1
×
43
    displayName: 'Publish Artifact'
×
44
    inputs:
×
45
      PathtoPublish: '$(build.artifactstagingdirectory)'
×
46
";
×
47
            return yaml;
×
48
        }
×
49

50
        public static string CDExample()
51
        {
×
52
            string yaml = @"
×
53
trigger:
×
54
- main
×
55

×
56
variables:
×
57
  buildConfiguration: 'Release'
×
58
  buildPlatform: 'Any CPU'
×
59

×
60
jobs:
×
61
- job: Deploy
×
62
  displayName: ""Deploy job""
×
63
  pool:
×
64
    vmImage: ubuntu-latest
×
65
  condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
×
66
  variables:
×
67
    AppSettings.Environment: 'data'
×
68
    ArmTemplateResourceGroupLocation: 'eu'
×
69
    ResourceGroupName: 'MyProjectRG'
×
70
    WebsiteName: 'myproject-web'
×
71
  steps:
×
72
  - task: DownloadBuildArtifacts@0
×
73
    displayName: 'Download the build artifacts'
×
74
    inputs:
×
75
      buildType: 'current'
×
76
      downloadType: 'single'
×
77
      artifactName: 'drop'
×
78
      downloadPath: '$(build.artifactstagingdirectory)'
×
79
  - task: AzureRmWebAppDeployment@3
×
80
    displayName: 'Azure App Service Deploy: web site'
×
81
    inputs:
×
82
      azureSubscription: 'connection to Azure Portal'
×
83
      WebAppName: $(WebsiteName)
×
84
      DeployToSlotFlag: true
×
85
      ResourceGroupName: $(ResourceGroupName)
×
86
      SlotName: 'staging'
×
87
      Package: '$(build.artifactstagingdirectory)/drop/MyProject.Web.zip'
×
88
      TakeAppOfflineFlag: true
×
89
      JSONFiles: '**/appsettings.json'        
×
90
  - task: AzureAppServiceManage@0
×
91
    displayName: 'Swap Slots: website'
×
92
    inputs:
×
93
      azureSubscription: 'connection to Azure Portal'
×
94
      WebAppName: $(WebsiteName)
×
95
      ResourceGroupName: $(ResourceGroupName)
×
96
      SourceSlot: 'staging'
×
97
";
×
98
            return yaml;
×
99
        }
×
100

101
        public static string CICDExample()
102
        {
×
103
            string yaml = @"
×
104
trigger:
×
105
- main
×
106
pr:
×
107
  branches:
×
108
    include:
×
109
    - '*'  # must quote since ""*"" is a YAML reserved character; we want a string
×
110

×
111
variables:
×
112
  buildConfiguration: 'Release'
×
113
  buildPlatform: 'Any CPU'
×
114

×
115
stages:
×
116
- stage: Build
×
117
  displayName: 'Build/Test Stage'
×
118
  jobs:
×
119
  - job: Build
×
120
    displayName: 'Build job'
×
121
    pool:
×
122
      vmImage: windows-latest
×
123
    steps:
×
124

×
125
    - task: CopyFiles@2
×
126
      displayName: 'Copy environment ARM template files to: $(build.artifactstagingdirectory)'
×
127
      inputs:
×
128
        SourceFolder: '$(system.defaultworkingdirectory)\MyProject\MyProject.ARMTemplates'
×
129
        Contents: '**\*' # **\* = Copy all files and all files in sub directories
×
130
        TargetFolder: '$(build.artifactstagingdirectory)\ARMTemplates'
×
131

×
132
    - task: DotNetCoreCLI@2
×
133
      displayName: 'Test dotnet code projects'
×
134
      inputs:
×
135
        command: test
×
136
        projects: |
×
137
         MyProject/MyProject.Tests/MyProject.Tests.csproj
×
138
        arguments: --configuration $(buildConfiguration) 
×
139

×
140
    - task: DotNetCoreCLI@2
×
141
      displayName: 'Publish dotnet core projects'
×
142
      inputs:
×
143
        command: publish
×
144
        publishWebProjects: false
×
145
        projects: |
×
146
         MyProject/MyProject.Web/MyProject.Web.csproj
×
147
        arguments: --configuration $(buildConfiguration) --output $(build.artifactstagingdirectory) 
×
148
        zipAfterPublish: true
×
149

×
150
    - task: DotNetCoreCLI@2
×
151
      displayName: 'Publish dotnet core functional tests project'
×
152
      inputs:
×
153
        command: publish
×
154
        publishWebProjects: false
×
155
        projects: |
×
156
         MyProject/MyProject.FunctionalTests/MyProject.FunctionalTests.csproj
×
157
        arguments: '--configuration $(buildConfiguration) --output $(build.artifactstagingdirectory)/FunctionalTests'
×
158
        zipAfterPublish: false
×
159

×
160
    - task: CopyFiles@2
×
161
      displayName: 'Copy Selenium Files to: $(build.artifactstagingdirectory)/FunctionalTests/MyProject.FunctionalTests'
×
162
      inputs:
×
163
        SourceFolder: 'MyProject/MyProject.FunctionalTests/bin/$(buildConfiguration)/netcoreapp3.0'
×
164
        Contents: '*chromedriver.exe*'
×
165
        TargetFolder: '$(build.artifactstagingdirectory)/FunctionalTests/MyProject.FunctionalTests'
×
166

×
167
    # Publish the artifacts
×
168
    - task: PublishBuildArtifacts@1
×
169
      displayName: 'Publish Artifact'
×
170
      inputs:
×
171
        PathtoPublish: '$(build.artifactstagingdirectory)'
×
172

×
173
- stage: Deploy
×
174
  displayName: 'Deploy Prod'
×
175
  condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
×
176
  jobs:
×
177
  - job: Deploy
×
178
    displayName: ""Deploy job""
×
179
    pool:
×
180
      vmImage: ubuntu-latest  
×
181
    variables:
×
182
      AppSettings.Environment: 'data'
×
183
      ArmTemplateResourceGroupLocation: 'eu'
×
184
      ResourceGroupName: 'MyProjectRG'
×
185
      WebsiteName: 'myproject-web'
×
186
    steps:
×
187
    - task: DownloadBuildArtifacts@0
×
188
      displayName: 'Download the build artifacts'
×
189
      inputs:
×
190
        buildType: 'current'
×
191
        downloadType: 'single'
×
192
        artifactName: 'drop'
×
193
        downloadPath: '$(build.artifactstagingdirectory)'
×
194
    - task: AzureResourceGroupDeployment@2
×
195
      displayName: 'Deploy ARM Template to resource group'
×
196
      inputs:
×
197
        azureSubscription: 'connection to Azure Portal'
×
198
        resourceGroupName: $(ResourceGroupName)
×
199
        location: '[resourceGroup().location]'
×
200
        csmFile: '$(build.artifactstagingdirectory)/drop/ARMTemplates/azuredeploy.json'
×
201
        csmParametersFile: '$(build.artifactstagingdirectory)/drop/ARMTemplates/azuredeploy.parameters.json'
×
202
        overrideParameters: '-environment $(AppSettings.Environment) -locationShort $(ArmTemplateResourceGroupLocation)'
×
203
    - task: AzureRmWebAppDeployment@3
×
204
      displayName: 'Azure App Service Deploy: web site'
×
205
      inputs:
×
206
        azureSubscription: 'connection to Azure Portal'
×
207
        WebAppName: $(WebsiteName)
×
208
        DeployToSlotFlag: true
×
209
        ResourceGroupName: $(ResourceGroupName)
×
210
        SlotName: 'staging'
×
211
        Package: '$(build.artifactstagingdirectory)/drop/MyProject.Web.zip'
×
212
        TakeAppOfflineFlag: true
×
213
        JSONFiles: '**/appsettings.json'        
×
214
    - task: VSTest@2
×
215
      displayName: 'Run functional smoke tests on website'
×
216
      inputs:
×
217
        searchFolder: '$(build.artifactstagingdirectory)'
×
218
        testAssemblyVer2: |
×
219
          **\MyProject.FunctionalTests\MyProject.FunctionalTests.dll
×
220
        uiTests: true
×
221
        runSettingsFile: '$(build.artifactstagingdirectory)/drop/FunctionalTests/MyProject.FunctionalTests/test.runsettings'
×
222
    - task: AzureAppServiceManage@0
×
223
      displayName: 'Swap Slots: website'
×
224
      inputs:
×
225
        azureSubscription: 'connection to Azure Portal'
×
226
        WebAppName: $(WebsiteName)
×
227
        ResourceGroupName: $(ResourceGroupName)
×
228
        SourceSlot: 'staging'
×
229
";
×
230
            return yaml;
×
231
        }
×
232

233
        public static string DockerExample()
234
        {
×
235
            string yaml = @"
×
236
trigger:
×
237
- main
×
238

×
239
resources:
×
240
- repo: self
×
241

×
242
variables:
×
243
  # Container registry service connection established during pipeline creation
×
244
  dockerRegistryServiceConnection: '{{ containerRegistryConnection.Id }}'
×
245
  imageRepository: '{{#toAlphaNumericString imageRepository 50}}{{/toAlphaNumericString}}'
×
246
  containerRegistry: '{{ containerRegistryConnection.Authorization.Parameters.loginServer }}'
×
247
  dockerfilePath: '{{ dockerfilePath }}'
×
248
  tag: '$(Build.BuildId)'
×
249

×
250
jobs:
×
251
- job: BuildJob
×
252
  displayName: Build and push
×
253
  pool:
×
254
    vmImage: ubuntu-latest
×
255
  steps:
×
256
  - task: Docker@2
×
257
    displayName: Build and push an image to container registry
×
258
    inputs:
×
259
      command: buildAndPush
×
260
      repository: $(imageRepository)
×
261
      dockerfile: $(dockerfilePath)
×
262
      containerRegistry: $(dockerRegistryServiceConnection)
×
263
      tags: |
×
264
        $(tag)
×
265
";
×
266
            return yaml;
×
267
        }
×
268

269
        //https://github.com/microsoft/azure-pipelines-yaml/blob/master/templates/.net-desktop.yml
270
        public static string DotNetFrameworkDesktopExample()
271
        {
×
272
            string yaml = @"
×
273
# .NET Desktop
×
274
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
×
275
# Add steps that publish symbols, save build artifacts, and more:
×
276
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
×
277

×
278
trigger:
×
279
- main
×
280

×
281
pool:
×
282
  vmImage: 'windows-latest'
×
283

×
284
variables:
×
285
  solution: '**/MyProject.sln'
×
286
  buildPlatform: 'Any CPU'
×
287
  buildConfiguration: 'Release'
×
288

×
289
steps:
×
290
- task: NuGetToolInstaller@1
×
291

×
292
- task: NuGetCommand@2
×
293
  inputs:
×
294
    restoreSolution: '$(solution)'
×
295

×
296
- task: VSBuild@1
×
297
  inputs:
×
298
    solution: '$(solution)'
×
299
    platform: '$(buildPlatform)'
×
300
    configuration: '$(buildConfiguration)'
×
301
";
×
302
            return yaml;
×
303
        }
×
304

305
        //https://github.com/microsoft/azure-pipelines-yaml/blob/master/templates/android.yml
306
        public static string GradleExample()
307
        {
×
308
            string yaml = @"
×
309
# Android
×
310
# Build your Android project with Gradle.
×
311
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
×
312
# https://docs.microsoft.com/azure/devops/pipelines/languages/android
×
313

×
314
trigger:
×
315
- main
×
316

×
317
pool:
×
318
  vmImage: 'macos-latest'
×
319

×
320
steps:
×
321
- task: Gradle@2
×
322
  inputs:
×
323
    workingDirectory: ''
×
324
    gradleWrapperFile: 'gradlew'
×
325
    gradleOptions: '-Xmx3072m'
×
326
    publishJUnitResults: false
×
327
    testResultsFiles: '**/TEST-*.xml'
×
328
    tasks: 'assembleDebug'
×
329
";
×
330
            return yaml;
×
331
        }
×
332

333
        //https://github.com/microsoft/azure-pipelines-yaml/blob/master/templates/asp.net-core.yml
334
        public static string ASPDotNetCoreSimpleExample()
335
        {
×
336
            string yaml = @"
×
337
# ASP.NET Core
×
338
# Build and test ASP.NET Core projects targeting .NET Core.
×
339
# Add steps that run tests, create a NuGet package, deploy, and more:
×
340
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
×
341

×
342
trigger:
×
343
- main
×
344

×
345
pool:
×
346
  vmImage: 'ubuntu-latest'
×
347

×
348
variables:
×
349
  buildConfiguration: 'Release'
×
350

×
351
steps:
×
352
- script: dotnet build --configuration $(buildConfiguration)
×
353
  displayName: 'dotnet build $(buildConfiguration)'
×
354
";
×
355
            return yaml;
×
356
        }
×
357

358
        //https://github.com/microsoft/azure-pipelines-yaml/blob/master/templates/ant.yml
359
        public static string AntExample()
360
        {
×
361
            string yaml = @"
×
362
# Ant
×
363
# Build your Java projects and run tests with Apache Ant.
×
364
# Add steps that save build artifacts and more:
×
365
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
×
366

×
367
trigger:
×
368
- main
×
369

×
370
pool:
×
371
  vmImage: 'ubuntu-latest'
×
372

×
373
steps:
×
374
- task: Ant@1
×
375
  inputs:
×
376
    workingDirectory: ''
×
377
    buildFile: 'build.xml'
×
378
    javaHomeOption: 'JDKVersion'
×
379
    jdkVersionOption: '1.8'
×
380
    jdkArchitectureOption: 'x64'
×
381
";
×
382
            return yaml;
×
383
        }
×
384

385
        public static string ASPDotNetFrameworkExample()
386
        {
×
387
            string yaml = @"
×
388
ASPDotNetFrameworkExample Coming soon
×
389
";
×
390
            return yaml;
×
391
        }
×
392

393
        public static string NodeExample()
394
        {
×
395
            string yaml = @"
×
396
trigger:
×
397
- main
×
398

×
399
pool:
×
400
  vmImage: 'ubuntu-latest'
×
401

×
402
steps:
×
403
- task: NodeTool@0
×
404
  inputs:
×
405
    versionSpec: '10.x'
×
406
  displayName: 'Install Node.js'
×
407

×
408
- script: |
×
409
    npm install
×
410
    npm start
×
411
  displayName: 'npm install and start'
×
412
";
×
413
            return yaml;
×
414
        }
×
415

416
        public static string MavenExample()
417
        {
×
418
            string yaml = @"
×
419
trigger:
×
420
- main
×
421

×
422
pool:
×
423
  vmImage: 'ubuntu-latest'
×
424

×
425
steps:
×
426
- task: Maven@3
×
427
  inputs:
×
428
    mavenPomFile: 'pom.xml'
×
429
    mavenOptions: '-Xmx3072m'
×
430
    javaHomeOption: 'JDKVersion'
×
431
    jdkVersionOption: '1.8'
×
432
    jdkArchitectureOption: 'x64'
×
433
    publishJUnitResults: true
×
434
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
×
435
    goals: 'package'
×
436
";
×
437
            return yaml;
×
438
        }
×
439

440
        public static string PythonExample()
441
        {
×
442
            string yaml = @"
×
443
trigger:
×
444
- main
×
445

×
446
pool:
×
447
  vmImage: 'ubuntu-latest'
×
448
strategy:
×
449
  matrix:
×
450
    Python35:
×
451
      PYTHON_VERSION: '3.5'
×
452
    Python36:
×
453
      PYTHON_VERSION: '3.6'
×
454
    Python37:
×
455
      PYTHON_VERSION: '3.7'
×
456
  maxParallel: 3
×
457

×
458
steps:
×
459
- task: UsePythonVersion@0
×
460
  inputs:
×
461
    versionSpec: '$(PYTHON_VERSION)'
×
462
    addToPath: true
×
463
    architecture: 'x64'
×
464
- task: PythonScript@0
×
465
  inputs:
×
466
    scriptSource: 'filePath'
×
467
    scriptPath: 'Hello.py'
×
468
";
×
469
            return yaml;
×
470
        }
×
471

472
        public static string RubyExample()
473
        {
×
474
            string yaml = @"
×
475
trigger:
×
476
- main
×
477

×
478
pool:
×
479
  vmImage: 'ubuntu-latest'
×
480

×
481
steps:
×
482
- task: UseRubyVersion@0
×
483
  inputs:
×
484
    versionSpec: '>= 2.5'
×
485
- script: ruby HelloWorld.rb
×
486
";
×
487
            return yaml;
×
488
        }
×
489

490
    }
491
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc