https://github.com/manics/jenkins-pipeline-bumpversion-example
This is an example of using Jenkins Pipelines to automatically version and tag a repository
https://github.com/manics/jenkins-pipeline-bumpversion-example
Last synced: 6 months ago
JSON representation
This is an example of using Jenkins Pipelines to automatically version and tag a repository
- Host: GitHub
- URL: https://github.com/manics/jenkins-pipeline-bumpversion-example
- Owner: manics
- Created: 2019-03-06T21:27:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-07T00:15:12.000Z (over 7 years ago)
- Last Synced: 2025-01-22T00:46:47.291Z (over 1 year ago)
- Language: Dockerfile
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jenkins Pipeline BumpVersion Example
Version: 0.0.0
This is an example of using Jenkins Pipelines to automatically version and tag a repository.
1. Fork this repository.
2. Run this Jenkins Pipeline by adding the forked repository to a Jenkins installation with a node labelled `docker`.
3. Add a [GitHub deploy key](https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys) to your repository
4. Add an Jenkins credential called `github-push` with your GitHub SSH key.
Tick the box to allow write access.
This will be used to update the GitHub fork with a new version.
5. Run the pipeline.
The pipeline will run, then prompt you for input.
If you agree to bump the version the version at the top of this file will be bumped, the repository will tagged, and pushed to GitHub.
You have the following options:
- `patch`: Bump the patch version, add `-SNAPSHOT`, e.g. `1.2.3` → `1.2.4-SNAPSHOT`
- `minor`: Bump the minor version add `-SNAPSHOT`, e.g. `1.2.3` → `1.3.0-SNAPSHOT`
- `major`: Bump the major version add `-SNAPSHOT`, e.g. `1.2.3` → `2.0.0-SNAPSHOT`
- `release`: Remove `-SNAPSHOT`, e.g. `2.0.0-SNAPSHOT` → `2.0.0`
- `skip`: Do nothing