forked from puppetlabs/puppet-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (54 loc) · 1.89 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
pool:
# self-hosted agent on Windows 10 1809+ environment
# includes newer Docker engine with LCOW enabled, new build of LCOW image
# includes Ruby 2.5, Go 1.10, Node.js 10.10, hadolint
name: Default
variables:
NAMESPACE: puppet
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
- powershell: |
$gemfile = Join-Path -Path (Get-Location) -ChildPath 'docker/Gemfile'
$gempath = Join-Path -Path (Get-Location) -ChildPath 'docker/.bundle/gems'
bundle config --local gemfile $gemfile
bundle config --local path $gempath
bundle install
displayName: Fetch Dependencies
name: fetch_deps
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Write-HostDiagnostics
displayName: Diagnostic Host Information
name: hostinfo
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Lint-Dockerfile -Name puppet-runtime
displayName: Lint Dockerfile
name: lint_dockerfile
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Build-Container -Name puppet-runtime -Namespace $ENV:NAMESPACE
displayName: Build Container
name: build_container
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Initialize-TestEnv
displayName: Prepare Test Environment
name: test_prepare
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Invoke-ContainerTest -Name puppet-runtime -Namespace $ENV:NAMESPACE
displayName: Test Puppet Runtime
name: test_container
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'docker/TEST-*.xml'
testRunTitle: Puppet Runtime Test Results
- powershell: |
. "$(bundle show pupperware)/ci/build.ps1"
Clear-ContainerBuilds -Name puppet-runtime -Namespace $ENV:NAMESPACE
displayName: Container Cleanup
condition: always()