Alex Brodov
Alex Brodov

Reputation: 3515

Merging git branches to master using Jenkins

I want to create a modular process which will merge the "devel" branch upon each successful build to the master branch, and it will also create a tag. Is there any way to do it using Jenkins and Git plugin rather than writing code. If yes, is there any option to provide Git plugin the repository URL as a parameter, so it will be as modular as possible. The job that I want to create will be performing only the merge (git merge --no-commit -X theirs) operation and it will create a tag (the tag name will be provided as a parameter as well).This job will be triggered by other jobs.

Upvotes: 0

Views: 677

Answers (1)

m1848
m1848

Reputation: 67

You can try use post-build action Git Publish and provide to it's fields build parameters you have as a variables (for example $REPO_URL, if you have parameterized build with variable $REPO_URL or have Env Injection plugin with this variable).

Upvotes: 1

Related Questions