T.Todua
T.Todua

Reputation: 56361

Jenkins - How to just trigger action when push happens to Bitbucket repository?

I have connected Bitbucket to my Jenkins on vps (where I have BitBucket plugin to trigger events when changes are pushed/commited to Bitbucket).

So when Push happens on BitBucket repository, Jenkins starts build (that takes about 10 seconds). After that, the Post-build event happens, where I use specific command (sending changed files to somwhere). However, I am only interested to run that specific command, and I don't need building at all (so I could save 10 seconds).

Any way to do that?

p.s. Here is what config I use: https://i.sstatic.net/ET3Hx.png

Upvotes: 0

Views: 139

Answers (1)

Based in the screenshot the Jenkins job does the following

  1. Triggered on Source code change
  2. Runs the build step ( which runs ssh publisher plugin)
  3. Post build

If you just want to run the command you have in post build. Remove the ssh publisher step. Add a new build step that executes command/shell and add your current post build command in the step.

Add Build

Upvotes: 1

Related Questions