0

I am creating a CI/CD pipeline for my Azure Resources using ARM Template. In my Arm Template I am using zipdeploy to deploy the code of my azure function.

"resources": [
            {
              "apiVersion": "2021-02-01",
              "type": "extensions",
              "name": "zipdeploy",
              "dependsOn": [
                "[resourceId('Microsoft.Web/sites', variables('functionAppName'))]"
              ],
              "properties": {
                "packageUri": "[parameters('packageUri')]"
              }
            }
          ]

Basically, I need to specify the packageUri, it needs to be accessed over the internet.

In my Azure Pipeline I am creating a zip package of my function and publishing to Azure pipeline artifacts using dotnet publish and then I am getting the URL: https://dev.azure.com/ifolor/_apis/resources/Containers/$(Build.ContainerId)/drop?itemPath=drop/myfunction.zip

task: PublishBuildArtifacts@1

Problem:

This URL is private, the Azure function cannot access this artifact

Is it possible to give access permissions to my Azure function from Azure Portal to access the pipeline artifacts from Azure Pipeline?

Pipeline artifact: enter image description here

1 Answer 1

0

Is it possible to give access permissions to my Azure function from Azure Portal to access the pipeline artifacts from Azure Pipeline?

No.

Typically, you don't use an ARM template to deploy your application, you use a continuous delivery pipeline that pushes the changes out to the site, as explained in the documentation.

i.e.

- task: AzureWebApp@1
  inputs:
    azureSubscription: '<Azure service connection>'
    appType: 'webAppLinux'
    appName: '<Name of web app>'
    package: '$(System.DefaultWorkingDirectory)/**/*.zip'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.