0

How can I code a JSON file to create release pipeline to create Agent job with following tasks

1) Download Build Artifacts task

2) Azure App Service Deploy task

3) File Transform Task

4) Azure SQL SqlTask

Jay Bhiyani
  • 313
  • 1
  • 4
  • 14

1 Answers1

1

1) You can create one release with such configuration via UI, then export it. It will generate and install a file with JSON code to your local. Then you could check its scripts by yourself:

enter image description here

2) Or change to History tab after you create the release via UI. In History, you can also view its JSON code.

enter image description here


The configuration structure you want is not suitable to share here directly. So I'd recommend you the above steps to configure JSON file by yourself.

If above does not satisfied or not convenient to you, I may consider to share full JSON code here to you:-)

Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35
  • I already have the JSON file. But it has many details which are not provided while creating release using classic UI like pipeline owner details, editor details, approvals which are of no use for me while creating new release pipeline. So how to code a new JSON to create release? – Jay Bhiyani Mar 03 '20 at 07:55
  • 1
    @JayBhiyani, Though they are meaningless for you because you do not need configure them. But they are the necessary data that our system required. We need those to create corresponding data into our database. You can leave their value blank, but must configure them in JSON file. – Mengdi Liang Mar 03 '20 at 08:13
  • Is it preferable to create YAML file to create release pipeline same as we create for build pipeline? – Jay Bhiyani Mar 03 '20 at 13:13
  • 1
    @JayBhiyani Personally, yes. Issue is `export` and `import` JSON file does not support for YAML pipeline, we haven’t expanded that feature. If what you want with Json file is could creating multi pipeline quickly. Then I think Template in YAML can do the same thing. – Mengdi Liang Mar 03 '20 at 13:36
  • Can you provide a JSON file to create release with one stage and all the tasks mentioned above? – Jay Bhiyani Mar 03 '20 at 17:41
  • Forgive me.....I share the link to the wrong place yesterday :( I hide some sensitive info here: github.com/merlinLia/ReleaseBasicCode/blob/master/Sample.json Any puzzle with that, just comment here:-) – Mengdi Liang Mar 05 '20 at 01:24