如何在管道运行期间将文件从分支上的一个目录移至第二个目录? GitLab
我已经创建了Docs文件夹,它应该包含报告文件。 我试图将内容从临时创建的诱惑文件夹转移到Docs文件夹,然后将从文档到公共文件夹的所有内容复制到访问该魅力报告所在的页面。我正在执行该过程,以简单地将文件从Allure文件夹复制到公共文件夹,以获取有关以前运行的历史记录。也许有更好的方法可以做到?我想存储一些X时间的旧报告(例如,2天,能够看到Allure出错的问题是有问题的)然后删除旧的,而不是删除尚未达到的最新内容”观点”。因此,这是我的YML文件:
stages:
- testing
- deploy
docker_job:
stage: testing
tags:
- docker
image: atools/chrome-headless:java11-node14-latest
before_script:
- npm ci
- npx playwright install
- npm install allure-commandline --save-dev
script: #||true
- npx playwright test
after_script:
- npx allure generate allure-results
rules:
- when: always
allow_failure: true
artifacts:
when: always
paths:
- ./allure-report
expire_in: 1 day
pages:
stage: deploy
script:
- mkdir public
- mv ./allure-report/* Docs
- cp -R ./Docs/* public
artifacts:
paths:
- public
rules:
- when: always
一切都很好,但是它不起作用-MV ./allure-report/* docs
-cp -r ./docs/* public
什么都不做,或者我看不到任何效果。请帮助我正确解决这个问题。
逻辑上有明显的漏洞,IDK尝试了很多变体,但它们都无法使用。 可以通过我的方式完成吗?
I have created Docs folder and it should contain report files.
I'm trying to move content from temporary created Allure folder to Docs folder and then copy everything from Docs to public folder to get access to Pages on which that Allure report will be located. I'm doing that process insted of simple copying files from allure folder to public folder to get history about previous runs. Maybe there is some better way to do it ? I'd like to store old reports for some X time (for example for 2 days, to be able to see on ALlure what was wrong is there are some problems) and then delete old ones, not deleting latest which have not reached "deleting point". So, here is my yml file:
stages:
- testing
- deploy
docker_job:
stage: testing
tags:
- docker
image: atools/chrome-headless:java11-node14-latest
before_script:
- npm ci
- npx playwright install
- npm install allure-commandline --save-dev
script: #||true
- npx playwright test
after_script:
- npx allure generate allure-results
rules:
- when: always
allow_failure: true
artifacts:
when: always
paths:
- ./allure-report
expire_in: 1 day
pages:
stage: deploy
script:
- mkdir public
- mv ./allure-report/* Docs
- cp -R ./Docs/* public
artifacts:
paths:
- public
rules:
- when: always
Everything is going good but it doesn't work - mv ./allure-report/* Docs
- cp -R ./Docs/* public
are doing nothing or I just can't see any effect. Help me please to correctly solve that problem.
Maybe there is obvious holes in logic, idk, have tried a lot of variants but they all don't work.
Can it be done by my way at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,所以我已经用我的
git.conf电子邮件/名称
进行了“登录”,然后使用auth token我将这些文物推向Docs文件夹,看起来很像:okay, so I have done it with "logging in" with my
git.conf email/name
, then using auth token I did a push of these artifacts to Docs folder, looks like: