GitTools / actions

GitHub Action that installs and uses the GitVersion and GitReleaseManager tools
MIT License
216 stars 62 forks source link

[ISSUE]: ADO Extension Broken #1165

Closed tsharp closed 1 month ago

tsharp commented 1 month ago

Prerequisites

GitVersion package

AzureDevops task

What are you seeing?

We're seeing ##[error]The "path" argument must be of type string. Received type undefined after the ado extension was updated to v1.2.0.24070918 and has broken all builds.

What is expected?

The correct version to run

Steps to Reproduce

Run a build with the latest extension and this configuration:

stages:
  - stage: Version
    condition: always()
    jobs:
      - job: version_number
        # pool:
        #   vmImage: ubuntu-latest
        steps:
          - checkout: self
            fetchDepth: 0

          - task: gitversion/setup@1.1.1
            displayName: Install GitVersion
            inputs:
              versionSpec: '5.x'

          - task: gitversion/execute@1.1.1
            displayName: Apply Version Build Number
            inputs:
              targetPath: '$(Build.SourcesDirectory)'
              useConfigFile: true
              configFilePath: 'GitVersion.yml'
              additionalArguments: '/l console /output buildserver'
              preferBundledVersion: true
              noFetch: false
              disableShallowCloneCheck: true

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

2024-07-11T04:44:40.9125541Z ##[section]Starting: version_number
2024-07-11T04:44:41.1844533Z ##[section]Starting: Initialize job
2024-07-11T04:44:41.1848911Z Agent name: 'ado-build-agent-86b5c855f-qkxqb'
2024-07-11T04:44:41.1849502Z Agent machine name: 'ado-build-agent-86b5c855f-qkxqb'
2024-07-11T04:44:41.1849767Z Current agent version: '3.239.1'
2024-07-11T04:44:41.1937059Z Prepare build directory.
2024-07-11T04:44:41.2413678Z Set build variables.
2024-07-11T04:44:41.2455575Z Download all required tasks.
2024-07-11T04:44:41.3511316Z Checking job knob settings.
2024-07-11T04:44:41.3521284Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2024-07-11T04:44:41.3522084Z    Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS) 
2024-07-11T04:44:41.3522413Z    Knob: UseLatestGitVersion = true Source: $(USE_LATEST_GIT_VERSION) 
2024-07-11T04:44:41.3523814Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2024-07-11T04:44:41.3527148Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2024-07-11T04:44:41.3528343Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2024-07-11T04:44:41.3528665Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2024-07-11T04:44:41.3528962Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2024-07-11T04:44:41.3529267Z    Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC) 
2024-07-11T04:44:41.3529912Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2024-07-11T04:44:41.3530197Z    Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
2024-07-11T04:44:41.3530581Z    Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
2024-07-11T04:44:41.3530877Z    Knob: MountWorkspace = true Source: $(AZP_AGENT_MOUNT_WORKSPACE) 
2024-07-11T04:44:41.3531267Z    Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT) 
2024-07-11T04:44:41.3531598Z    Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK) 
2024-07-11T04:44:41.3531863Z Finished checking job knob settings.
2024-07-11T04:44:41.3857410Z Start tracking orphan processes.
2024-07-11T04:44:41.3915104Z ##[section]Finishing: Initialize job
2024-07-11T04:44:41.4119853Z ##[section]Async Command Start: DetectDockerContainer
2024-07-11T04:44:41.4120084Z ##[section]Async Command End: DetectDockerContainer
2024-07-11T04:44:41.4120742Z ##[section]Async Command Start: DetectDockerContainer
2024-07-11T04:44:41.4120942Z ##[section]Async Command End: DetectDockerContainer
2024-07-11T04:44:41.4342736Z ##[section]Starting: Checkout <REDACTED>@main to s
2024-07-11T04:44:41.4569421Z ==============================================================================
2024-07-11T04:44:41.4570102Z Task         : Get sources
2024-07-11T04:44:41.4570403Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2024-07-11T04:44:41.4570538Z Version      : 1.0.0
2024-07-11T04:44:41.4570760Z Author       : Microsoft
2024-07-11T04:44:41.4571112Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2024-07-11T04:44:41.4571237Z ==============================================================================
2024-07-11T04:44:41.9664142Z Syncing repository: <REDACTED> (Git)
2024-07-11T04:44:41.9695869Z ##[command]git version
2024-07-11T04:44:42.0289906Z git version 2.33.8
2024-07-11T04:44:42.0312512Z ##[command]git lfs version
2024-07-11T04:44:42.0628530Z git-lfs/3.1.4 (GitHub; linux amd64; go 1.20.10)
2024-07-11T04:44:42.0632255Z ##[command]git config --get remote.origin.url
2024-07-11T04:44:42.0683145Z ##[command]git clean -ffdx
2024-07-11T04:44:42.0689552Z ##[command]git reset --hard HEAD
2024-07-11T04:44:42.0743561Z HEAD is now at 0338ffa <REDACTED>
2024-07-11T04:44:42.0753294Z ##[command]git config gc.auto 0
2024-07-11T04:44:42.0799493Z ##[command]git config core.longpaths true
2024-07-11T04:44:42.0834865Z ##[command]git config --get-all http.https://<REDACTED>@dev.azure.com/<REDACTED>/<REDACTED>/_git/<REDACTED>.extraheader
2024-07-11T04:44:42.0872643Z ##[command]git config --get-all http.extraheader
2024-07-11T04:44:42.0905758Z ##[command]git config --get-regexp .*extraheader
2024-07-11T04:44:42.0933809Z ##[command]git config --get-all http.proxy
2024-07-11T04:44:42.0958001Z ##[command]git config http.version HTTP/1.1
2024-07-11T04:44:42.1124523Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin
2024-07-11T04:44:42.2993713Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin   +<REDACTED>
2024-07-11T04:44:42.4252674Z From https://dev.azure.com/<REDACTED>/<REDACTED>/_git/<REDACTED>
2024-07-11T04:44:42.4253944Z  * branch            <REDACTED> -> FETCH_HEAD
2024-07-11T04:44:42.4970174Z ##[command]git checkout --progress --force <REDACTED>
2024-07-11T04:44:42.4988209Z HEAD is now at 0338ffa Merged PR 288: Integrate Changes Back to Main
2024-07-11T04:44:42.5053709Z ##[section]Finishing: Checkout <REDACTED>@main to s
2024-07-11T04:44:42.5079673Z ##[section]Starting: Install GitVersion
2024-07-11T04:44:42.5084449Z ==============================================================================
2024-07-11T04:44:42.5084609Z Task         : Setup GitVersion Task
2024-07-11T04:44:42.5084697Z Description  : Easy Semantic Versioning (https://semver.org) for projects using Git
2024-07-11T04:44:42.5084831Z Version      : 1.1.1
2024-07-11T04:44:42.5084900Z Author       : GitTools Contributors
2024-07-11T04:44:42.5085007Z Help         : See the [documentation](https://gitversion.net/docs/) for help
2024-07-11T04:44:42.5085153Z ==============================================================================
2024-07-11T04:44:42.7655070Z Agent: 'Azure Pipelines'
2024-07-11T04:44:42.7668858Z 
2024-07-11T04:44:42.7669945Z --------------------------
2024-07-11T04:44:42.7672730Z Acquiring GitVersion.Tool version spec: 5.x
2024-07-11T04:44:42.7673410Z --------------------------
2024-07-11T04:44:43.1942367Z Found tool in cache: GitVersion.Tool 5.12.0 x64
2024-07-11T04:44:43.1965098Z --------------------------
2024-07-11T04:44:43.1988995Z GitVersion.Tool version: 5.12.0 found in local cache at /azp/_work/_tool/GitVersion.Tool/5.12.0/x64.
2024-07-11T04:44:43.2000065Z --------------------------
2024-07-11T04:44:43.2005270Z Prepending PATH environment variable with directory: /azp/_work/_tool/GitVersion.Tool/5.12.0/x64
2024-07-11T04:44:43.2088996Z ##[section]Finishing: Install GitVersion
2024-07-11T04:44:43.2117894Z ##[section]Starting: Apply Version Build Number
2024-07-11T04:44:43.2127059Z ==============================================================================
2024-07-11T04:44:43.2127365Z Task         : Execute GitVersion Task
2024-07-11T04:44:43.2127566Z Description  : Easy Semantic Versioning (https://semver.org) for projects using Git
2024-07-11T04:44:43.2127838Z Version      : 1.2.0
2024-07-11T04:44:43.2127986Z Author       : GitTools Contributors
2024-07-11T04:44:43.2128176Z Help         : See the [documentation](https://gitversion.net/docs/) for help
2024-07-11T04:44:43.2128449Z ==============================================================================
2024-07-11T04:44:43.5672647Z Running on: 'Azure Pipelines'
2024-07-11T04:44:43.5674446Z Disable Telemetry
2024-07-11T04:44:43.5685312Z Executing GitVersion
2024-07-11T04:44:43.5797089Z ##[error]The "path" argument must be of type string. Received type undefined
2024-07-11T04:44:43.5823407Z ##[section]Finishing: Apply Version Build Number
2024-07-11T04:44:43.5853025Z ##[section]Starting: Checkout <REDACTED>@main to s
2024-07-11T04:44:43.5857961Z ==============================================================================
2024-07-11T04:44:43.5858278Z Task         : Get sources
2024-07-11T04:44:43.5858438Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2024-07-11T04:44:43.5858707Z Version      : 1.0.0
2024-07-11T04:44:43.5858859Z Author       : Microsoft
2024-07-11T04:44:43.5859018Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2024-07-11T04:44:43.5859266Z ==============================================================================
2024-07-11T04:44:44.0341350Z Cleaning any cached credential from repository: <REDACTED> (Git)
2024-07-11T04:44:44.0486626Z ##[section]Finishing: Checkout <REDACTED>@main to s
2024-07-11T04:44:44.0614646Z ##[section]Starting: Finalize Job
2024-07-11T04:44:44.0657427Z Cleaning up task key
2024-07-11T04:44:44.0658869Z Start cleaning up orphan processes.
2024-07-11T04:44:44.0678813Z ##[section]Finishing: Finalize Job
2024-07-11T04:44:44.0763202Z ##[section]Finishing: version_number
arturcic commented 1 month ago

Please run the pipeline with the diagnostics:

image

This will log debug information and will be easier to understand the issue

arturcic commented 1 month ago

please use latest version of the Azure DevOps task as version 6.x of GitVersion