0

I have below groovy in Jenkin to run a build and create "bin\Package". Jenkin and GIT servers are different.

 node {
    stage('Checkout') { git 'https://github.com/XXXX'}
    stage('Build') { bat ( "\"${tool 'MsBuild_Local'}\" /p:DeployOnBuild=true;Configuration=Release;OutputPath=bin\\Package") }



    stage('Deploy')
    {
               println "Entered"
    }
    }

Now I need to push this new "Package" folder to the same checkout GIT repository, from Jenkins server. But not sure which command I need to check here.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jaish Mathews
  • 766
  • 1
  • 9
  • 25

1 Answers1

0

you may want to reconsider if you really want to do that, like this answer advises.

if you must:

burnettk
  • 13,557
  • 4
  • 51
  • 52
  • I am using pipeline and so tried 2nd option to get a message saying "No such DSL method 'usernamePassword" – Jaish Mathews Jul 22 '17 at 18:16
  • I am seeing credential plugin has been enabled and still same message. More over is it good to just to mention uid/pwd etc..through withCredentialsnkins ? Again I am pretty new in Jenkin/Groovy. – Jaish Mathews Jul 23 '17 at 06:08
  • it's fine to use withCredentials from a security perspective. that's sort of what it's for. note that you can also use ssh keys instead of user/password. you might repost your Jenkinsfile with the failing `withCredentials` included in case someone can spot the issue. – burnettk Jul 23 '17 at 13:50
  • I skipped the GIT idea and now trying to push deployment to an Azure storage account. Once adding my Azure storage account in Jenkin configuration, it's throwing error by telling "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target XXX.....Any idea? – Jaish Mathews Jul 25 '17 at 16:41
  • it's generally better to submit a question for each distinct issue after researching it to make sure you can't solve it yourself. it seems like https://support.cloudbees.com/hc/en-us/articles/217078498-PKIX-path-building-failed-error-message could be related to this new issue. if there is a correct answer to the original question, you can accept it. :) – burnettk Jul 26 '17 at 02:36