Removing unnecessary parameters from VSTS task group












7















I have a task group which contains besides other tasks the Azure Key Vault task and the Azure Resource Group Deployment task. In the latter I want to override some parameters in the ARM template with values which come from the key vault.



The Secrets filter field in the Azure Key Vault task looks like secret1,secret2,secret3. These secrets are available as variables in other tasks with the same name like the secret names. So the Override template parameters field within the Azure Resource Group Deployment task has the value -p1 $(secret1) -p2 $(secret2) -p3 $(secret3).



The problem is that VSTS automatically picks the three variables as parameters for the task group. I don't want this to happen. These variables will be set and read out within the task group itself. They are like private fields within a class.



One way would be to remove the Azure Key Vault task and use Build and Release > Library > Variable groups instead. But there is no way to link variable groups to task groups.










share|improve this question























  • Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

    – Marina Liu - MSFT
    Dec 20 '17 at 8:45











  • Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

    – Yavuz
    Dec 20 '17 at 10:52
















7















I have a task group which contains besides other tasks the Azure Key Vault task and the Azure Resource Group Deployment task. In the latter I want to override some parameters in the ARM template with values which come from the key vault.



The Secrets filter field in the Azure Key Vault task looks like secret1,secret2,secret3. These secrets are available as variables in other tasks with the same name like the secret names. So the Override template parameters field within the Azure Resource Group Deployment task has the value -p1 $(secret1) -p2 $(secret2) -p3 $(secret3).



The problem is that VSTS automatically picks the three variables as parameters for the task group. I don't want this to happen. These variables will be set and read out within the task group itself. They are like private fields within a class.



One way would be to remove the Azure Key Vault task and use Build and Release > Library > Variable groups instead. But there is no way to link variable groups to task groups.










share|improve this question























  • Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

    – Marina Liu - MSFT
    Dec 20 '17 at 8:45











  • Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

    – Yavuz
    Dec 20 '17 at 10:52














7












7








7


1






I have a task group which contains besides other tasks the Azure Key Vault task and the Azure Resource Group Deployment task. In the latter I want to override some parameters in the ARM template with values which come from the key vault.



The Secrets filter field in the Azure Key Vault task looks like secret1,secret2,secret3. These secrets are available as variables in other tasks with the same name like the secret names. So the Override template parameters field within the Azure Resource Group Deployment task has the value -p1 $(secret1) -p2 $(secret2) -p3 $(secret3).



The problem is that VSTS automatically picks the three variables as parameters for the task group. I don't want this to happen. These variables will be set and read out within the task group itself. They are like private fields within a class.



One way would be to remove the Azure Key Vault task and use Build and Release > Library > Variable groups instead. But there is no way to link variable groups to task groups.










share|improve this question














I have a task group which contains besides other tasks the Azure Key Vault task and the Azure Resource Group Deployment task. In the latter I want to override some parameters in the ARM template with values which come from the key vault.



The Secrets filter field in the Azure Key Vault task looks like secret1,secret2,secret3. These secrets are available as variables in other tasks with the same name like the secret names. So the Override template parameters field within the Azure Resource Group Deployment task has the value -p1 $(secret1) -p2 $(secret2) -p3 $(secret3).



The problem is that VSTS automatically picks the three variables as parameters for the task group. I don't want this to happen. These variables will be set and read out within the task group itself. They are like private fields within a class.



One way would be to remove the Azure Key Vault task and use Build and Release > Library > Variable groups instead. But there is no way to link variable groups to task groups.







azure-devops azure-pipelines-build-task






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 19 '17 at 12:14









YavuzYavuz

17511




17511













  • Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

    – Marina Liu - MSFT
    Dec 20 '17 at 8:45











  • Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

    – Yavuz
    Dec 20 '17 at 10:52



















  • Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

    – Marina Liu - MSFT
    Dec 20 '17 at 8:45











  • Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

    – Yavuz
    Dec 20 '17 at 10:52

















Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

