gpt4 book ai didi

amazon-web-services - 有没有办法在AWS Codebuild上更改目录

转载 作者:行者123 更新时间:2023-12-04 01:19:17 24 4
gpt4 key购买 nike

随着Snap-CI的消失,我一直在尝试使我们的构建在AWS CodeBuild上运行。我已经建立了buildspec.yml,但是更改目录似乎不起作用。

version: 0.1

phases:
install:
commands:
- apt-get update -y
- apt-get install -y node
- apt-get install -y npm
build:
commands:
- cd MyDir //Expect to be in MyDir now
- echo `pwd` //Shows /tmp/blablabla/ instead of /tmp/blablabla/MyDir
- npm install //Fails because I'm not in the right directory
- bower install
- npm run ci
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- MyDir/MyFile.war
discard-paths: yes


看起来这应该相当简单,但是到目前为止,我还没有运气让它生效。

最佳答案

如果将buildspec.yml版本更改为0.2,则外壳将保留其设置。
在版本:0.1中,每个命令都有一个干净的shell。

请享用 ;)

关于amazon-web-services - 有没有办法在AWS Codebuild上更改目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42564586/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com