Add CI to push changes to vtechworks-dev-ds7 and build
This commit adds a CI pipeline that pulls changes from this repository to $REPO_LOCATION
, stops the pm2 processes, runs yarn build:prod
and starts the pm2 processes again.
Note that, before merging into vt_7_x_dev
line 18 needs to be changed to - vt_7_x_dev
as that controls pushes to which branch triggers the CI. I'm keeping it as add-ci
for now for testing. The comment on line 19 can be deleted too.
To test, you can push any kind of change to the add-ci
branch, even the ReadMe file, and that should trigger a pull and re-build.
System Engineer notes -
I needed to run Gitlab Runner as vtechworks for this. Which involved running gitlab-runner uninstall
followed by gitlab-runner install --working-directory /home/gitlab-runner --user vtechworks
. In order to reset the runner to its default settings, we need to uninstall and install as --user gitlib-runner