Legacy code started this job. No cause information is available

There is always an extra build with triggered by “promote build plugin” on jenkins, which I dont know why…

Here is the whole pipeline:

  • Git workflow for partial merges?
  • Content of a dockerfile to run glassfish server and deploy specific application from a git repository
  • Pushing without committing
  • git commit -v problem with Mac OS X?
  • Best way to sync work environments between multiple computers (Macs)
  • How to create tag with forward slash in its name
    1. dev commits “feature_branch” to github
    2. jenkins triggers a build on “feature_branch” to run all unit tests

    on build-job:

    • if the branch passed the test, it should go to “code review” (I use promote_build_plugin here, manually promote after code view),
    • I use “Trigger/call builds on other projects” as the action to trigger “deploy-job” to build only if it passes code review.

    on deploy-job:
    I can see a new build is triggered and that feature_branch is merged, but there is always another build take place with “no changes; Legacy code started this job. No cause information is available”

    I googled a whole afternoon trying to solve this, any help?

  • Error building iOS project with Jenkins on MacOS X Lion
  • How to handle passwords in shared code
  • How do I git reset --hard origin/whatever branch I have checked out?
  • How to make msysgit installation a remote repository
  • Keychain won't unlock from Jenkins script unless user logged in
  • Move Git home directory Windows 7
  • One Solution collect form web for “Legacy code started this job. No cause information is available”

    You probably have a post-commit hook that is triggering the same job through a URL or jenkins-cli

    Edit after OP comments:

    But I start to wonder on the deploy-job, I didnt configure “Build when a change is pushed to Github”, instead, I use “Build when another project is promoted”, so I think even github hook is triggered, it wont end up with an extra build?

    Well, there is your problem ^^. The “Trigger/Call builds” mechanism is completely separate from the “Build when another project is promoted“.

    • The former allows to trigger a new build from a buildstep or a promotion (tied to that specific promotion).
    • The latter will trigger a build on any promotion of the configured job. It is the inverse of “Build other projects” post-build configuration.

    Furthermore, build triggers are not AND’ed, they are OR’ed. Build when this or that or that trigger happens.
    Remove the “Build when another project is promoted” from configuration to git rid of extra builds.

    Now, if you want to prevent builds from being triggered by SCM commit hooks, you need to make sure there is no SCM polling configured on the job. Alternatively different SCM plugins have their own options (I know SVN SCM plugin allows to “ignore post-commit hooks”; don’t know about git SCM plugin)

    Git Baby is a git and github fan, let's start git clone.