When Snap-CI leaves, I try to get our builds to work on AWS CodeBuild. I have buildspec.yml, but changing directories doesn't work.
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
It seems like it should be pretty simple, but so far I have not been able to get this to work.
If you change the buildspec.yml version to 0.2, the shell will save its settings. In version: 0.1 you get a clean shell for each command.
enjoy;)
CodeBuild ( CODEBUILD_SRC_DIR).
:
commands: - cd MyDir && npm install && bower install - cd MyDir && npm run ci
commands: - ./mybuildscipt.sh
, - .
- EDIT -
CodeBuild buildspec v0.2, .
Source: https://habr.com/ru/post/1671290/More articles:Как включить динамические требования в Luigi? - pythonMultiple Apache mod_jk servers pointing to the same Tomcat worker? - javaОбновление словаря без перезаписи существующей пары ключ-значение? - pythonWhy do all system events use an anti-pattern? - event-sourcingHow to build the difference between two ggplot density distributions? - rZoom in on AppBarLayout while scrolling down - androidInvalidArgumentError: node has inputs from different frames - tensorflowDespeckle - remove spots or dots from an image - c #how to convert RTPDUMP to mp4 video file - ffmpegReact Native (with Redux) animate Switch programmatically - reactjsAll Articles