Closed rsalgado closed 7 years ago
UPDATE Later on in the book, in the section 5.4.1, it is mentioned that:
Then, in the Build Environment section, we tick
Delete workspace before build starts
. This option cleans up our build environment by deleting the checked-out repository prior to initiating a new set of jobs.
Which effectively avoids this issue at all; maybe it could be mentioned in that section, too.
Sorry for the inconveniences, and thanks anyways.
Just wanted to post this in case somebody had the same issue. As the description indicates, I get the following error in Jenkins (this is the relevant part):
Because the directory
spec/reports/
is being created as root:I managed to solve it by changing the following line in the execute shell in Jenkins, appending
; chown -R 1000 spec/reports
(although I had to runchown
manually the first time; also, removing the directory withsudo
works too):After that, the subsequent builds work fine. Don't know if there's a better way to deal with this. I assume this problem is caused by the temp container being run as root, but I'm still learning Docker, after all, so I'm not sure.
Thanks;