1

I have an issue in hudson post build tasks,

I am using two plugin FTP Upload(which uploads artifacts to FTP server) and Post Build Tasks(which execute my external batch file).

Now my issue is that Post Build Tasks executes before FTP Upload, that should not happened, I want to execute batch file after completion of FTP upload. See my attached screenshot for reference. Any help will be appreciated.

enter image description here

commit
  • 4,777
  • 15
  • 43
  • 70

2 Answers2

0

Later versions of Jenkins (after April 2012) allow you to reorder post-build actions as you wish.

There is also the Flexible Publish Plugin that allows ordering the post-build actions through conditions.

Is there a reason you are sticking with Hudson?

Edit
From official sources:
JIRA issues indicating this problem
https://issues.jenkins-ci.org/browse/JENKINS-7408
https://issues.jenkins-ci.org/browse/JENKINS-9381
Resolution by Kohsuke Kawaguchi (creator of Hudson/Jenkins). Unfortunately, the resolution is in Jenkins.
https://groups.google.com/forum/?fromgroups#!topic/jenkinsci-dev/UQLvxQclyb4

So to answer your question directly: it is impossible in Hudson. Only thing you could try is workarounds with multiple jobs linked up. Let me know if this is something you would consider.

Slav
  • 27,057
  • 11
  • 80
  • 104
  • No there is not any reason, but now it is already in hudson and it will take long process to take permissions to move it to jenkins, so I don't want to use it. – commit Jun 19 '14 at 09:58
  • The only other way would be to break this into 2 jobs, and the second (test) job will copy the artifacts of the first job. Is this something that you would consider? I will write an edit explaining this process. Also, please specify if `test.bat` requires a few specific files from the build, the whole build workspace, or is independent of that – Slav Jun 19 '14 at 13:54
  • @commit added "official sources" – Slav Jun 19 '14 at 14:04
0

Can't you just use FTP to upload the file in your batch file? Then you have full control of the ordering?

FuzzyJulz
  • 2,714
  • 1
  • 16
  • 18