我正在尝试使用 docker 镜像 mcr.microsoft.com/dotnet/core/sdk:2.2 使用 Angular 为 ASP.NET Core Web 应用程序编写 .gitlab-ci.yml 文件
构建失败并出现错误,指出缺少 Nodejs。该项目需要节点下载依赖项并构建嵌入其中的 Angular 应用程序。
.gitlab-ci.yml
image: mcr.microsoft.com/dotnet/core/sdk:2.2
stages:
- build
- test
variables:
test: "testcases"
before_script:
- "cd src"
- "dotnet restore"
build:
stage: build
script:
- "dotnet build"
test:
stage: test
script:
- "cd $test"
- "dotnet test"
Run Code Online (Sandbox Code Playgroud)