标签:wrap variable .com cache can sfasdf rod space neu
docker run -d --name gitlab-runner --restart always -v /opt/data/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner
docker exec -it gitlab-runner gitlab-ci-multi-runner register -n \
--url http://gitlab.8dat.com/ci \
--registration-token ip-Adefsfsfasdfdsfjkljd --tag-list=dev,uat,prod --description "project_build_runner" --docker-privileged=false --docker-pull-policy="if-not-present" --docker-image "mvn-jdk:latest" --docker-volumes /var/run/docker.sock:/var/run/docker.sock --docker-volumes /opt/data/gitlab-runner/.m2:/root/.m2 --executor docker
进入gitlab-runner容器生成的配置文件 cat /etc/gitlab-runner/config.toml
,如下所示:
[[runners]] name = "dev_build_runner" url = "http://gitlab.XXX.top/" token = "9103bafa16b1f63232323434345" executor = "docker" [runners.docker] tls_verify = false image = "mvn-jdk:latest" privileged = false disable_cache = false volumes = ["/cache","/opt/data/gitlab-runner/.m2:/root/.m2"] pull_policy = "if-not-present" shm_size = 0 [runners.cache]
image: mvn-jdk:latest variables: MAVEN_OPTS: "-Dmaven.repo.local=/root/.m2/repository" stages: - build build:config: stage: build script: - mvn clean package -DskipTests
标签:wrap variable .com cache can sfasdf rod space neu
原文地址:https://www.cnblogs.com/river2005/p/9527030.html