0

What is the best way in Azure devops to accept multiple input and create a json file out of it

My requirement is that i need to lis the env and ask user to enter the coresponding target version . Is there any possible way in Azure devops to acieve this

I want to create a json file as given below

  {
   "Test" :[{
        "env" :"1",
        "Old": "1.0.0.0",
        "New": "2.0.0.1"
    },
    {
        "env" :"2",
        "Old": "1.0.0.1",
        "New": "2.0.0.2"
    },
    {
        "env" :"3",
        "Old": "1.0.0.4",
        "New": "2.0.0.1"
    },
    {
        "env" :"4",
        "Old": "1.0.0.0",
        "New": "5.0.1.1"
    },
    {
        "env" :"5",
        "Old": "2.0.0.0",
        "New": "3.0.1.1"
    },
    {
        "env" :"6",
        "Old": "1.0.0.0",
        "New": "2.0.0.1"
    },
    {
        "env" :"7",
        "Old": "1.0.0.0",
        "New": "2.0.0.1"
    }
    ]
} 
mystack
  • 4,910
  • 10
  • 44
  • 75
  • I don't understand what problem you're trying to solve with this. How is this JSON file going to drive the release process? Wouldn't it make more sense to model your environments in a release definition using different release stages? – Daniel Mann Oct 24 '19 at 10:12
  • We cannot stick to an N number of stages, because the release we releasing will be to a different number of customers at the same time. SO our plan is to use a single-stage and iterate the json file to get the information – mystack Oct 24 '19 at 10:27
  • Are you trying to trigger a release according to the target version that user entered and send to azure devops? Could you explain more how you intend to send inputs to azure devops? Are these inputs from the target version that users entered? How you plan to include the json in your stage and iterate it? – Levi Lu-MSFT Oct 25 '19 at 03:44
  • AFAIK, restful api allows to send data to Azure devops, and json file can be created by powershell scripts task in pipeline, and can be included in code repository and secure files, and can be used in pipelines. – Levi Lu-MSFT Oct 25 '19 at 03:50
  • @tjdoubts How is it going with this case? Any updates? – Levi Lu-MSFT Nov 06 '19 at 06:18
  • We decided to Update the Json manually whenever a release is needed – mystack Nov 06 '19 at 14:26

0 Answers0