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

NX Cloud agent: dotnet is not installed - setup-dotnet action is ignored #27558

Closed
1 of 4 tasks
roldengarm opened this issue Aug 21, 2024 · 6 comments
Closed
1 of 4 tasks

Comments

@roldengarm
Copy link

roldengarm commented Aug 21, 2024

Current Behavior

My repo depends on .NET as we're using nx-dotnet.
I'm starting a ci-run on 8 linux-medium-js and then have below two actions

 - uses: actions/setup-dotnet@v4
    with:
      dotnet-version: '8.0.100'
  - run: npm ci

Then, npm ci fails, as dotnet is not installed on the runner:

nx g @nx-dotnet/core:restore
27   
28   /bin/sh: 1: dotnet: not found

Expected Behavior

It installs dotnet on the agent before running npm ci

GitHub Repo

No response

Steps to Reproduce

  1. add https://www.nx-dotnet.com/core to a repo
  2. enable nx cloud
  3. try to run npm ci

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.16.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.8.1

nx                 : 19.5.7
@nx/js             : 19.5.7
@nx/jest           : 19.5.7
@nx/linter         : 19.5.7
@nx/eslint         : 19.5.7
@nx/workspace      : 19.5.7
@nx/angular        : 19.5.7
@nx/cypress        : 19.5.7
@nx/devkit         : 19.5.3
@nx/eslint-plugin  : 19.5.7
@nrwl/tao          : 19.5.7
@nx/web            : 19.5.7
@nx/webpack        : 19.5.7
nx-cloud           : 19.0.0
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx-dotnet/core
@nx/cypress/plugin
---------------------------------------
Community plugins:
@fortawesome/angular-fontawesome : 0.15.0
@jsverse/transloco               : 7.4.3
@nx-dotnet/core                  : 2.4.3
ng2-charts                       : 6.0.1
---------------------------------------
The following packages should match the installed version of nx
  - @nx/[email protected]
  - @nrwl/[email protected]

To fix this, run `nx migrate [email protected]`

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I guess another workflow action has to be added to this repo?
Or alternatively, can we customise the docker image used for the runner?

@EelcoLos
Copy link

EelcoLos commented Aug 23, 2024

can concur, this happens to me as well: https://github.com/EelcoLos/nx-tinkering/actions/runs/10520973969/job/29150814666

and
https://cloud.nx.app/cipes/66c831638af1d9575b458e83?step=start-agent-step#step-list-pane

@roldengarm
Copy link
Author

@EelcoLos I'm pretty sure it's currently just not supported.
See the workflow of the cloud runner here
There are only templates for js and jvm.

I did see a topic there about Docker, which could solve the problem, but that's Enterprise only at the moment.

@EelcoLos
Copy link

EelcoLos commented Aug 23, 2024

@roldengarm
Copy link
Author

roldengarm commented Aug 23, 2024

@EelcoLos ah, didn't see the nx-dotnet templates! This is not documented I believe.
So, it worked for you with this ci.yml file, where you point to your custom agent, which installs dotnet, right?

/edit: @EelcoLos that works indeed! I had to swap dotnet install and npm install but that's fine.

@FrozenPandaz
Copy link
Collaborator

Correct! You'll need to define your own custom launch templates to use dotnet in Nx Agents.

Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants