Currently have a python webserver that’s hosted on a dedicated server. I’ve configured Gitlab CI (using the gitlab-ci.yml file) so whenever there’s a push to a staging branch, the necessary dependencies are installed, the application is built, and a number of tests are run. I am using GitLab Runner to clone the latest changes and run all of the pipeline’s commands on my server.
My final ‘stage’ is the deploy stage where I run the command “python web_server.py”. This works great however I don’t believe this is the right way to go about implementing CI/CD. Although the webserver runs successfully, the deploy stage continues to be pending under “jobs” until I cancel it. I’d like the webserver to keep running but I’m not sure how to go about solving this. Keep in mind, I’m just getting started with CI/CD.
Basically, after all the jobs under my GitLab CI pipeline are finished successfully, how can I automate the pull of the latest changes, and automate running the command “python web_server.py” with the latest changes?