Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): GHA - plugin builds require SemVer #1108

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

kskewes-sf
Copy link
Contributor

I wanted to avoid confusion between a git tag X building version X and a
master or release branch building version X-dev-* but it seems unavoidable.
SemVer is required by plugins.
See constraint: https://github.com/spinnaker/kork/blob/5dc6bb98615667f1b4f3e18445c1651d773c9f6b/kork-plugins/src/main/kotlin/com/netflix/spinnaker/kork/plugins/SpinnakerServiceVersionManager.kt#L47

changes:

  • fetch full git repository so that we can access previous tag in branch.
    Convert release.yml to this method instead of run: git.. --unshallow.
  • use previous git tag as start of version string. Cut the 'v' prefix from the
    tag, 'v1.2.3' -> '1.2.3' as required for Plugins (and Debians fwiw):
    Caused by: Unexpected character 'LETTER(v)' at position '0', expecting '[DIGIT]'
  • append -dev-<branch_name|'pr'> to designate that it is not an
    official version. The short git SHA and date time are NOT present on
    release versions (eg: 1.2.3) so that also differs.
  • do this version setting in pr.yml as well so we might pick up version
    issues in PR's and not just at merge.

I wanted to avoid confusion between a git tag `X` building version `X` and a
master or release branch building version `X-dev-*` but it seems unavoidable.
SemVer is required by plugins.
See constraint: https://github.com/spinnaker/kork/blob/5dc6bb98615667f1b4f3e18445c1651d773c9f6b/kork-plugins/src/main/kotlin/com/netflix/spinnaker/kork/plugins/SpinnakerServiceVersionManager.kt#L47

changes:
- fetch full git repository so that we can access previous tag in branch.
  Convert `release.yml` to this method instead of `run: git.. --unshallow`.
- use previous git tag as start of version string. Cut the 'v' prefix from the
  tag, 'v1.2.3' -> '1.2.3' as required for Plugins (and Debians fwiw):
  `Caused by: Unexpected character 'LETTER(v)' at position '0', expecting '[DIGIT]'`
- append `-dev-<branch_name|'pr'>` to designate that it is not an
  official version. The short git SHA and date time are NOT present on
  release versions (eg: 1.2.3) so that also differs.
- do this version setting in `pr.yml` as well so we might pick up version
  issues in PR's and not just at merge.
@dbyron-sf dbyron-sf merged commit 0e195fe into spinnaker:master Mar 17, 2022
@kskewes-sf kskewes-sf deleted the gha-fix-ver branch March 17, 2022 20:19
@kskewes-sf kskewes-sf restored the gha-fix-ver branch July 14, 2022 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants