项目作者: webyneter

项目描述 :
Docker image-based GitLab CI Runner
高级语言: Dockerfile
项目地址: git://github.com/webyneter/gitlab-ci-docker-runner.git
创建时间: 2018-09-13T19:33:14Z
项目社区:https://github.com/webyneter/gitlab-ci-docker-runner

开源协议:MIT License

下载


GitLab CI Docker Runner

Docker-based GitLab CI Runner image.

Docker Build Status MicroBadger Size Docker Pulls Docker Stars

What’s Inside

Packages

These are kept up-to-date on a best-effort basis.

Executables

  • print_info: Prints runtime environment info
  • ssh_add_private_key: ssh-adds the runner’s private key

Environment variables expected to be present

This is how you set GitLab CI secret environment variables.

  • CI_RUNNER_SSH_PRIVATE_KEY: an unencrypted private key (as string) which the associated public key has been authorized to access your remote host; required by ssh_add_private_key

Use Cases

GitLab CI

  1. # .gitlab-ci.yml
  2. image: webyneter/gitlab-ci-docker-runner:docker-18.06-dockercompose-1.22.0-ansible-2.6.4-awscli-1.16.14
  3. services:
  4. - docker:dind
  5. stages:
  6. - build
  7. - deploy
  8. .base_before_script: &base_before_script |
  9. print_info
  10. build:
  11. stage: build
  12. before_script:
  13. - *base_before_script
  14. - $(aws --region us-east-2 ecr get-login --no-include-email)
  15. script:
  16. - docker-compose build
  17. - docker-compose push
  18. deploy:
  19. stage: deploy
  20. variables:
  21. ANSIBLE_VAULT_PASSWORD_FILE_NAME: ".vault_password"
  22. before_script:
  23. - *base_before_script
  24. - ssh_add_private_key
  25. script:
  26. - # Deployment script...