Reputation: 61
I want to create a CI pipeline using Maven, GitLab and Artifactory.
I already set up all these systems, and right now Jenkins makes a build, if a user pushes to GitLab and deploys the artifact to Artifactory.
But what I want is the following:
The developer develops a Java application and can push his code to GitLab. At the point when he is finished he uses the maven-release-plugin and executes the release:prepare and release:perform goal. The Maven release plugin automatically creates a new Tag and edits the version. Now Jenkins should start a new job, build the artifact and deploy it to Artifactory.
So the main thing I have to do is teaching Jenkins only to build Tags. Is there a way to do that?
Upvotes: 1
Views: 467
Reputation: 10382
I would recommend to activate the Maven release plugin with Jenkins and to build the release with a dedicated Jenkins job:
This job will launch the prepare and perform goals, and will upload the release binary in Artifactory (via a dedicated post-build step).
Upvotes: 2