Skip to main content
Version: Deploy Next

Azure Function Apps and Web Jobs

The Azure plugin supports deploying Azure Function Apps in three modes—ZIP package, code file, or Docker container—along with deployment slots and Web Jobs.

Prerequisites

Before you begin, ensure you have:

Deploy a Function App (ZIP Package)

Use azure.FunctionApp to create a Function App and deploy application code as a ZIP archive. This is the standard deployment mode for most language runtimes.

  1. In the side navigation bar, click Explorer.

  2. Under Applications, expand your application and deployment package.

  3. Click Context menu, then select New > azure > FunctionAppZip.

  4. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Function App. Defaults to the CI name.
    Service Plan NameYesName of the App Service Plan to use.
    LocationYesAzure region (for example, westus).
    Storage AccountYesStorage account name for this Function App.
    OS TypeNoWindows (default) or Linux.
    Linux Fx VersionNoRequired for Linux OS. Framework and version (for example, `JAVA
    Functions Worker RuntimeNoRuntime language (for example, java, python, node, dotnet).
    Functions Extension VersionNoAzure Functions host version. Default: ~1.
    Allowed OriginsNoList of CORS allowed origins. If set, replaces the Azure defaults.
    App SettingsNoApplication settings as key-value pairs.
    Is HTTPS OnlyNoSet to true to redirect all HTTP traffic to HTTPS. Default: false.
    Function App URLNoOutput: Base URL for all functions in this app.
  5. Attach the ZIP archive artifact to the CI.

  6. Click Save and close and deploy.

Deploy a Function App (Code File)

Use azure.FunctionAppCode to deploy a single file artifact to a Function App, optionally targeting a specific deployment slot.

  1. Under your application package, click Context menu, then select New > azure > FunctionAppCodeSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Function App. Defaults to the CI name.
    Service Plan NameYesName of the App Service Plan to use.
    LocationYesAzure region.
    Storage AccountYesStorage account name for this Function App.
    Deployment SlotNoName of a deployment slot to target.
    OS TypeNoWindows (default) or Linux.
    Linux Fx VersionNoRequired for Linux. Framework and version (for example, `JAVA
    Functions Worker RuntimeNoRuntime language (for example, java, python, node).
    Functions Extension VersionNoAzure Functions host version. Default: ~1.
    Allowed OriginsNoCORS allowed origins list.
    App SettingsNoApplication settings key-value pairs.
    Is HTTPS OnlyNoRedirect HTTP to HTTPS. Default: false.
    Deployment Slot URLNoOutput: URL of the targeted deployment slot under the Function App.
  3. Attach the file artifact to the CI.

  4. Click Save and close and deploy.

Deploy a Function App as a Container

Use azure.FunctionAppContainer to create a Function App running a custom Docker container image. The App Service Plan must already exist before deploying.

  1. Under your provisioning package, click Context menu, then select New > azure > FunctionAppContainerSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Function App. Defaults to the CI name.
    Service Plan NameYesName of an existing App Service Plan.
    LocationYesAzure region.
    Storage AccountYesStorage account name.
    OS TypeNoLinux (default).
    Docker Custom Image NameYesDocker image name and tag (for example, myregistry.azurecr.io/myfunc:latest).
    Docker Registry URLYesContainer registry URL.
    Docker Registry UsernameNoRegistry username.
    Docker Registry PasswordNoRegistry password.
    Allowed OriginsNoCORS allowed origins list.
    App SettingsNoApplication settings key-value pairs.
    Is HTTPS OnlyNoRedirect HTTP to HTTPS. Default: false.
    Function App URLNoOutput: Base URL for all functions in this app.
  3. Click Save and close and deploy.

Create a Function App Deployment Slot

Use azure.FunctionAppSlot to add a deployment slot to an existing Function App for staged deployments.

  1. Under your provisioning package, click Context menu, then select New > azure > FunctionAppSlotSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Function App NameYesName of the Function App to add the slot to.
    Slot NameYesName of the new deployment slot to create.
  3. Click Save and close and deploy.

Create a Triggered Web Job

Use azure.TriggeredWebJob to deploy a Web Job that runs on demand or according to a CRON schedule.

  1. Under your application package, click Context menu, then select New > azure > TriggeredWebJobSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Web App NameYesName of the Web App to bind the job to.
    Web Job NameNoName of the Web Job. Defaults to the CI name.
    Executable File NameYesName of the file inside the Web Job ZIP that must be executed.
    ScheduleNoCRON expression with 6 fields (second, minute, hour, day, month, day-of-week). If not provided, the job can only be triggered manually.
  3. Attach the Web Job ZIP artifact to the CI.

  4. Click Save and close and deploy.

Create a Continuous Web Job

Use azure.ContinuousWebJob to deploy a Web Job that runs continuously in the background.

  1. Under your application package, click Context menu, then select New > azure > ContinuousWebJobSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Web App NameYesName of the Web App to bind the job to.
    Web Job NameNoName of the Web Job. Defaults to the CI name.
    Executable File NameYesName of the file inside the Web Job ZIP that must be executed.
    Is SingletonNoIf true, the job runs only on a single instance instead of all instances. Default: false.
  3. Attach the Web Job ZIP artifact to the CI.

  4. Click Save and close and deploy.