Prisoner ZERO
Prisoner ZERO

Reputation: 14176

Build Task to Conditionally Copy Files to a Directory

I am completely new to vNext Tasks & need some help. I have some Custom Configuration values defined in my Solutions, as follows:

I have Service Account certificates in a set of folders separated by-environment. These need to be copied into a KEYS folder to replace the default files there.

FOR INSTANCE:

...and so on.

Upvotes: 2

Views: 319

Answers (1)

jessehouwing
jessehouwing

Reputation: 115037

Either stick the "variable part" in a variable. This would be possible if you have naming logic that allows you to do configuration by convention.

Or put the logic in a powershell script or shell script and run that to set the values of the variables. There are special logging commands you can use to set the value of a variable from your script:

write-host ##vso[task.setvariable variable=YourVariableName;]QA

Then use the variable either in the standard Copy Files task or stick the copy files logic in Powershell as well.

Upvotes: 1

Related Questions