it seems that circle ci changes the directory after every command even if I want to cd into another folder. I’ve run an experiment where I have the following commands run in my job:
run: pwd //resultA
run: ls -la // (i see the folder)
run: cd folder-name
run: pwd // I get resultA and not resultA/folder-name
If I do cd folder-name && my command i get the right folder context.
You are correct - every command is executed in the directory specified by the working_directory key in the definition of your job. The default value is ~/project. You can override this on each step if you wish.