devcontainers / devcontainers/ci

Error when running Azure DevOps pipeline on Windows Agent

Aperta
#186 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
496
Fork
101
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm getting a `[error]spawn devcontainer ENOENT` message whenever I try and run a simple pipeline on an Azure DevOps agent running Windows 10. I've tried running the command the logs indicate it's attempting to run and they work fine. I'm also just running the agent from the command line so it should have the same environment and permissions that I do.

Here's the `azure-pipelines.yml` definition:
```yaml
trigger:
- master

pool:
name: TestPool

steps:

- task: DevcontainersCi@0
inputs:
runCmd: dotnet run
```
The devcontainer.json
```json
{
"name": "Debian",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/dotnet:1": {}
},
"extensions": [
"ms-dotnettools.csharp",
"ms-azure-devops.azure-pipelines"
]
}
```

Log output with system diagnostics enabled
```
2022-12-04T23:43:58.6616649Z ##[debug]Evaluating condition for step: 'DevcontainersCi'
2022-12-04T23:43:58.6618745Z ##[debug]Evaluating: SucceededNode()
2022-12-04T23:43:58.6619095Z ##[debug]Evaluating SucceededNode:
2022-12-04T23:43:58.6619931Z ##[debug]=> True
2022-12-04T23:43:58.6620334Z ##[debug]Result: True
2022-12-04T23:43:58.6620646Z ##[section]Starting: DevcontainersCi
2022-12-04T23:43:58.6744183Z ==============================================================================
2022-12-04T23:43:58.6744423Z Task : Devcontainers CI Task
2022-12-04T23:43:58.6744624Z Description : Build and run Dev Containers (https://containers.dev) in Azure DevOps Pipelines
2022-12-04T23:43:58.6745517Z Version : 0.2.1900000228
2022-12-04T23:43:58.6745658Z Author : Devcontainers
2022-12-04T23:43:58.6745771Z Help :
2022-12-04T23:43:58.6745910Z ==============================================================================
2022-12-04T23:43:58.7206053Z ##[debug]Using node path: c:\agent\externals\node10\bin\node.exe
2022-12-04T23:43:58.9589621Z ##[debug]agent.TempDirectory=c:\agent\_work\_temp
2022-12-04T23:43:58.9614794Z ##[debug]loading inputs and endpoints
2022-12-04T23:43:58.9638250Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2022-12-04T23:43:58.9702163Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2022-12-04T23:43:58.9706222Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2022-12-04T23:43:58.9708706Z ##[debug]loading INPUT_BUILDREASONSFORPUSH
2022-12-04T23:43:58.9710972Z ##[debug]loading INPUT_PUSHONFAILEDBUILD
2022-12-04T23:43:58.9713000Z ##[debug]loading INPUT_RUNCMD
2022-12-04T23:43:58.9715062Z ##[debug]loading INPUT_SKIPCONTAINERUSERIDUPDATE
2022-12-04T23:43:58.9719419Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2022-12-04T23:43:58.9723583Z ##[debug]loaded 8
2022-12-04T23:43:58.9728725Z ##[debug]Agent.ProxyUrl=undefined
2022-12-04T23:43:58.9729676Z ##[debug]Agent.CAInfo=undefined
2022-12-04T23:43:58.9730508Z ##[debug]Agent.ClientCert=undefined
2022-12-04T23:43:58.9731379Z ##[debug]Agent.SkipCertValidation=undefined
2022-12-04T23:43:58.9795443Z ##[debug]Agent.Version=2.213.2
2022-12-04T23:43:58.9796620Z ##[debug]set task variable: hasRunMain=true
2022-12-04T23:43:58.9801811Z ##[debug]Processed: ##vso[task.settaskvariable variable=hasRunMain;issecret=false;]true
2022-12-04T23:43:58.9811938Z ##[debug]which 'docker'
2022-12-04T23:43:58.9870089Z ##[debug]found: 'C:\Program Files\Docker\Docker\resources\bin\docker.exe'
2022-12-04T23:43:58.9871911Z ##[debug]C:\Program Files\Docker\Docker\resources\bin\docker.exe arg: ["buildx","--help"]
2022-12-04T23:43:58.9873100Z ##[debug]C:\Program Files\Docker\Docker\resources\bin\docker.exe arg: ["buildx","--help"]
2022-12-04T23:43:58.9875862Z ##[debug]exec tool: C:\Program Files\Docker\Docker\resources\bin\docker.exe
2022-12-04T23:43:58.9876971Z ##[debug]exec tool: C:\Program Files\Docker\Docker\resources\bin\docker.exe
2022-12-04T23:43:58.9877843Z ##[debug]arguments:
2022-12-04T23:43:58.9878646Z ##[debug]arguments:
2022-12-04T23:43:58.9879395Z ##[debug] buildx
2022-12-04T23:43:58.9880116Z ##[debug] buildx
2022-12-04T23:43:58.9880831Z ##[debug] --help
2022-12-04T23:43:58.9881533Z ##[debug] --help
2022-12-04T23:43:59.2811989Z ##[debug]Exit code 0 received from tool 'C:\Program Files\Docker\Docker\resources\bin\docker.exe'
2022-12-04T23:43:59.2813957Z ##[debug]Exit code 0 received from tool 'C:\Program Files\Docker\Docker\resources\bin\docker.exe'
2022-12-04T23:43:59.2815641Z ##[debug]STDIO streams have closed for tool 'C:\Program Files\Docker\Docker\resources\bin\docker.exe'
2022-12-04T23:43:59.2817559Z ##[debug]STDIO streams have closed for tool 'C:\Program Files\Docker\Docker\resources\bin\docker.exe'
2022-12-04T23:43:59.2830499Z ##[debug]which 'devcontainer'
2022-12-04T23:43:59.2889774Z ##[debug]found: 'C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd'
2022-12-04T23:43:59.2891006Z ##[debug]C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd arg: ["--help"]
2022-12-04T23:43:59.2891833Z ##[debug]C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd arg: ["--help"]
2022-12-04T23:43:59.2895175Z ##[debug]exec tool: C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd
2022-12-04T23:43:59.2896007Z ##[debug]exec tool: C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd
2022-12-04T23:43:59.2896810Z ##[debug]arguments:
2022-12-04T23:43:59.2897470Z ##[debug]arguments:
2022-12-04T23:43:59.2898123Z ##[debug] --help
2022-12-04T23:43:59.2898796Z ##[debug] --help
2022-12-04T23:43:59.5888840Z ##[debug]Exit code 0 received from tool 'C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd'
2022-12-04T23:43:59.5933619Z ##[debug]Exit code 0 received from tool 'C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd'
2022-12-04T23:43:59.5957376Z ##[debug]STDIO streams have closed for tool 'C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd'
2022-12-04T23:43:59.5996612Z ##[debug]STDIO streams have closed for tool 'C:\Users\jesse\AppData\Roaming\npm\devcontainer.cmd'
2022-12-04T23:43:59.6024187Z ##[debug]checkoutPath=undefined
2022-12-04T23:43:59.6049989Z ##[debug]imageName=undefined
2022-12-04T23:43:59.6077870Z ##[debug]imageTag=undefined
2022-12-04T23:43:59.6081478Z ##[debug]platform=undefined
2022-12-04T23:43:59.6095495Z ##[debug]subFolder=undefined
2022-12-04T23:43:59.6100964Z ##[debug]runCmd=dotnet run
2022-12-04T23:43:59.6106129Z ##[debug]env=undefined
2022-12-04T23:43:59.6106758Z ##[debug]cacheFrom=undefined
2022-12-04T23:43:59.6107688Z ##[debug]skipContainerUserIdUpdate=false
2022-12-04T23:43:59.6108585Z !! imageTag specified without specifying imageName - ignoring imageTag
2022-12-04T23:43:59.6108951Z
2022-12-04T23:43:59.6109169Z
2022-12-04T23:43:59.6109360Z
2022-12-04T23:43:59.6109668Z ***
2022-12-04T23:43:59.6110022Z *** Building the dev container
2022-12-04T23:43:59.6110363Z ***
2022-12-04T23:43:59.6110801Z About to run devcontainer build --workspace-folder c:\agent\_work\1\s
2022-12-04T23:43:59.6111618Z ##[debug]task result: Failed
2022-12-04T23:43:59.6139575Z ##[error]spawn devcontainer ENOENT
2022-12-04T23:43:59.6149241Z ##[debug]Processed: ##vso[task.issue type=error;]spawn devcontainer ENOENT
2022-12-04T23:43:59.6158491Z ##[debug]Processed: ##vso[task.complete result=Failed;]spawn devcontainer ENOENT
2022-12-04T23:43:59.6217040Z ##[section]Finishing: DevcontainersCi
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Iniziare riproducendo i file azure-pipelines.yml e devcontainer.json forniti su un Windows 10 Azure DevOps agent con la diagnostica abilitata. Tracciare la DevcontainersCi task dal rilevamento riuscito del devcontainer fino all’invocazione non riuscita di build, quindi verificare che la task avvii il comando e prosegua oltre la compilazione del container senza spawn devcontainer ENOENT.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, docker, typescript
Ambito
ci-cd, devops, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.