Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell task without Azure DevOps Extension #139

Open
GeofoxCoding opened this issue Jan 17, 2023 · 0 comments
Open

Powershell task without Azure DevOps Extension #139

GeofoxCoding opened this issue Jan 17, 2023 · 0 comments

Comments

@GeofoxCoding
Copy link

Hi,

for some reason we are unable to add the *.vsix Extension to our Azure DevOps Server. If we try to open http://our-server/_gallery/manage we get an error:

TF53001: The database operation was canceled by an administrator

So is there any other option to use MagicChunks inside a PowerShell@2 task?

I downloaded the binaries to our build agent and I do the following:

- task: PowerShell@2
  inputs:
    targetType: 'inline'
    script: |
      Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass;
      Import-Module "C:\MagicChunks-1.3.1\MagicChunks.psm1";
      Format-MagicChunks -path "$(Build.ArtifactStagingDirectory)\docker-compose.yml" -type "Yaml" -transformations @{"some/node" = "some new value";}

This gives me an exception in my pipeline:
File or assembly "file:///C:\MagicChunks-1.3.1\MagicChunks.dll" or a dependency of it not found ...

If I execute it on build agents powershell directly, I get even more information:
Transforming file C:\buildagent_work\16\s\docker-compose.yml
Format-MagicChunks : File transformation error: Type[MagicChunks.Core.TransformationCollection] not found ... check if assembly has been loaded ...

From my understanding Import-Module should load everything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant