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

Deploying azure app from agent fails to copy any files to git deploy folder

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Jenkins 2.242 running in linux docker container on Windows 10.
      Build is done on agent running Windows docker container on Windows 10.
      Latest plugin.

      azureWebAppPublish azureCredentialsId: credentialsId, 
         publishType: 'file',
         resourceGroup: resourceGroup,
         appName: webAppName, 
         slotName: slotName,
         filePath: '**/*',
         sourceDirectory: 'bin/Release/App'

      Running a linux server and windows slave in docker for Windows on Windows 10 Pro.  The azureWebAppPublish does not copy any files into the .azure-deploy git directory so the deploy uploads an empty app.

      This worked fine on a single Windows jenkins (no agent) before I moved to server/agent config.

      I can't really offer any more info as the logs don't actually log any of the file copy steps.

       

          [JENKINS-62946] Deploying azure app from agent fails to copy any files to git deploy folder

          Tim Kemp added a comment -

          Ok, I have had a little time to try and debug this.  The problem is that in GitDeployCommand.copyAndAddFiles()  the list of files uses Windows slashes () but the sourceDir and repo dir uses unix style slashes so FilePathUtils.trimDirectoryPrefix doesn't work correctly as sourceDir is in unix format and file is in Windows format.  I don't know anything about how jenkins handles this and I am a C# windows developer so I am at my limit just to get this far.  For now I am going to fix the slashes for my  case as a workaround.

          Tim Kemp added a comment - Ok, I have had a little time to try and debug this.  The problem is that in GitDeployCommand.copyAndAddFiles()  the list of files uses Windows slashes () but the sourceDir and repo dir uses unix style slashes so FilePathUtils.trimDirectoryPrefix doesn't work correctly as sourceDir is in unix format and file is in Windows format.  I don't know anything about how jenkins handles this and I am a C# windows developer so I am at my limit just to get this far.  For now I am going to fix the slashes for my  case as a workaround.

            azure_devops Azure DevOps
            kempus Tim Kemp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: