Skip to content

Commit

Permalink
(maint) Setup Windows container build env
Browse files Browse the repository at this point in the history
 - Add Azure Pipelines invocation to enable environment setup
 - Relies on puppet_docker_tools 0.2.0+ which has removed calls to
   the docker-api gem and replaced them with vanilla docker command
   invocations, so as to support Windows
  • Loading branch information
Iristyle committed Oct 15, 2018
1 parent 7f16ba8 commit 8ecb943
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ steps:
Get-ChildItem Env: | % { Write-Host "$($_.Key): $($_.Value)" }
displayName: Diagnostic Host Information
name: hostinfo
- powershell: |
. ./docker/ci/build.ps1
Invoke-ContainerBuildSetup
displayName: Prepare Build Environment
name: build_prepare
16 changes: 16 additions & 0 deletions docker/ci/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ErrorActionPreference = 'Stop'

function Get-CurrentDirectory
{
$thisName = $MyInvocation.MyCommand.Name
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
}

# installs gems for build and test and grabs base images
function Invoke-ContainerBuildSetup
{
Push-Location (Get-CurrentDirectory)
bundle install --path '.bundle/gems'
bundle exec puppet-docker update-base-images ubuntu:16.04
Pop-Location
}

0 comments on commit 8ecb943

Please sign in to comment.