Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 2.12 KB

README.md

File metadata and controls

22 lines (17 loc) · 2.12 KB

What is this repository for?

GitLab CI/CD for GitHub allows to host the code on GitHub and test it on GitLab. This repository contains a recipe to use the GitLab CI/CD infrastucture with a GitHub repository. The recipe installs and configures a GitLab-runner using ansible.

Step to install and register a GitLab Runner

Before going through the following steps, make sure that you have a GitLab account then follow the instructions described at using the GitLab CI/CD with GitHub.

  1. Install Ansible in your computer.
  2. Clone this repo.
  3. Edit the inventory file with the address of the server(s) where you want to install the runner.
  4. Edit the playbook file with the remote_user name for the hosts.
  5. Make sure that you can ssh to your server(s).
  6. Install the runner with the following command: ansible-playbook -i inventory playbook.yml

Note:

The script will ask you for a token for your new runner, you can find such token in the configuration of the CI/CD at the mirror repository that GitLab automatically creates for you. See the configuration instructions.

Tags

GitLabCI makes use of tags to select a specific runner from the available pool. You can create your own tag to name your GitLab-runner and use it as default. You can replace the name of the tag in the playbook.yml file.

Supported OS

Currently the recipe only works for Ubuntu and Debian