1

I want to create a private task that is only accessible in my organization, so I used the tfx command line tool as described here to install it. But when I do so using tfx extension install, I get this error (with the organization name and task ID redacted):

error: Error: The requested extension 'MyOrganizationName.MyTaskID' doesn't exist.

I Googled this error and found an article saying that a task must be published in order to install it - so which article is correct? Is there a way to install a task without sharing it outside my organization?

ekolis
  • 6,270
  • 12
  • 50
  • 101
  • Perhaps you should explain why you need this task to be private. It sounds to me that you may have some embedded URLs, secrets or other things you'd prefer not to publish. If this is the case, consider parameterizing these values instead. They could be stored in a Key Vault and linked to a variable group, or just configured as a regular variable group that can be shared across pipelines. – x0n Jun 26 '19 at 18:56
  • I suppose they could be parameterized; I'm not entirely sure why the task needs to be private - my boss just asked me to look into creating a private task to run some SQL version migration scripts against a database. So every time we want to release a version of our software, we need to run some SQL scripts against each instance that we are releasing (there are separate databases per client) and the SQL scripts are to make any changes to the test/production systems that were made to the development systems since the last release. – ekolis Jun 26 '19 at 18:59
  • 2
    Why does it have to be a custom task? Why can't it just be a source controlled script? I typically recommend against obfuscating deployment scripts behind custom tasks unless you intend for it to be consumed by a broader audience. – Daniel Mann Jun 26 '19 at 19:14
  • Hmm, that's a good question! I think the reason we want it to be a custom task is so it runs automatically as part of the release process; we're trying to automate this as much as possible. Is there a task which lets me run a custom script? – ekolis Jun 28 '19 at 05:17
  • 1
    Well sure, there are a few tasks that can run scripts. PowerShell task, Batch task, Command Line task, Shell Script, Azure SQL script -- search available tasks in your pipeline. – x0n Jun 28 '19 at 14:31

0 Answers0