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

DSC on Azure Pipelines Ubuntu #588

Open
3 tasks done
Gijsreyn opened this issue Oct 27, 2024 · 1 comment
Open
3 tasks done

DSC on Azure Pipelines Ubuntu #588

Gijsreyn opened this issue Oct 27, 2024 · 1 comment
Labels
Issue-Bug Something isn't working Need-Review

Comments

@Gijsreyn
Copy link
Contributor

Gijsreyn commented Oct 27, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

I am experiencing issues when installing dsc.exe on ubuntu-latest agent pool in Azure Pipelines. I'm running the following script:

jobs: 
  - job: test
    displayName: 'test'
    pool: 
      vmImage: ubuntu-latest
    steps: 
      - checkout: self 
        persistCredentials: true 
      - task: PowerShell@2
        displayName: "Run"
        inputs:
          pwsh: true
          targetType: "inline"
          script: |
            $uri = 'https://github.com/PowerShell/DSC/releases/download/v3.0.0-preview.11/DSC-3.0.0-preview.11-x86_64-unknown-linux-gnu.tar.gz'
            $filePath = '/tmp/DSC-' + '3.0.0-preview.11' + '-x86_64-unknown-linux-gnu.tar.gz'

            curl -L -o $filePath $uri
            # Create the target folder where powershell will be placed
            sudo mkdir -p /opt/microsoft/dsc

            # Expand dsc to the target folder
            sudo tar zxf $filePath -C /opt/microsoft/dsc

            # Set execute permissions
            sudo chmod +x /opt/microsoft/dsc

            # Create the symbolic link that points to dsc
            sudo ln -s /opt/microsoft/dsc /usr/bin/dsc

            # Add to path
            $env:PATH += [System.IO.Path]::PathSeparator + "/usr/bin/dsc"

            # Call version
            dsc --version 

            # Call list of resources
            dsc -l trace resource list
          ignoreLASTEXITCODE: true

The dsc --version is properly called, but when doing the resource list, I can observe:

image

This hangs for an infinity time.

Steps to reproduce

See description

Expected behavior

Able to run `dsc resource list` on ubuntu-latest agent

Actual behavior

Hangs

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.0.0-preview.11

Visuals

No response

@Gijsreyn Gijsreyn added Issue-Bug Something isn't working Need-Review labels Oct 27, 2024
@Gijsreyn
Copy link
Contributor Author

The same is on macos-latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Need-Review
Projects
None yet
Development

No branches or pull requests

1 participant