-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
86 lines (83 loc) · 2.53 KB
/
azure-pipelines.yml
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
---
variables:
BUNDLE_PATH: $(Pipeline.Workspace)/.bundle
trigger:
batch: true
branches:
include:
- main
pr:
autoCancel: true
branches:
include:
- main
stages:
- stage: Build
jobs:
- job: Validate
strategy:
matrix:
Windows_Integration:
version: 2.6
imageName: 'windows-2019'
task: windows_integration.bat
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.appveyor.yml
pool:
vmImage: $(imageName)
steps:
- task: UseRubyVersion@0
inputs:
versionSpec: $(version)
addToPath: true
- task: CacheBeta@0
inputs:
key: gems | $(Agent.OS) | "$(version)" | kitchen-pester.gemspec
path: $(BUNDLE_PATH)
displayName: Cache gems
- script: |
echo "ruby version:"
ruby --version
echo "gem version:"
gem --version
displayName: Show Ruby Version
- script: |
gem install bundler --quiet
echo "bundler version:"
bundler --version
displayName: Install Bundler
- script: |
bundle install || bundle install || bundle install
displayName: Bundle Install Dependencies
- script: |
./support/ci/$(task)
displayName: Run Tests
env:
SPEC_OPTS: --format progress
- task: PublishTestResults@2
inputs:
testResultsFormat: NUnit
testResultsFiles: 'testresults/**/PesterTestResults.xml'
- job: Package
dependsOn: Validate
condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/main'), notIn(variables['Build.Reason'], 'PullRequest'))
pool:
imageName: 'ubuntu-16.04'
steps:
- task: UseRubyVersion@0
inputs:
versionSpec: 2.6
addToPath: true
- script: |
gem install bundler --quiet
bundle install || bundle install || bundle install
bundle exec rake build
displayName: Package Gem
- task: PublishBuildArtifacts@1
displayName: "Publish Artifact: Release Build"
inputs:
PathtoPublish: ./pkg
ArtifactName: gem
ArtifactType: Container