– Marina Liu - MSFT
Dec 20 '17 at 8:45





Even you remove Azure Key Vault task from task group, the secret variables still can be used (if the task is ahead of the task group). And what do you mean there is no way to link variable groups to task groups? If you already link variable groups to the build definition, you can also use the variables in task group.

– Marina Liu - MSFT
Dec 20 '17 at 8:45













Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

– Yavuz
Dec 20 '17 at 10:52





Edit a release definition. Go to Variables -> Variable groups. There you can link variable groups and use them. There is no such a way for task groups. However I want to remove the extra parameters secret1, secret2, and secret3 from the task group. Exporting the task group, editing the json (removing unwanted inputs), and importing the task group again is also not working.

– Yavuz
Dec 20 '17 at 10:52












2 Answers
2






active

oldest

votes


















2














I think there is no way to remove variables from the parameters of the task group. This has to do with the inner workings of how VSTS processes variables within task groups. The blog post VSTS/TFS: Understanding Task Groups and its various use cases with setvariable logging command gives some insights of how variables within task groups behave. In the same blog post there is a workaround to what I want to achieve.



The task group will have the three additional parameters secret1, secret2, and secret3. When I add the task group to a release definition I have to fill in these values:





  • $(secret1) for the parameter secret1


  • $(secret2) for the parameter secret2


  • $(secret3) for the parameter secret3


To reduce errors and improve experience you can set these values as default values for the parameters in the task group. This way you only have to fill out the remaining required parameters which are needed for the task group.



Ugly, but works.






share|improve this answer


























  • Sadly, the link is dead.

    – stealththeninja
    Dec 28 '18 at 1:00



















0














I ran into the same issue. I found that you can remove unnecessary parameters (i.e. parameters supplied by variable groups) by exporting the Task Group to a JSON text file and reimporting.



Just edit the JSON file in notepad++, or your favorite JSON editor, and remove any unnecessary parameters before reimporting. After the import, they are gone.



