title: Azure webjobs publish from Jenkins pipeline
body: <p>I wasn´t able to find out much on internet about this. But I have a jenkins jobs that deploys a .net webapp using plugin azureWebAppPublish like follows. After the .net app is build in previous step in same pipeline I have following stage</p>
  <pre><code>stage ('publish to azure ') {
  
  
              azureWebAppPublish appName: &quot;webapp-A&quot;,
                      azureCredentialsId: &quot;jenkins-login&quot;,
                      publishType: &quot;file&quot;,
                      filePath: &quot;**/*.*&quot;,
                      resourceGroup: &quot;webapp-rg&quot;
                     
      }
  </code></pre>
  <p>I know that this by default deploys the files webapp in: home\site\wwwroot
  In fact When I access there over console in azure I see the files deplyed.</p>
  <p>Everything ok so far, files are deployed successfully in webapp. But now I would like to  publish also a webjob in same webapp.</p>
  <p>I created it first by publishing it from visual studio. Right click, publish the wbjob and that´s it ,  the web job is running in azure in that webap. Thinig is that I would like to do it from the pipeline now. I saw that after I created the webjob, Inside <code>home\site\wwwroot</code> a folder was created, called: D:\home\site\wwwroot\app_data\Jobs\Continuous\service.webjobs(all files of that my webjob)<br />
  so there are all the files I would like to update.</p>
  <p>but I don´t know how to do this same way using azureWebAppPublish as I used for webapp. indicating destination path for webjob files.</p>
  <p>I used this and job run successfully</p>
  <pre><code>stage ('publish webjob ') {
      
      
                  azureWebAppPublish appName: &quot;webapp-A&quot;,
                          azureCredentialsId: &quot;jenkins-login&quot;,
                          publishType: &quot;file&quot;,
                          filePath: &quot;**/*.*&quot;,
                          resourceGroup: &quot;webapp-rg&quot;
                          sourceDirectory: &quot;/var/lib/jenkins/workspace/servicestest/Services.WebJob/&quot;
                          targetDirectory: &quot;app_data/Jobs/Continuous/webjobtest1&quot;
          }
  </code></pre>
  <p>but no update in app_data/jobs/contiues/webjobtest1 was made in fact, the job run ok and the webapp was updated and no the webjob</p>
  <p>How can I update webjobs using jenkins? has someone did this sometime?</p>
  <p>I see this <a href="https://stackoverflow.com/questions/61060632/deploying-azure-webjobs-from-jenkins-pipeline">post</a> but honestly it´s not quite clear how is it done.</p>