1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/panda26-gitlab

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
redis.md 1.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Achilleas Pipinellis Отправлено 13.02.2017 19:59 a084437

Using Redis

As many applications depend on Redis as their key-value store, you will eventually need it in order for your tests to run. Below you are guided how to do this with the Docker and Shell executors of GitLab Runner.

Use Redis with the Docker executor

If you are using GitLab Runner with the Docker executor you basically have everything set up already.

First, in your .gitlab-ci.yml add:

services:
  - redis:latest

Then you need to configure your application to use the Redis database, for example:

Host: redis

And that's it. Redis will now be available to be used within your testing framework.

You can also use any other docker image available on Docker Hub. For example, to use Redis 2.8 the service becomes redis:2.8.

Use Redis with the Shell executor

Redis can also be used on manually configured servers that are using GitLab Runner with the Shell executor.

In your build machine install the Redis server:

sudo apt-get install redis-server

Verify that you can connect to the server with the gitlab-runner user:

# Try connecting the the Redis server
sudo -u gitlab-runner -H redis-cli

# Quit the session
127.0.0.1:6379> quit

Finally, configure your application to use the database, for example:

Host: localhost

Example project

We have set up an Example Redis Project for your convenience that runs on GitLab.com using our publicly available shared runners.

Want to hack on it? Simply fork it, commit and push your changes. Within a few moments the changes will be picked by a public runner and the job will begin.

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/panda26-gitlab.git
git@api.gitlife.ru:oschina-mirror/panda26-gitlab.git
oschina-mirror
panda26-gitlab
panda26-gitlab
master