RE: Build on my conpany's Gitlab server instead of my own deployment server

Dear All,

I have setup a CI/CD pipeline for my project in my Company’s maintained Gitlab server. I could build, test and deploy through locally configured Gitlab runner without any issues.

But now my requirement is to deploy on my remote or local server “without” building the application “locally”. In other words, I would like my company’s Gitlab server to be used for my application building and testing. Once, done, the artifacts should then download onto my local or remote deployment server and get deployed.

I have configured the Runner on my deplyoment server, but when the pipeline is triggered, I get a build error

Running with gitlab-runner 10.8.0 (079aad9e)
on DMP Suleman Machine c759363a
Using Shell executor…
Running on WDEC015488…
Cloning repository…
Cloning into ‘C:/Office_Documents/DaaA/GITLab_Runner/builds/c759363a/0/DaaA-Data-Marketplace/rest-api’…
Checking out b6cbd808 as test…
Skipping Git submodules setup
$ mvn $MAVEN_CLI_OPTS -DskipTests clean package
‘mvn’ is not recognized as an internal or external command,
operable program or batch file.
ERROR: Job failed: exit status 9009

Now here the reason being the runner (locally configured) tries to build the application locally but obviously does not find the required utilities to build the application.

My questions is how can I utilize my company’s Gitlab server to actually “build” the application and only use my local Runner to download the built artifacts, test them and then deploy them onto my deployment server?


I’m not sure I follow, but I think one approach you could try is to not register your local runner on your company’s project. Instead, register a company runner.

At the end of the job, trigger a pipeline on your local GitLab instance which downloads the latest artifacts from the company, tests, and deploys them.

Thanks for sharing this information.
Android course in Chennai | Android Training Chennai

I think, i was probably not clear in my original message.

By local runner, i meant the runner running on my office machine and not something private!

Now I have gathered this information from another source that with the help of “tags” in the pipeline, i can specify which runner i want to utilize for a specific stage (e.g. build) in my pipeline. Now assuming, there is a build server in my company where a runner is configured. In my build stage, i can refer to this runner and have my project built.

So far so good, but now another scenario comes up as to how i can deploy my built artifacts onto my deployment server. When a runner configured on the build server is used, the build artifacts are generated on that server locally, so now my question is how can I take those built artifacts from the build server and deploy them onto my deployment server with the help of my “deploy” stage stated in my gitlab-ci.yaml configuration?

So far i have been using the “same” server where the runner is configured, the build is performed and finally the deployment is happened, but this is not an ideal scenario, because now my build and deployment servers are different.

I hope my scenario is a little clear to understand this time!


Ah I did misunderstand. Btw I am not a build expert, so I am mostly just trying to remember what I have seen done. For this case, one option may be to upload the build artifacts to e.g. S3. Then the other server can access them there.