Prerequisites

Open Jenkins dashboard, go to Credentials, add a new Microsoft Azure Se=
rvice Principal with the credential information you just created.

If you haven't created a virtual machine scale set, you can create one i=
n Azure Portal or through Azure CLI.

You should also provide an VM image for deploy. For custom images, you c=
an use tool such as Packer to simplify your work.

Build Steps

Usually you can organize your deploy process into two steps:

Update Scale Sets

This step updates image setting for specific=
Virtual Machine Scale Sets. Once finished, newly created virtual machines =
will be provisioned with the new image. Currently running machines are not =
affected.

Update Instances

This step updates specific instances using th=
e latest image setting of the scale sets. Instances will be stopped and re-=
created with the new image.

Pipeline

You can also use this plugin in pipeline (Jenkinsfile). Here are some sa=
mples to use the plugin in pipeline script: