Prepare analysis on SonarQube Error

Hello!
I have built a Azure DevOp pipeline where I want to analyse a specific file. This file has been downloaded successfully from an external source but I need to define the source location within the “Prepare analysis on SonarQube”. This is where I am getting stuck. Normally if I was using an artifact then this would be a lot easier to resolve, I successfully tested this method with a test artifact. Then again I could be wrong with my assumptions. There are a number of other undefined variables in the following logs but I never had this problem when using an AzureDevOps artifact.

This is the actual error:
2021-02-12T10:36:38.4230678Z ##[debug]cliSources=/home/vsts/work/r1/a/widget/
2021-02-12T10:36:38.4231408Z ##[debug][SQ] API GET: ‘/api/server/version’ with query “undefined”
2021-02-12T10:36:39.0491806Z ##[debug]Response: 200 Body: “8.2.0.32929”
2021-02-12T10:36:39.0494071Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/##########/
2021-02-12T10:36:39.0494971Z ##[debug]System.PullRequest.PullRequestId=undefined
2021-02-12T10:36:39.0495671Z ##[debug]Build.Repository.Provider=undefined
2021-02-12T10:36:39.0496290Z ##[debug]Build.SourceBranch=undefined
2021-02-12T10:36:39.0497563Z ##[debug]SonarCloud or SonarQube version >= 7.2.0 detected, setting report-task.txt file to its newest location.
2021-02-12T10:36:39.0498425Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2021-02-12T10:36:39.0499050Z ##[debug]Build.BuildNumber=undefined
2021-02-12T10:36:39.0499657Z ##[debug]task result: Failed
2021-02-12T10:36:39.0535248Z ##[error]Path must be a string. Received undefined
2021-02-12T10:36:39.0545474Z ##[debug]Processed: ##vso[task.issue type=error;]Path must be a string. Received undefined
2021-02-12T10:36:39.0547788Z ##[debug]Processed: ##vso[task.complete result=Failed;]Path must be a string. Received undefined

Would a CI pipeline be more appropriate than a CD Release pipeline?