如何解决gitlab globbing 表达式不匹配
我的 CI 管道如下图
stages:
- build
- deploy
frontend_build_develop:
image: node:14-alpine
tags:
- docker
stage: build
script:
- cd web
- nodejs -v
- npm -v
- npm install
- npm install -g @angular/cli
- >
rm -rf ./dist || exit 1
ng build --prod --environment=mainline --sourcemaps=false --extract-css=true --named-chunks=false --build-optimizer=true --output-hashing=all || exit 1
ng build --aot --app 1 --sourcemaps=false --extract-css=true --named-chunks=false --build-optimizer=true --output-hashing=none || exit 1
cp webpack.server.config.js ./dist || exit 1
cp server.ts ./dist/
cd dist
node ../node_modules/webpack/bin/webpack.js --config webpack.server.config.js || exit 1
cache:
paths:
- web/node_modules/
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- changes:
- web/*
when: always
artifacts:
paths:
- "*/web/dist"
backend_build:
stage: build
script:
- echo "build backend"
rules:
- changes:
- backend/*
我在单个存储库中有两个文件夹,一个用于前端(Web),另一个用于 .net 应用程序(后端)。构建前端应用程序后,如何从 /web/dist/ 文件夹上传工件
这是我的项目文件夹层次结构。
$ npm install -g @angular/cli
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
> @angular/cli@12.0.1 postinstall /usr/local/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js
+ @angular/cli@12.0.1
added 234 packages from 180 contributors in 13.207s
$ rm -rf ./dist || exit 1 ng build --prod --environment=mainline --sourcemaps=false --extract-css=true --named-chunks=false --build-optimizer=true --output-hashing=all || exit 1 ng build --aot --app 1 --sourcemaps=false --extract-css=true --named-chunks=false --build-optimizer=true --output-hashing=none || exit 1 cp webpack.server.config.js ./dist || exit 1 cp server.ts ./dist/ cd dist node ../node_modules/webpack/bin/webpack.js --config webpack.server.config.js || exit 1
Saving cache for successful job
00:18
Creating cache default...
web/node_modules/: found 42512 matching files and directories
Uploading cache.zip to https://storage.googleapis.com/gitlab-com-runners-cache/project/26421647/default
Created cache
Uploading artifacts for successful job
00:01
Uploading artifacts...
WARNING: /builds/tutorsinc/testbitbucketpipeline/web/dist/*: no matching files
ERROR: No files to upload
Cleaning up file based variables
00:00
Job succeeded
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。