Closed nilleb closed 8 years ago
Hi - we've had some problems with including some scripts, but I was hoping they were all fixed. I just ran a build + SQ using the hosted agent and it seemed fine.
Are you using an on-premise build agent? What versions of the SQ tasks are being used? You can see this in the logs on the first line of each task: "C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\SonarQubePostTest\1.0.38\SonarQubePostTest.ps1" --> 1.0.38
Yes, I am using an on premises agent (bound to a TFS 2015 with no update) sonarqubeposttest shows a 1.0.38 version sonarqubeprebuild shows a 1.0.36 version
Just in case you ask, I have uploaded these tasks to the server using a slightly modified version of https://gist.github.com/jrgcubano/03642796b9178c69eb30
The master HEAD is at b5ed52 by Anubhav Aggarwal, 3/2/2016, in our local clone.
Ah I see now!
There was a fix I cherry picked on March 3, commit 430127B - this will get rid of one of the import problems, but not all of them.
Do you build the tasks before uploading them? The build will copy the SonarQubeHelper.ps1 from https://github.com/Microsoft/vso-agent-tasks/blob/master/Tasks/Common/SonarQubeHelpers/SonarQubeHelper.ps1 file to expected location on each task. Alternatively you can copy this file to the each task manually before building, but I strongly suggest you go through with the build as that's how we do it.
Building is easy, follow the instructions from here: https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/contribute.md (so install node, gulp & typescript and build using gulp). You do to need to package / run tests. After the build completes a _build directory is created in the root of your repo that holds the built tasks. These you should upload.
A few more notes:
Don't hesitate to come back with any problems! Bogdan
Thanks a lot, Bogdan.
I've seen how you copy Common\SonarQubeHelpers, that's neat (common.json, isn't it?).
I have cherry picked the commit 430127B, as you told. I mistakenly believed that the latest commit was aged 13 days, reading the upper right corner of the file listing in https://github.com/Microsoft/vso-agent-tasks/tree/master/Tasks/SonarQubePostTest). Thus, older than my last fetch. I should have read the upper right corner of the file history in https://github.com/Microsoft/vso-agent-tasks/blob/master/Tasks/SonarQubePostTest/SonarQubePostTest.ps1, which show up 6 days :-)).
The original reason for which we preferred the powershell upload script is that tfx-cli didn't support NTLM, Negotiate schemes.
I'll see that with the production environment administrator.. :-)
Thanks, I'm going to close the issue!
Great, I'm glad this works!
SonarQubePreTest
SonarQubePostTest
Sorry for the french locale. These messages mean that the files above can't be found.
If the file ./Common/SonarQubeHelpers/SonarQubeHelper.ps1 can be found up one level (so, I guess you're refactoring the code but you've still not completed it), I can't find anywhere the file CodeAnalysisFilePathComputation.ps1..
Could you please help ?