-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from dbathgate/windows-support
Added support for buildpack to work on a windows stack
- Loading branch information
Showing
20 changed files
with
699 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
powershell.exe -ExecutionPolicy Unrestricted %~dp0\supply.ps1 %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
$buildDir=$args[0] | ||
$depsDir=$args[2] | ||
$indexDir=$args[3] | ||
|
||
# Validate that secret.yml exists | ||
if (![System.IO.File]::Exists("$buildDir\secrets.yml")) | ||
{ | ||
echo "Unable to find a secrets.yml...exiting" | ||
exit 1 | ||
} | ||
|
||
# Validate that VCAP_SERVICES contains 'cyberark-conjur' | ||
$vcapJson = echo $env:VCAP_SERVICES | ConvertFrom-Json | ||
|
||
if ("true" -ne $Env:CONJUR_BUILDPACK_BYPASS_SERVICE_CHECK ) | ||
{ | ||
if( !("cyberark-conjur" -in $vcapJson.PSobject.Properties.Name) ) | ||
{ | ||
echo "No credentials for cyberark-conjur service found in VCAP_SERVICES... exit" | ||
exit 1 | ||
} | ||
} | ||
|
||
pushd $depsDir\$indexDir | ||
mkdir profile.d | Out-Null | ||
copy $PSScriptRoot\..\lib\0001_retrieve-secrets.bat .\profile.d\ | ||
popd | ||
|
||
pushd $buildDir | ||
mkdir .conjur | Out-Null | ||
copy $PSScriptRoot\..\vendor\conjur-win-env.exe .\.conjur\ | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@echo off | ||
|
||
pushd %USERPROFILE%\app | ||
for /f "tokens=1,2 delims=: " %%a in ('.conjur\conjur-win-env.exe') do ( | ||
for /f %%i in ('powershell -executionpolicy Unrestricted -Command "[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String('%%b'))"') do ( | ||
set %%a=%%i | ||
) | ||
) | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.