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 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?