Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59010

As User I would like to have control over the deployment mode

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • azure-function-plugin
    • None

      currently it seems the azure-function-plugin has some super cow power and decides the deployment strategy based on:

      • it's a java app, use zip deployment
      • otherwise, use git deployment

      It would be cool if the decision on the deployment mode could be made by the user.

      Also it would be important to drop a note somewhere on these decisions as - to my knowledge - the settings in the function app must correspond to the deployment mode used.

      (WEBSITE_RUN_FROM_PACKAGE = "1")

          [JENKINS-59010] As User I would like to have control over the deployment mode

          Jie Shen added a comment -

          Make sense. But it may be a little difficult to achieve.

          Jie Shen added a comment - Make sense. But it may be a little difficult to achieve.

          first of all, thx for getting back on this.

          Shouldn't it be possible to add another parameter "deploymentMode" (zip|git) to the plugin in here?
          https://github.com/jenkinsci/azure-function-plugin/tree/dev/src/main/resources/com/microsoft/jenkins/function/FunctionAppDeploymentRecorder

          And then override the isJava logic when this parameter is set to zip|git in here: https://github.com/jenkinsci/azure-function-plugin/blob/dev/src/main/java/com/microsoft/jenkins/function/FunctionAppDeploymentCommandContext.java

          Could this be a valid approach?
          Is there any further logic baked into the zip|git deployment strategies that makes them dependent on the type of the function app (java, nodejs, ...)?

          Peter Niederlag added a comment - first of all, thx for getting back on this. Shouldn't it be possible to add another parameter "deploymentMode" (zip|git) to the plugin in here? https://github.com/jenkinsci/azure-function-plugin/tree/dev/src/main/resources/com/microsoft/jenkins/function/FunctionAppDeploymentRecorder And then override the isJava logic when this parameter is set to zip|git in here: https://github.com/jenkinsci/azure-function-plugin/blob/dev/src/main/java/com/microsoft/jenkins/function/FunctionAppDeploymentCommandContext.java Could this be a valid approach? Is there any further logic baked into the zip|git deployment strategies that makes them dependent on the type of the function app (java, nodejs, ...)?

          Jie Shen added a comment -

          jugglefish The basic logic should be like that. You just need to be careful not to introduce any incompatible changes to existing users.

          Jie Shen added a comment - jugglefish The basic logic should be like that. You just need to be careful not to introduce any incompatible changes to existing users.

            jieshe Jie Shen
            jugglefish Peter Niederlag
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: