-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Prerequisites
- I have written a descriptive issue title
- I have searched issues to ensure it has not already been reported
GitVersion package
AzureDevops task v4.0.1 using GitVersion v6.3.0
What are you seeing?
When executing the gitversion/execute AzureDevops task, the following error message is displayed :
2025-07-28T15:14:56.4740733Z ##[debug]Found tool executable at: C:\agent\_work\_tool\GitVersion.Tool\6.3.0\dotnet-gitversion.exe
2025-07-28T15:14:56.4741785Z Command: C:\agent\_work\_tool\GitVersion.Tool\6.3.0\dotnet-gitversion.exe --roll-forward Major C:\agent\_work\3\s /output json /l console /config C:\agent\_work\3\s\GitVersion.yml
2025-07-28T15:15:04.6365146Z ##[debug]Parsing GitVersion output
2025-07-28T15:15:04.6366575Z ##[debug]dotnet-gitversion failed
2025-07-28T15:15:04.6386262Z ##[error]Expected property name or '}' in JSON at position 1
2025-07-28T15:15:04.6395247Z ##[debug]Processed: ##vso[task.issue type=error;]Expected property name or '}' in JSON at position 1
2025-07-28T15:15:04.6395969Z ##[debug]task result: Failed
2025-07-28T15:15:04.6396750Z ##[error]Expected property name or '}' in JSON at position 1
2025-07-28T15:15:04.6398946Z ##[debug]Processed: ##vso[task.issue type=error;]Expected property name or '}' in JSON at position 1
2025-07-28T15:15:04.6400709Z ##[debug]Processed: ##vso[task.complete result=Failed;done=true;]Expected property name or '}' in JSON at position 1
A similar issue was raised and closed here, but using version 3.1.11 : #1532 I tried to use a minimal configuration for testing purpose, without success.
Manually executing the command shown in the task log is working fine. As we can see with the timestamp and logs, the output of the task seems to be the problem, however the result is a valid JSON (verified)
What is expected?
The task should execute without errors
Steps to Reproduce
The GitVersion.yml configuration used :
mode: ContinuousDelivery
minor-version-bump-message: '^Merged (?:PR (?<PullRequestNumber>\d+)):\s+[Mm]erge\srelease\/v?\d+\.\d+\.\d+\s(into|to) master'
ignore:
commits-before: '2025-01-01T00:00:00'
merge-message-formats:
tfs: '^Merged (?:PR (?<PullRequestNumber>\d+)):\s+[Mm]erge\s(?<SourceBranch>.+)\s(into|to)\s(?<TargetBranch>.+)'
branches:
develop:
mode: ContinuousDelivery
release:
label : rc
feature:
regex: ^features?[/-]|^fix?[/-]|^update?[/-]
source-branches: [ 'develop' ]
hotfix:
label : hf
source-branches: [ 'main' ]The pipeline configuration (relevant part) :
- job: GitTag
steps:
- checkout: 'self'
fetchDepth: 0
clean: false
# leave the OAuth token in the Git config after the initial fetch
persistCredentials: true
- task: gitversion/[email protected]
displayName: 'Install GitVersion'
inputs:
versionSpec: '6.3.*'
- task: gitversion/[email protected]
displayName: 'Use GitVersion'
inputs:
targetPath: '$(System.DefaultWorkingDirectory)'
configFilePath: '$(System.DefaultWorkingDirectory)/GitVersion.yml'Output log or link to your CI build (if appropriate).
==============================================================================
##[debug]Using node path: C:\agent\externals\node20_1\bin\node.exe
Running on: 'Azure Pipelines'
##[debug]Disabling telemetry
Disable Telemetry
##[debug]Processed: ##vso[task.setvariable variable=DOTNET_CLI_TELEMETRY_OPTOUT;isOutput=false;issecret=false;]true
##[debug]Processed: ##vso[task.setvariable variable=DOTNET_NOLOGO;isOutput=false;issecret=false;]true
##[debug]getVariable - INPUT_TARGETPATH: C:\agent\_work\3\s
##[debug]getVariable - INPUT_DISABLECACHE: false
##[debug]getVariable - INPUT_DISABLENORMALIZATION: false
##[debug]getVariable - INPUT_DISABLESHALLOWCLONECHECK: false
##[debug]getVariable - INPUT_CONFIGFILEPATH: C:\agent\_work\3\s\GitVersion.yml
##[debug]getVariable - INPUT_OVERRIDECONFIG:
##[debug]getVariable - INPUT_UPDATEASSEMBLYINFO: false
##[debug]getVariable - INPUT_UPDATEASSEMBLYINFOFILENAME:
##[debug]getVariable - INPUT_UPDATEPROJECTFILES: false
##[debug]getVariable - INPUT_BUILDNUMBERFORMAT:
##[debug]getVariable - BUILD_SOURCESDIRECTORY: C:\agent\_work\3\s
Command: git -C C:\agent\_work\3\s rev-parse --is-shallow-repository
##[debug]getVariable - INPUT_CONFIGFILEPATH: C:\agent\_work\3\s\GitVersion.yml
##[debug]getVariable - BUILD_SOURCESDIRECTORY: C:\agent\_work\3\s
##[debug]getVariable - GITVERSION_PATH: C:\agent\_work\_tool\GitVersion.Tool\6.3.0
##[debug]Found tool executable at: C:\agent\_work\_tool\GitVersion.Tool\6.3.0\dotnet-gitversion.exe
Command: C:\agent\_work\_tool\GitVersion.Tool\6.3.0\dotnet-gitversion.exe --roll-forward Major C:\agent\_work\3\s /output json /l console /config C:\agent\_work\3\s\GitVersion.yml
##[debug]Parsing GitVersion output
##[debug]dotnet-gitversion failed
##[error]Expected property name or '}' in JSON at position 1
##[debug]Processed: ##vso[task.issue type=error;]Expected property name or '}' in JSON at position 1mprimeaux and vseguin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working