Fix CI pipeline GitVersion constraint, compatibility, and configuration errors#48
Conversation
Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the GitVersion tool specification in GitHub Actions workflows to use a more specific version range. The change pins GitVersion to the 6.0.x series rather than accepting any 6.x version.
- GitVersion specification changed from
'6.x'to'6.0.x'for more precise version control
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Updated GitVersion setup to use '6.0.x' instead of '6.x' |
.github/workflows/pr-validation.yml |
Updated GitVersion setup to use '6.0.x' instead of '6.x' |
maximilien-noal
left a comment
There was a problem hiding this comment.
Command failed: /opt/hostedtoolcache/GitVersion.Tool/6.0.5/dotnet-gitversion /home/runner/work/Cryogenic/Cryogenic /output json /output buildserver /config GitVersion.yml
@copilot the next stage fails now
…6.x command syntax Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
The issue was that gittools/actions@v3.0.0 uses GitVersion 5.x command syntax which is incompatible with GitVersion 6.x. Upgraded to gittools/actions@v3.1.1 which properly supports GitVersion 6.x command-line syntax. Fixed in commit 091ff94. |
maximilien-noal
left a comment
There was a problem hiding this comment.
GitVersion output is not valid JSON
Maybe we don't have a version defined in the csproj or directory.build.props
…seline Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
The branch name |
|
GitVersion output is not valid JSON Dotnet gitversion output is still undefined Failure in determinate version stage |
…n JSON output Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
Added |
Description of Changes
Changed
versionSpec: '6.x'toversionSpec: '6.0.x'and upgradedgittools/actionsfrom@v3.0.0to@v3.1.1in GitVersion setup and execute steps for bothpr-validation.ymlandrelease.ymlworkflows. Addedfetch-tags: trueto checkout steps. Addedcopilotbranch configuration,next-version: 0.1.0baseline, and assembly versioning configuration (assembly-versioning-scheme,assembly-file-versioning-scheme,assembly-informational-format) toGitVersion.yml.Rationale behind Changes
GitTools/actions@v3.0.0 had two issues:
>=5.2.0 <6.1.0, but6.xspec resolves to 6.5.0, which violates the upper bound/output) which is incompatible with GitVersion 6.x (requires--output)Additionally, GitVersion.yml was missing configuration for
copilot/*branch patterns, causing GitVersion to fail with invalid JSON output when run on branches that don't match existing patterns.GitVersion also requires:
3. Tags to be fetched: The checkout action needs to explicitly fetch tags for GitVersion to properly calculate versions based on git history
4. Assembly versioning schemes: GitVersion requires explicit assembly versioning configuration to generate valid JSON output with proper version formatting
Constraining to
6.0.xensures resolution stays within a compatible version range, upgrading to gittools/actions@v3.1.1 provides proper support for GitVersion 6.x command-line syntax, adding thecopilotbranch configuration with anext-versionbaseline enables GitVersion to properly calculate versions for all branch types, and addingfetch-tags: truewith assembly versioning schemes ensures GitVersion can generate valid JSON output.Suggested Testing Steps
Trigger the PR validation workflow—GitVersion installation and execution should complete without version constraint, command syntax, or configuration errors. GitVersion should successfully generate valid JSON output with proper semantic versioning.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.