Skip to content

Commit

Permalink
Stages?
Browse files Browse the repository at this point in the history
  • Loading branch information
Windos committed Aug 4, 2020
1 parent 21b3500 commit dc175cf
Showing 1 changed file with 79 additions and 70 deletions.
149 changes: 79 additions & 70 deletions Azure-Pipelines/build.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,87 @@
jobs:
- job: ThawBread
displayName: 'Thow Frozen Bread'
pool: 'AzPS7.1-Preview'
steps:
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - Windows PowerShell'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - PowerShell 7.1 Preview 5'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
pwsh: true

- job: CookToast
stages:
- stage: ThawBread
displayName: 'Thaw Frozen Bread'
jobs:
- job: Srv2019-64bit
displayName: 'Server 2019 - 64 bit'
pool: 'AzPS7.1-Preview'
steps:
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - Windows PowerShell - x64'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - PowerShell 7.1 Preview 5 - x64'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
pwsh: true
- stage: CookToast
displayName: 'Cook Toast'
dependsOn: 'ThawBread'
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - Windows PowerShell'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test

- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - PowerShell Core'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
pwsh: true
- job: PreBuild
displayName: 'Pre-Build Tests'
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - Windows PowerShell'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
- job: 'BuildRetest'
displayName: 'Build & Re-test'
dependsOn: 'PreBuild'
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: 'Run tests (individual .ps1 files) - PowerShell Core'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Bootstrap -Test
pwsh: true

- task: PowerShell@2
displayName: 'Compile module'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Compile
- task: PowerShell@2
displayName: 'Compile module'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Compile

- task: PowerShell@2
displayName: 'Run tests (compiled .psm1)'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Test
- task: PowerShell@2
displayName: 'Run tests (compiled .psm1)'
inputs:
targetType: Inline
script: ./Azure-Pipelines/build.ps1 -Test

- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testRunner: NUnit
testResultsFiles: '**/TestResults.xml'
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testRunner: NUnit
testResultsFiles: '**/TestResults.xml'
condition: succeededOrFailed()

- task: Bash@3
displayName: 'Upload coverage to Codecov'
inputs:
targetType: 'filePath' # Optional. Options: filePath, inline
filePath: ./codecov.sh
arguments: -f coverage.json -t $(CODECOV_TOKEN)
#script: '# Write your commands here# Use the environment variables input below to pass secret variables to this script' # Required when targetType == Inline
#workingDirectory: # Optional
#failOnStderr: false # Optional
- task: Bash@3
displayName: 'Upload coverage to Codecov'
inputs:
targetType: 'filePath' # Optional. Options: filePath, inline
filePath: ./codecov.sh
arguments: -f coverage.json -t $(CODECOV_TOKEN)
#script: '# Write your commands here# Use the environment variables input below to pass secret variables to this script' # Required when targetType == Inline
#workingDirectory: # Optional
#failOnStderr: false # Optional

- task: PublishPipelineArtifact@0
displayName: 'Publish compiled module artifact'
inputs:
artifactName: 'BurntToast'
targetPath: ./BurntToast
condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
displayName: 'Publish compiled module artifact'
inputs:
artifactName: 'BurntToast'
targetPath: ./BurntToast
condition: succeededOrFailed()

- task: PublishPipelineArtifact@0
displayName: 'Publish Pipelines scripts as artifact'
inputs:
artifactName: 'PipelinesScripts'
targetPath: ./Azure-Pipelines
condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipelines scripts as artifact'
inputs:
artifactName: 'PipelinesScripts'
targetPath: ./Azure-Pipelines
condition: succeededOrFailed()

0 comments on commit dc175cf

Please sign in to comment.