File tree Expand file tree Collapse file tree
DOCUMENTATION/content/documentation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -862,6 +862,67 @@ docker-compose up -d gitlab
862862
863863
864864
865+ <br >
866+ <a name =" Use-Gitlab-Runner " ></a >
867+ ## Use Gitlab Runner
868+
869+ 1 - Retrieve the registration token in your gitlab project (Settings > CI / CD > Runners > Set up a specific Runner manually)
870+
871+ 2 - Open the ` .env ` file and set the following changes:
872+ ```
873+ # so that gitlab container will pass the correct domain to gitlab-runner container
874+ GITLAB_DOMAIN_NAME=http://gitlab
875+
876+ GITLAB_RUNNER_REGISTRATION_TOKEN=<value-in-step-1>
877+
878+ # so that gitlab-runner container will send POST request for registration to correct domain
879+ GITLAB_CI_SERVER_URL=http://gitlab
880+ ```
881+
882+ 3 - Open the ` docker-compose.yml ` file and add the following changes:
883+ ``` yml
884+ gitlab-runner :
885+ environment : # these values will be used during `gitlab-runner register`
886+ - RUNNER_EXECUTOR=docker # change from shell (default)
887+ - DOCKER_IMAGE=alpine
888+ - DOCKER_NETWORK_MODE=laradock_backend
889+ networks :
890+ - backend # connect to network where gitlab service is connected
891+ ` ` `
892+
893+ 4 - Run the Gitlab-Runner Container (` gitlab-runner`) with the `docker-compose up` command. Example:
894+
895+ ` ` ` bash
896+ docker-compose up -d gitlab-runner
897+ ` ` `
898+
899+ 5 - Register the gitlab-runner to the gitlab container
900+
901+ ` ` ` bash
902+ docker-compose exec gitlab-runner bash
903+ gitlab-runner register
904+ ` ` `
905+
906+ 6 - Create a `.gitlab-ci.yml` file for your pipeline
907+
908+ ` ` ` yml
909+ before_script:
910+ - echo Hello!
911+
912+ job1:
913+ scripts:
914+ - echo job1
915+ ` ` `
916+
917+ 7 - Push changes to gitlab
918+
919+ 8 - Verify that pipeline is run successful
920+
921+
922+
923+
924+
925+
865926<br>
866927<a name="Use-Adminer"></a>
867928# # Use Adminer
You can’t perform that action at this time.
0 commit comments