Continuous deployment question
Marcee last edited by
This question is not in case of kubernetes but when you use servers or docker for deployment using CICD tool like Jenkins or gitlab. In jenkins or gitlab I've agents/runners and in pipeline stages I've a deploy stage. Now, where should this deployment ideally happen? On the agent? or or some other server (through ssh)?
Your question is a little bit confusing and led to some interpretations.
First, for Jenkins, you should always run your pipelines using Jenkins agents, it is a good practice.
The deploy stage is to - well, as the name -- deploy to somewhere. The way you are going to deploy totally depends on what you are deploying and where, you can use an API, a CLI, SSH, or even an SFTP. You can also store your artifact in a artifact server (Nexus, Docker Hub, Artifactory) and then tell your server to pull the image from there.
Wrapping up: In the deploy stage, put the code to deploy the artifact (.exe, .war, .zip...) anywhere you want. The deploy stage will run inside an agent/runner, this runner will connect to the destination system through CLI, API... to deploy the artifact.