我无法在gitlab ci脚本中为.NET Core和Angular项目缓存node_modules。
我看到了这个提示信息:Skipping cache archiving due to empty cache key
下面是我的CI作业:
build_job:
stage: build
except:
refs:
- tags
tags:
- windows
script:
- dotnet restore .\$CI_PROJECT_NAME.sln
- dotnet build /p:Version=${env:VERSION} -c Release --no-restore /nr:false
artifacts:
name: "build-$CI_COMMIT_REF_NAME"
paths:
- '$CI_PROJECT_NAME/'
- '$CI_PROJECT_NAME.Tests/'
cache:
key: ${CI_COMMIT_REF_SLUG}-node
paths:
- './$CI_PROJECT_NAME/ClientApp/node_modules/'