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

Azure Deployment of .NET Package Folder has some files with 0 size

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We are building a .NET 4.5 Web API application using the declarative pipelines syntax to issue bat commands calling msbuild /t:clean, build, and package on a Windows 10 slave VM. 

      Package step creates a directory of publishable files at: ./obj/{config}/Package/PackageTmp

      Final step of the pipeline uses the azureWebAppPublish plugin to publish this directory to Azure Web Site. Publish step reports successful, but when looking at the wwwroot/bin folder on the published site, some DLLs have a 0 byte file size. For example, in the build server's PackageTmp folder, A.Library.DLL has file size 1124 KB, but after deploying via the plugin, A.Library.DLL has file size 0 bytes in Azure.

      Also noticed that the .azure-deploy GIT folder responsible for pushing the deploy files to Azure master contains some unstaged publish files after the pipeline has completed, one of which is the affected A.Library.DLL.

      Azure Web App Publish Step:

      azureWebAppPublish azureCredentialsId: params.azure_credential_id,					resourceGroup: params.resource_group, appName: params.service_name, sourceDirectory: "/obj/${params.build_mode}/Package/PackageTmp"

      x

       

        Attachments

          Activity

          Hide
          jieshe Jie Shen added a comment -

          Thanks for reporting this issue here. Does the build server have git installed? And its OS is windows, right?

          Show
          jieshe Jie Shen added a comment - Thanks for reporting this issue here. Does the build server have git installed? And its OS is windows, right?
          Hide
          josh_zynbit Josh Chiancone added a comment -

          Yes, the worker VM is Windows 10 with msbuild 14 and Git installed (2.21.0.windows.1)

          Show
          josh_zynbit Josh Chiancone added a comment - Yes, the worker VM is Windows 10 with msbuild 14 and Git installed (2.21.0.windows.1)
          Hide
          josh_zynbit Josh Chiancone added a comment - - edited

          I can provide sections of build logs or additional information, if you need specific information. I'd rather not attach the full pipeline log, though.

          Show
          josh_zynbit Josh Chiancone added a comment - - edited I can provide sections of build logs or additional information, if you need specific information. I'd rather not attach the full pipeline log, though.
          Hide
          jieshe Jie Shen added a comment -

          This plugin will use git to deploy to Azure Web app. It seems that the git does not track the target files. I will check if I could reproduce it on my side.

          Show
          jieshe Jie Shen added a comment - This plugin will use git to deploy to Azure Web app. It seems that the git does not track the target files. I will check if I could reproduce it on my side.
          Hide
          josh_zynbit Josh Chiancone added a comment -

          The log is reporting that the file is tracked and that deployment succeeds. See log from that job step:

          Deploy to Azure
          [Pipeline] step
          Starting Azure Web App Deployment
          Cloning repository https://<redacted>/<redacted>.git
           > git init C:\Jenkins\workspace\ZynBit Web Applications\<redacted>\.azure-deploy # timeout=10
          Fetching upstream changes from https://<redacted>/<redacted>.git
           > git --version # timeout=10
          using GIT_ASKPASS to set credentials 
           > git fetch --tags --progress https://<redacted>/<redacted>.git +refs/heads/*:refs/remotes/origin/*
           > git config remote.origin.url https://<redacted>/<redacted>.git # timeout=10
           > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
          Seen 0 remote branches
           > git add <redacted>
           ....
           > git add bin/ZynBit.ServiceClient.dll # timeout=10
           > git add <redacted>
           ....
           > git commit -F C:\windows\TEMP\gitcommit43456453645364536.txt # timeout=10
          using GIT_ASKPASS to set credentials 
           > git push https://<redacted>/<redacted>.git master:master
          Deploy to app with default host https://<redacted>
          Done Azure Web App deployment.
          
          Show
          josh_zynbit Josh Chiancone added a comment - The log is reporting that the file is tracked and that deployment succeeds. See log from that job step: Deploy to Azure [Pipeline] step Starting Azure Web App Deployment Cloning repository https: //<redacted>/<redacted>.git > git init C:\Jenkins\workspace\ZynBit Web Applications\<redacted>\.azure-deploy # timeout=10 Fetching upstream changes from https: //<redacted>/<redacted>.git > git --version # timeout=10 using GIT_ASKPASS to set credentials > git fetch --tags --progress https: //<redacted>/<redacted>.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url https: //<redacted>/<redacted>.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Seen 0 remote branches > git add <redacted> .... > git add bin/ZynBit.ServiceClient.dll # timeout=10 > git add <redacted> .... > git commit -F C:\windows\TEMP\gitcommit43456453645364536.txt # timeout=10 using GIT_ASKPASS to set credentials > git push https: //<redacted>/<redacted>.git master:master Deploy to app with default host https: //<redacted> Done Azure Web App deployment.
          Hide
          jieshe Jie Shen added a comment -

          Josh Chiancone please downgrade to version 0.4.1 to have a try, I think your problem is caused by the latest change in last release. I will fix this and release a new version, thanks.

          Show
          jieshe Jie Shen added a comment - Josh Chiancone please downgrade to version 0.4.1 to have a try, I think your problem is caused by the latest change in last release. I will fix this and release a new version, thanks.
          Hide
          josh_zynbit Josh Chiancone added a comment -

          Thank you for the suggestion. I went to downgrade and found we were already still on 0.4.1 (see below). However we did notice that our Jenkins master (running on linux) has 0 MB swap space available. When running a pipeline on a Windows slave, would the master server being out of swap space have any impact on the slave's ability to publish/deploy files?

          Show
          josh_zynbit Josh Chiancone added a comment - Thank you for the suggestion. I went to downgrade and found we were already still on 0.4.1 (see below). However we did notice that our Jenkins master (running on linux) has 0 MB swap space available. When running a pipeline on a Windows slave, would the master server being out of swap space have any impact on the slave's ability to publish/deploy files?
          Hide
          jieshe Jie Shen added a comment -

          You can download official packages for each version from https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/azure-app-service/ , and install it manually like https://jenkins.io/doc/book/managing/plugins/#advanced-installation. For your case, I think the problem here is that some files in  .azure-deploy are not in proper git status.

          Show
          jieshe Jie Shen added a comment - You can download official packages for each version from  https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/azure-app-service/  , and install it manually like  https://jenkins.io/doc/book/managing/plugins/#advanced-installation . For your case, I think the problem here is that some files in  .azure-deploy are not in proper git status.

            People

            • Assignee:
              jieshe Jie Shen
              Reporter:
              josh_zynbit Josh Chiancone
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: