fix: update release_filter (thanks Praveen) and pkg version for release

jdstrand/release-updates
Jamie Strandboge 2025-03-19 09:35:00 -05:00
parent edb8232d0b
commit 10075eee20
No known key found for this signature in database
2 changed files with 87 additions and 2 deletions

View File

@ -49,10 +49,27 @@ any_filter: &any_filter
branches:
only: /.*/
# This regex is used to trigger 'release builds' based on tags. For semver,
# package upgrades, etc, the tags must conform to specific schema. Eg:
#
# - v3.0.0-0.alpha.1 (1st alpha release)
# - v3.0.0-0.alpha.1.1 (2nd build of 1st alpha release; ie, no code changes)
# - v3.0.0-0.alpha.2 (2nd alpha release)
# - v3.0.0-0.beta.1 (1st beta release)
# - v3.0.0-0.rc.1 (1st rc release)
# - v3.0.0 (3.0.0 official release)
# - v3.0.0-2 (2nd build of 3.0.0 official release; ie, no code changes)
# - v3.0.1 (3.0.1 official release)
# - v3.1.0 (3.1.0 official release)
#
# If the tag does not conform to the above, then ci-support/ci-packager-next,
# will generate snapshat versions. For easier maintenance, this regex is more
# open than ci-support/ci-packager-next (which enforces a number of
# constraints). See .circleci/packages/config.yaml for details.
release_filter: &release_filter
filters:
tags:
only: /^v(\d+)(?:\.(\d+))?(?:\.(\d+))?$/
only: /^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+(\.(alpha|beta|rc)\.[0-9]+(\.[0-9]+)?)?)?$/
branches:
ignore: /.*/

View File

@ -1,5 +1,73 @@
# https://github.com/influxdata/ci-support/blob/main/ci-packager-next/fs/usr/bin/packager
# uses this to calculate the version used for tarball, zip and Linux package
# versions and git tags for this repo (https://github.com/influxdata/influxdb)
# are used by .circleci/config.yml's 'release_filter' to determine which CI
# jobs to run. Be default, packager will set the version to
# 3.0.0+snapshot-<git sha> based on CIRCLE_SHA1. If CIRCLE_TAG matches one of
# these, then packager will set the version based on the tag:
#
# | tag | filename | deb | rpm |
# |--------------------|-------------------|-------------------| -------------------------- |
# | v3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | ver=3.0.0, rel=0.alpha.1 |
# | v3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | ver=3.0.0, rel=0.alpha.1.1 |
# | v3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | ver=3.0.0, rel=0.alpha.2 |
# | v3.0.0-0.beta.1 | 3.0.0-0.beta.1 | 3.0.0-0.beta.1 | ver=3.0.0, rel=0.beta.1 |
# | v3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | ver=3.0.0, rel=0.beta.1.1 |
# | v3.0.0-0.beta.2 | 3.0.0-0.beta.2 | 3.0.0-0.beta.2 | ver=3.0.0, rel=0.beta.2 |
# | v3.0.0-0.rc.1 | 3.0.0-0.rc.1 | 3.0.0-0.rc.1 | ver=3.0.0, rel=0.rc.1 |
# | v3.0.0 | 3.0.0 | 3.0.0-1 | ver=3.0.0, rel=1 |
# | v3.0.0-2 | 3.0.0-2 | 3.0.0-2 | ver=3.0.0, rel=2 |
#
# In this manner:
# - v3.0.0-0.alpha.1 < v3.0.0-0.alpha.1.1
# - v3.0.0-0.alpha.1.1 < v3.0.0-0.alpha.2
# - v3.0.0-0.alpha.2 < v3.0.0-0.beta.1
# - v3.0.0-0.beta.1 < v3.0.0-0.beta.1.1
# - v3.0.0-0.beta.1.1 < v3.0.0-0.beta.2
# - v3.0.0-0.beta.2 < v3.0.0-0.rc.1
# - v3.0.0-0.rc.1 < v3.0.0
# - v3.0.0 < v3.0.0-2
#
# (use 'dpkg --compare-versions X lt Y && echo yes' for debs and
# 'rpmdev-vercmp X Y | grep " < " && echo yes' for rpms)
#
# We use the following tag schema that supports semver as well as Linux package
# version semantics (see https://github.com/influxdata/influxdb/pull/24751 for
# context):
#
# v3.M.m[-B[.Q.q.b]] # eg, v3.0.0, v3.0.0-2, v3.0.0-0.beta.1 or v3.0.0-0.beta.1.1
# | | | | | | |
# | | | | | | ----------> quality release package build number
# | | | | | ------------> quality release number
# | | | | --------------> release quality
# | | | -----------------> package build number
# | | --------------------> influxdb3 micro version
# | ----------------------> influxdb3 minor version
# ------------------------> major version
#
# Importantly:
# - the tag should start with 'v' (for semver tagging convention)
# - changes in v3.M.m follow semver and indicate there are code changes
# - '-B' should be omitted for a new v3.M.n released semver (eg, v3.0.0, not
# v3.0.0-1); specified starting with '2' for new package builds for this
# release semver (eg, v3.0.0-2, v3.0.0-3, etc); and specified with '0' for
# pre-release quality builds (eg, v3.0.0-0.rc.1).
# - 'Q' is optional but when specified, 'Q' may be one of 'alpha', 'beta' or
# 'rc'. Furthermore, when 'Q' is set:
# - 'B' and 'q' must also be specified with 'q' starting at '1' (eg,
# v3.0.0-0.alpha.1, v3.0.0-0.alpha.2, etc)
# - 'b' may also be specified with 'Q' and when specified, should start with
# '1' (eg, v3.0.0-0.alpha.1.1, v3.0.0-0.alpha.1.2, etc)
# - changes to 'M', 'm', 'Q' and 'q' indicate influxdb code changes compared to
# prior tags, while 'B' and 'b' indicate only packaging changes.
#
# By following these rules, packager should set package versions that are
# upgradable (eg, in package repositories).
#
# The CIRCLE_TAG regex enforces these rules, falling back to
# 3.0.0+snapshot-<git hash> if it doesn't match.
version:
- match: '^v[0-9]+.[0-9]+.[0-9]+(-[0-9]+.(alpha|beta|rc).[0-9]+(.[0-9]+)?)?$'
- match: '^v[0-9]+\.[0-9]+\.[0-9]+(-([2-9]|[1-9][0-9]+|0\.(alpha|beta|rc)\.[1-9][0-9]*(\.[1-9][0-9]*)?))?$'
value: '{{env.CIRCLE_TAG[1:]}}'
- match: '.*'
value: '3.0.0+snapshot-{{env.CIRCLE_SHA1[:8]}}'