With Snap-CI going away I\'ve been trying to get our builds working on AWS CodeBuild. I have my buildspec.yml built out, but changing directories doesn\'t seem to work.
Each command in CodeBuild runs in a separate shell against the root of your source (access root of your source from CODEBUILD_SRC_DIR environment variable).
Your possible options are
commands:
- cd MyDir && npm install && bower install
- cd MyDir && npm run ci
commands:
- ./mybuildscipt.sh
Let me know if any of these work for you.
-- EDIT --
CodeBuild has since launched buildspec v0.2 where this work around is no longer required.
If you change the buildspec.yml version to 0.2 then the shell keeps its settings. In version: 0.1 you get a clean shell for each command.
enjoy ;)