Also note, that you could probably add new parameters the same way but I haven't tried it.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47886801%2fremoving-unnecessary-parameters-from-vsts-task-group%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    I think there is no way to remove variables from the parameters of the task group. This has to do with the inner workings of how VSTS processes variables within task groups. The blog post VSTS/TFS: Understanding Task Groups and its various use cases with setvariable logging command gives some insights of how variables within task groups behave. In the same blog post there is a workaround to what I want to achieve.



    The task group will have the three additional parameters secret1, secret2, and secret3. When I add the task group to a release definition I have to fill in these values:





    • $(secret1) for the parameter secret1


    • $(secret2) for the parameter secret2


    • $(secret3) for the parameter secret3


    To reduce errors and improve experience you can set these values as default values for the parameters in the task group. This way you only have to fill out the remaining required parameters which are needed for the task group.



    Ugly, but works.






    share|improve this answer


























    • Sadly, the link is dead.

      – stealththeninja
      Dec 28 '18 at 1:00
















    2














    I think there is no way to remove variables from the parameters of the task group. This has to do with the inner workings of how VSTS processes variables within task groups. The blog post VSTS/TFS: Understanding Task Groups and its various use cases with setvariable logging command gives some insights of how variables within task groups behave. In the same blog post there is a workaround to what I want to achieve.



    The task group will have the three additional parameters secret1, secret2, and secret3. When I add the task group to a release definition I have to fill in these values:





    • $(secret1) for the parameter secret1


    • $(secret2) for the parameter secret2


    • $(secret3) for the parameter secret3


    To reduce errors and improve experience you can set these values as default values for the parameters in the task group. This way you only have to fill out the remaining required parameters which are needed for the task group.



    Ugly, but works.






    share|improve this answer


























    • Sadly, the link is dead.

      – stealththeninja
      Dec 28 '18 at 1:00














    2












    2








    2







    I think there is no way to remove variables from the parameters of the task group. This has to do with the inner workings of how VSTS processes variables within task groups. The blog post VSTS/TFS: Understanding Task Groups and its various use cases with setvariable logging command gives some insights of how variables within task groups behave. In the same blog post there is a workaround to what I want to achieve.



    The task group will have the three additional parameters secret1, secret2, and secret3. When I add the task group to a release definition I have to fill in these values:





    • $(secret1) for the parameter secret1


    • $(secret2) for the parameter secret2


    • $(secret3) for the parameter secret3


    To reduce errors and improve experience you can set these values as default values for the parameters in the task group. This way you only have to fill out the remaining required parameters which are needed for the task group.



    Ugly, but works.






    share|improve this answer















    I think there is no way to remove variables from the parameters of the task group. This has to do with the inner workings of how VSTS processes variables within task groups. The blog post VSTS/TFS: Understanding Task Groups and its various use cases with setvariable logging command gives some insights of how variables within task groups behave. In the same blog post there is a workaround to what I want to achieve.



    The task group will have the three additional parameters secret1, secret2, and secret3. When I add the task group to a release definition I have to fill in these values:





    • $(secret1) for the parameter secret1


    • $(secret2) for the parameter secret2


    • $(secret3) for the parameter secret3


    To reduce errors and improve experience you can set these values as default values for the parameters in the task group. This way you only have to fill out the remaining required parameters which are needed for the task group.



    Ugly, but works.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 20 '17 at 15:48

























    answered Dec 20 '17 at 15:27









    YavuzYavuz

    17511




    17511













    • Sadly, the link is dead.

      – stealththeninja
      Dec 28 '18 at 1:00



















    • Sadly, the link is dead.

      – stealththeninja
      Dec 28 '18 at 1:00

















    Sadly, the link is dead.

    – stealththeninja
    Dec 28 '18 at 1:00





    Sadly, the link is dead.

    – stealththeninja
    Dec 28 '18 at 1:00













    0














    I ran into the same issue. I found that you can remove unnecessary parameters (i.e. parameters supplied by variable groups) by exporting the Task Group to a JSON text file and reimporting.



    Just edit the JSON file in notepad++, or your favorite JSON editor, and remove any unnecessary parameters before reimporting. After the import, they are gone.



    Also note, that you could probably add new parameters the same way but I haven't tried it.






    share|improve this answer






























      0














      I ran into the same issue. I found that you can remove unnecessary parameters (i.e. parameters supplied by variable groups) by exporting the Task Group to a JSON text file and reimporting.



      Just edit the JSON file in notepad++, or your favorite JSON editor, and remove any unnecessary parameters before reimporting. After the import, they are gone.



      Also note, that you could probably add new parameters the same way but I haven't tried it.






      share|improve this answer




























        0












        0








        0







        I ran into the same issue. I found that you can remove unnecessary parameters (i.e. parameters supplied by variable groups) by exporting the Task Group to a JSON text file and reimporting.



        Just edit the JSON file in notepad++, or your favorite JSON editor, and remove any unnecessary parameters before reimporting. After the import, they are gone.



        Also note, that you could probably add new parameters the same way but I haven't tried it.






        share|improve this answer















        I ran into the same issue. I found that you can remove unnecessary parameters (i.e. parameters supplied by variable groups) by exporting the Task Group to a JSON text file and reimporting.



        Just edit the JSON file in notepad++, or your favorite JSON editor, and remove any unnecessary parameters before reimporting. After the import, they are gone.



        Also note, that you could probably add new parameters the same way but I haven't tried it.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 18 at 19:51

























        answered Jan 18 at 18:58









        Chris GesslerChris Gessler

        18.1k33668




        18.1k33668






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47886801%2fremoving-unnecessary-parameters-from-vsts-task-group%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Liquibase includeAll doesn't find base path

            How to use setInterval in EJS file?

            Petrus Granier-Deferre