Well, I figured out the permissions issue. I had forgotten to recursively update the permissions down the directory.
chmod -R g+rxw <dir>/. whoops
But my second question is still valid. Am I even approaching my deploy to staging in a good way?
I have looked around and read many articles, and the documentation, but this is my first real attempt at CI so thoughts are appreciated.
Right down to it. So I have been struggling with ci-cd for a few months now. But I have almost gotten it to where I want it on my staging server, but I have a small problem. After I build the new production optimized build, I move it from the GitLab-runner’s directory to the directory that will be delivering the site out to the world/staging environment for more testing. This is where it fails. it fails with a permissions error, and I believe the runner has permission to write to the directory, but I would really like to know if I am approaching this in the correct manner. Here is my .gitlab-ci.yml file
- Build PWA
- echo “Building Deploy Package”
- npm install
- npm run build
- echo “Build successful”
expire_in: 1 hour
- Deploy Staging
- echo “Deploying to server”
- cp -rv /home/gitlab-runner/builds/qRT2eXnz/0/AssemblersInc/developers/fubar /home/root1/example/fubar
- echo “Deployed”
Any thoughts or ideas would be greatly appreciated.