Skip to content

[ISSUE]: The pipeline references a task called 'gitversion/setup & gitversion/execute' #4805

@hgolay

Description

@hgolay

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

AzureDevops task

GitVersion version

3.2.0

Operating system

Windows

What are you seeing?

When using the gitversion/setup & gitversion/execute tasks on latest gitversion version 4.2.0.251104141 (Dernier) on our QA instance like so:

  - task: gitversion/setup@3.2.0
    displayName: Install GitVersion
    inputs:
      versionSpec: '6.3.x'

  - task: gitversion/execute@3
    displayName: Determine Version
    inputs:
      overrideConfig: $(overrideConfig)
      useConfigFile: ${{ parameters.useGitVersionConfig }}
      configFilePath: ${{ parameters.pathGitVersionConfig }}

We get the following error

A task is missing. The pipeline references a task called 'gitversion/setup'. This usually indicates the task isn't installed, and you may be able to install it from the Marketplace: https://marketplace.visualstudio.com. (Task version 3.2.0, job 'run_build_job', step ''.)
A task is missing. The pipeline references a task called 'gitversion/execute'. This usually indicates the task isn't installed, and you may be able to install it from the Marketplace: https://marketplace.visualstudio.com. (Task version 3, job 'run_build_job', step ''.)

When using the newer gitversion task like so:

  - task: gitversion-setup@4
    displayName: Install GitVersion
    inputs:
      versionSpec: "6.4.x"

  - task: gitversion-execute@4
    displayName: Determine Version
    inputs:
      overrideConfig: $(overrideConfig)
      useConfigFile: ${{ parameters.useGitVersionConfig }}
      configFilePath: ${{ parameters.pathGitVersionConfig }}

We get as expected the following error: ##[error]No agent found in pool Default which satisfies the specified demands: maven, Agent.Version -gtVersion 4.244.1 as we are not running the latest Azure DevOps (2025) update. We are still on Azure DevOps 2022.

What is expected?

On prod we don't have this problem, we suspect that it is because we have the full history of releases of the gitversion task so running:

  - task: gitversion/setup@3.2.0
    displayName: Install GitVersion
    inputs:
      versionSpec: '6.3.x'

  - task: gitversion/execute@3
    displayName: Determine Version
    inputs:
      overrideConfig: $(overrideConfig)
      useConfigFile: ${{ parameters.useGitVersionConfig }}
      configFilePath: ${{ parameters.pathGitVersionConfig }}

works correctly.

We would like to have the same behaviour on both our instances.

Steps to Reproduce

Install gitversion's latest versino on a fresh ADO 2022 server and run a pipeline with the following steps:

 - task: gitversion/setup@3.2.0
   displayName: Install GitVersion
   inputs:
     versionSpec: '6.3.x'

 - task: gitversion/execute@3
   displayName: Determine Version
   inputs:
     overrideConfig: $(overrideConfig)
     useConfigFile: ${{ parameters.useGitVersionConfig }}
     configFilePath: ${{ parameters.pathGitVersionConfig }}

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions