Skip to content

Support generic VERSION file to record version info #124

@SohamJ

Description

@SohamJ

Dependencies

N/A

Feature Request

Overview

The request is to support a generic VERSION file where the plugin can read and update the semantic version information.

VERSION file is a text file that holds only the version info and sits in the root of the git repository. For example:

# VERSION
1.0.0

Requirement

Version is used in many places in a typical SDLC process - from local development (using Makefiles or build files like pom/build.gradle etc), to building and deploying the artifact/Docker image in CICD (Jenkinsfile).

Instead of maintaining the version info in each of these files, we maintain a VERSION file in the root of the project as the single source of truth. All other files read the version from it.

For instance, we currently use conventional-changelog/standard-version project to parse version from this file and update the version and generate the changelog. Unfortunately, this tool only supports npm natively, which was another justification to use a VERSION file to keep versioning consistent across all project types, including the ones that don't use a build tool (e.g repos that maintain configurations only and no source code). Consistency in versioning will help simplify and increase adoption/ROI for adopting good commit standards (especially across a big enterprise)

This plugin can parse the version info from this file and increment it with nextVersion step.

Proposed Solution

  • Plugin can support a parameter such as nextVersion versionFile: 'VERSION' to read the update the version. It can be defaulted when no other build file is found in the repo
  • Use nextVersion to grab the new version in Jenkins Pipeline to use across build/deploy processes and create the git tag

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions