文|MESeraph
启动gitlab-runner容器
docker run -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
新建一个gitlab-runner-config目录
注册Run Gitlab
docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register
在分支下写.gitlab-ci.yml文件
stages:
- build
build:
stage: build
tags:
- cpp-200
only:
- nx
script:
- echo "Building the pkg"
- ./build_all_pkg.sh
- ./build_update_pkg.sh
- sshpass -p 123456 scp -r pkg [email protected]:/home/lsp/jetson