安装gitlab-runner
Posted xiongyungang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装gitlab-runner相关的知识,希望对你有一定的参考价值。
注册
查看配置信息
$cat /etc/gitlab-runner/config.toml concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "my-runner" url = "https://gitlab.com/" token = "XXXXXXXXXXXXXXX" executor = "shell" [runners.cache] [runners.cache.s3] [runners.cache.gcs]
重启
配置项目
stages: - build before_script: - docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" $DOCKER_ADDRESS build_image: stage: build script: - docker build -f Dockerfile -t "$DOCKER_ADDRESS/workspace/myimage" . - docker push "$DOCKER_ADDRESS/workspace/myimage"
参考
https://docs.gitlab.com/ce/ci/docker/using_docker_build.html
http://answ.me/post/build-docker-images-automatically-via-gitlab-ci/
以上是关于安装gitlab-runner的主要内容,如果未能解决你的问题,请参考以下文章