Forum Discussion

justanotherdaytt's avatar
justanotherdaytt
Copper Contributor
Feb 16, 2022

how to workaround to make the classic release pipeline variable works in my REST API automation?

trying to configure the release pipeline by using some pipeline variable.

the problem is my REST API PEGA automation package contains mainly these 2 files.

1. prpcServiceUtils.bat

2. prpcServiceUtils.properties.

 

in the pipeline I have directed to execute the prpcServiceUtils.bat using the ADO Server batch script template. The problems starts here, the username & password does not reside at the prpcServiceUtils.bat but is on the prpcServiceUtils.properties. So how am I going to remove inputting clear plain text on the properties file and use the pipeline variable? Basically, the REST API works by triggering the prpcServiceUtils.bat and it will make reference to the prpcServiceUtils.properties. 

1 Reply

  • anyway took a baby steps, to create a sample.ps1 and wonders why the release pipeline variable are not being used.

    sample.psi
    ((Get-Content -path C:\workfolder\r1\a\_helloWorld02\some.properties -Raw) -replace '#username#', $username) | Set-Content -path C:\workfolder\r1\a\_helloWorld02\some.properties
    ((Get-Content -path C:\workfolder\r1\a\_helloWorld02\some.properties -Raw) -replace '#password#', $password) | Set-Content -path C:\workfolder\r1\a\_helloWorld02\some.properties
    Get-Content -path C:\workfolder\r1\a\_helloWorld02\some.properties

    the $username & $password is set in the release pipeline variable but seem like the value that was set did not pass on to the sample.ps1 script to be used. Please further advice ?

Resources