Skip to content

Commit 31c6e4d

Browse files
committed
Merged PR 161: Added preview of the new inherited process migration task for initial testing
- Added new vanilla build task by copying old one and changing the guid - Moving to adding new code - Created new task options, zeroed out powershell...
1 parent 51d0205 commit 31c6e4d

37 files changed

+3897
-63
lines changed

images/extension-icon.png

12 KB
Loading
4.66 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#Save-Module -Name VstsTaskSdk -Path ..\processtemplatetask\processtemplatetaskv2\ps_modules\
2+
#Set-Location C:\Users\MartinHinshelwoodnkd\source\repos\vsts-processtemplate-task\processtemplatetask\processtemplatetaskv2
3+
Import-Module .\\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1
4+
#Import-Module -Name VstsTaskSdk
5+
#### Usefull bits ##############
6+
7+
8+
9+
################################################
10+
############### Test Data Setup ################ www.itprotoday.com/microsoft-azure/read-secret-azure-key-vault-using-powershell
11+
################################################
12+
$TestDataFile = "c:\temp\pt\TestData.json"
13+
if (!(Test-Path $TestDataFile))
14+
{
15+
16+
$TestDataPS = new-object psobject
17+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name processFile -Value "c:\temp\pt\SLM-PT-VSTS-2017.7.0.zip"
18+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name AccountURL -Value "https://xxx-xxx-devbox.visualstudio.com"
19+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name ApiToken -Value "mytoken"
20+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name waitForUpdate -Value $true
21+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name waitForInterval -Value 10
22+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name overrideProcessGuid -Value ""
23+
Add-Member -InputObject $TestDataPS -MemberType NoteProperty -Name overrideProcessName -Value ""
24+
$TestDataJson = ConvertTo-Json $TestDataPS
25+
New-Item $TestDataFile -ItemType FILE -Value $TestDataJson -Force
26+
}
27+
$TestDataJson = Get-Content $TestDataFile -Raw
28+
$TestData = ConvertFrom-Json $TestDataJson
29+
################################################
30+
$erroractionpreference='stop'
31+
################################################
32+
########### setup inputs #######################
33+
################################################
34+
# Input 'MyInput':
35+
$env:INPUT_VstsXmlProcessService = 'EP1'
36+
$env:ENDPOINT_URL_EP1 = $TestData.AccountURL
37+
$env:ENDPOINT_AUTH_EP1 = "{ `"Parameters`": { `"ApiToken`": `"$($TestData.ApiToken)`"}, `"Scheme`": `"Token`" }"
38+
$env:ENDPOINT_DATA_EP1 = '{ "Key1": "Value1", "Key2": "Value2" }'
39+
40+
$env:INPUT_processFile = $TestData.processFile
41+
$env:INPUT_waitForUpdate = $TestData.waitForUpdate
42+
$env:INPUT_waitForInterval = $TestData.waitForInterval
43+
$env:INPUT_overrideProcessGuid = $TestData.overrideProcessGuid
44+
$env:INPUT_overrideProcessName = $TestData.overrideProcessName
45+
Invoke-vstsTaskScript -scriptBlock { . .\importProcess.ps1 } -Verbose
46+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-VstsTaskError ("Not yet implemented")

0 commit comments

Comments
 (0)