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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • Jenkins (v2.150.1) master installed on Azure Linux VM. Jenkins Slave on Azure Windows 10 VM using Java Web Start

      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

       

          [JENKINS-56966] Azure Deployment of .NET Package Folder has some files with 0 size

          Jie Shen added a comment -

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

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

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

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

          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.

          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.

          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.

          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.

          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.
          

          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.

          Jie Shen added a comment -

          josh_zynbit 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.

          Jie Shen added a comment - josh_zynbit 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.

          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?

          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?

          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.

          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.

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

              Created:
              Updated: