Giter VIP home page Giter VIP logo

Comments (5)

issue-label-bot avatar issue-label-bot commented on August 14, 2024

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@N-Usha please take a look at this

from webapps-deploy.

N-Usha avatar N-Usha commented on August 14, 2024

@shibayan - Could you plz elaborate your scenario further? I couldnt quite understand what you meant by below: Can you plz explain?

but it would be redundant to not be able to use the same Action when deploying in parallel using strategy.

from webapps-deploy.

shibayan avatar shibayan commented on August 14, 2024

@N-Usha I understand. I'll show you the actual Workflow definition.

Deploying to App Service / Azure Functions is often time consuming, so I use artifacts to deploy in parallel if the project contains many applications.

  • webapp-test
    • App Service, ASP.NET Core application
  • function-test
    • Azure Functions app

Currently, I simply define multiple jobs to deploy in parallel, but they are redundant as they are nearly identical except for the application name.

# for webapp
deploy-webapp:
  runs-on: ubuntu-latest
  needs: build
  steps:
  - name: Download artifact
    uses: actions/download-artifact@v2
    with:
      name: webapp-test
      path: publish

  - name: Login to Azure
    uses: azure/login@v1
    with:
      creds: ${{ secrets.AZURE_CREDENTIALS }}

  - name: Deploy
    uses: Azure/webapps-deploy@v2
    with:
      app-name: webapp-test
      package: publish

# for function
deploy-function:
  runs-on: ubuntu-latest
  needs: build
  steps:
  - name: Download artifact
    uses: actions/download-artifact@v2
    with:
      name: function-test
      path: publish

  - name: Login to Azure
    uses: azure/login@v1
    with:
      creds: ${{ secrets.AZURE_CREDENTIALS }}

  - name: Deploy
    uses: Azure/functions-action@v1
    with:
      app-name: function-test
      package: publish

Therefore, I am thinking of reusing Job of deployment using strategy and matrix as follows.

But it is inconvenient that webapps-deploy action needs to be prepared separately with Web App and Function because deployment to Azure Functions cannot be done in Azure CLI mode.

# deploy all application at once
deploy-all:
  runs-on: ubuntu-latest
  needs: build
  strategy:
    matrix:
      app: [webapp-test, function-test]
  steps:
  - name: Download artifact
    uses: actions/download-artifact@v2
    with:
      name: ${{ matrix.app }}
      path: publish

  - name: Login to Azure
    uses: azure/login@v1
    with:
      creds: ${{ secrets.AZURE_CREDENTIALS }}

  - name: Deploy to Dev
    uses: Azure/webapps-deploy@v2
    with:
      app-name: ${{ matrix.app }}
      package: publish

This workflow actually fails with an error when deploying to Azure Functions.

image

from webapps-deploy.

N-Usha avatar N-Usha commented on August 14, 2024

Thanks for the explanation @shibayan. I understand your requirement now. We don't intend to overload the Webapps-deploy action for function-app deployments in the near future. However if we see more customer impact and asks around this requirement in the future, we may reconsider this in the future. Thanks!

from webapps-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.