Dear All
I installed gitlab runner as docker container , and used shell executor
i want write gitlab-ci for my java project
how install java and maven on my runner (that run as container on docker) to run below script :
maven-build-stage:
stage: build
script: mvn clean install
Thanks.
i know how create ci cd pipeline on local gitlab server and gitlab runner , but i want to know how install java and maven and pip and … on gitlab runner that create on docker container !!
GitLab (GL) has built in Docker images that you can reference in your .gitlab-ci.yml file. You can set a default image for the entire pipeline and also specify what Docker image you want for a specific GL jobs so that you can override the default image for the pipeline during specific jobs. For the script you provided you can add image: maven:3-jdk-11 and run the needed mvn commands.