https://qiita.com/ryuichi1208/items/1c08523b0ef34d05026f
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# gitlab-runnerインストール curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash sudo yum install gitlab-runner https://docs.gitlab.com/omnibus/docker/ # dockerでGitlab起動 export GITLAB_HOME=/srv export GITLAB_HOME=$HOME sudo docker run --detach \ --hostname gitlab.example.com \ --publish 443:443 --publish 80:80 --publish 22:22 \ --name gitlab \ --restart always \ --volume $GITLAB_HOME/gitlab/config:/etc/gitlab \ --volume $GITLAB_HOME/gitlab/logs:/var/log/gitlab \ --volume $GITLAB_HOME/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest # 起動確認 sudo docker logs -f gitlab # gitlab-runnerの設定 [root@localhost aaa]# sudo gitlab-runner register Runtime platform arch=amd64 os=linux pid=5462 revision=c127439c version=13.0.0 Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): http://gitlab.example.com Please enter the gitlab-ci token for this runner: ivi_dYcZkZBRuvA69dDF Please enter the gitlab-ci description for this runner: [localhost.localdomain]: Please enter the gitlab-ci tags for this runner (comma separated): docker Registering runner... succeeded runner=ivi_dYcZ Please enter the executor: docker-ssh+machine, kubernetes, ssh, virtualbox, docker-ssh, parallels, shell, docker+machine, custom, docker: docker Please enter the default Docker image (e.g. ruby:2.6): alpine:latest Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! # 以下を一緒にcommit pushすると動く [root@localhost aaa]# cat .gitlab-ci.yml stages: - test test_job: type: test script: - gcc -o hello hello.c - ./hello world tags: - docker |
ちゃんと動いてないけど流れがわかったのでまあいいっか。