onlyutkarsh / ExportImportBuildDefinition

Export and Import your build definitions. Useful for recreating all the build steps, variables, schedules, etc in a different team project/account.
http://bit.ly/exportimportbuild
Other
17 stars 8 forks source link

Export/Import with Secret Variable issue with V2.x agents #29

Closed Mailhot01 closed 6 years ago

Mailhot01 commented 6 years ago

Installed product versions

Description

Created a build definition by importing a template. Build on a V1.x agent and a V2.x agent. The V2.x agent builds log show that secret variables passed to scripts are empty.

Steps to recreate

  1. Make sure you build agent is v2.x
  2. Create a new build definition
  3. Add a Secret Variable named Password
  4. Pass the secret variable to a script using $(Password)
  5. build and verify that the secret variable was passed
  6. Export the build definition
  7. Import to a new build definition
  8. build and verify that the secret variable was passed properly (FAIL, secret variable empty)

Current behavior

We noted that secret variable were not working for all build definition which we imported from a saved template. The build definition actually shows the secret variable properly, but the end results show that the script only get empty strings.

Expected behavior

Secret Variable should work the same as the original build definition

onlyutkarsh commented 6 years ago

Hey @Mailhot01

Secret variables are:

Hence they are not available for any extensions or tasks to read the value. So this cannot be supported by the extension.

Mailhot01 commented 6 years ago

Thank you for the quick reply,

Your explanation makes perfect sens in that's it is not an issue but a desired limitation.

But in the end, once imported, the secret variable IS present and looks ok. Maybe the import should discard any secret variable and put empty its value field ?

For anyone else interested in this report, know that you simply have to manually delete and recreate the secret variable after the import.

Thank you for the plug-in, it certainly saved us some time by deploying 200+ build def.