How can we help you today? How can we help you today?

PowershellGallery.ps1 error in Build

Hello,

I am receiving an error when doing a DLM automation build.
'...\_tasks\RedgateDlmAutomationBuild\2.0.24\PowershellGallery.ps1' is not recognized as the name of a cmdlet...
 It seems to be coming from this part in the 'DlmAutomationBuild.ps1' script.
. (Join-Path $PSScriptRoot PowershellGallery.ps1)

Am I supposed to have a 'PowershellGallery.ps1' script in that location?  I am running Powershell v5.1 and have the PSGallery repo and powershellGet:

PajamaSam
0

Comments

10 comments

  • Mike U
    Sorry about that. We had a packaging error in that release of the VSTS extension, and that file was missed out. We released another build, 2.0.25 soon after that should have fixed the problem.
    Mike U
    0
  • PajamaSam
    Thanks Mike, the 2.0.25 version worked
    PajamaSam
    0
  • markg
    How does one go about making the build agent update the tasks? Mine is stuck using 2.0.24
    markg
    0
  • Mike U
    Hi @markg - are you using VSTS or TFS? And if your're using TFS, which version?

    Under VSTS, the tasks should auto-update. For TFS, you'll have to manually update, following Microsoft's instructions: https://docs.microsoft.com/en-us/vsts/marketplace/get-tfs-extensions?view=tfs-2018

    Mike U
    0
  • markg
    I'm using VSTS and it isn't auto updating. I even deleted the task, restarted the agent, and it pulled 2.0.24 again


    markg
    0
  • Mike U
    That's very strange. What version do you see when you go to https://marketplace.visualstudio.com/items?itemName=redgatesoftware.redgateDlmAutomationBuild
    Mike U
    0
  • markg
    I see 2.0.25, and when I hit "Get it free", it says I already have it installed, of course. 

    I wonder if there is some sort of progressive roll out? When I check the Initialize Job task it just says:

    "2018-05-22T14:42:16.0429930Z ##[section]Starting: Initialize Job
    2018-05-22T14:42:16.0520965Z Prepare build directory.
    2018-05-22T14:42:16.1000390Z Set build variables.
    2018-05-22T14:42:16.1049168Z Download all required tasks.
    2018-05-22T14:42:16.1767489Z ##[section]Finishing: Initialize Job"
    markg
    0
  • markg
    As a temporary workaround (because we are completely stuck) I deleted the 2.0.24 folder and renamed the 2.0.23 folder to 2.0.24.
    markg
    0
  • Mike U
    Hope that's worked for you. You could also just have copied the PowerShellGallery.ps1 and SqlCi.ps1 files from 2.0.23 to 2.0.24, because that's all that was missing. 

    I'm really not sure why it's not updating to 2.0.25 though. I'm not aware of any progressive rollout, unless it's something Microsoft does from their end.
    Mike U
    0
  • markg
    Hi Mike,

    Yes, that worked. I'm really puzzled as to why it isn't updating too. Especially since it updated from 23 to 24.

    Thanks for the help.
    markg
    0

Add comment

Please sign in to leave a comment.