I am currently working on setting up the CI for a project with Jenkins and Bitbucket. Basically there are two scenarios I would need to cover.