Skip to content

Latest commit

 

History

History
91 lines (49 loc) · 2.77 KB

extensibility.md

File metadata and controls

91 lines (49 loc) · 2.77 KB

Go to Cloud Assembly.

image-20221117101335742

Navigate to Extensibility - Library - Actions and click NEW ACTION.

image-20221117101356693

Give it a name and choose your project.

image-20221117101412656

Pick your scripting language of choice. Here's an Python based example. Verify you have a Default input named target with value World.

def handler(context, inputs):
    greeting = "Hello, {0}!".format(inputs["target"])
    print(greeting)

    outputs = {
      "greeting": greeting
    }

    return outputs

Hit Save and then Create Version

image-20221117101452533

Give it a version number and click CREATE.

image-20221117101541526

Click versions in upper right hand corner.

image-20221117101559200

Click RELEASE.

image-20221117101615956

Again click RELEASE.

image-20221117101724988

Go to Service Broker to update your content sources.

image-20221117101738041

Create another content source.

image-20221117101749172

Pick Extensibility actions.

image-20221117101851034

Give it a name and choose your source project.

image-20221117101832381

Go to Policies - Definitions. Click on your already existing Definition.

image-20221117102001115

Click ADD ITEMS.

image-20221117102013343

Add Extensibility actions and hit save.

image-20221117102024323

Your newly created action should now be available in the catalog. You can try it out by clicking REQUEST.

image-20221117102109443

Enter a deployment name and click SUBMIT.

image-20221117102136750

Deployment running.

image-20221117102155148

When finished you can view the output from the script.

image-20221117102220284

Done.