As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit 2600bf7a authored by Sean McGivern's avatar Sean McGivern
Browse files

Set up a test Gitaly server in CI and provide a docker-compose file

parent b13bc6e5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -30,6 +30,8 @@ default:
- gitlab-org-docker
.test:
variables:
GITALY_CONNECTION_INFO: '{"address":"tcp://gitaly:8075", "storage":"default"}'
before_script:
# Set up the environment to run integration tests (still written in Ruby)
- apt-get update -qq && apt-get install -y ruby ruby-dev
Loading
Loading
@@ -42,6 +44,11 @@ default:
- cp config.yml.example config.yml
- go version
- which go
services:
- name: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
# Disable the hooks so we don't have to stub the GitLab API
command: ["bash", "-c", "mkdir -p /home/git/repositories && rm -rf /srv/gitlab-shell/hooks/* && exec /usr/bin/env GITALY_TESTING_NO_GIT_HOOKS=1 /scripts/process-wrapper"]
alias: gitaly
script:
- make verify test
Loading
Loading
Loading
Loading
@@ -60,6 +60,20 @@ Run both test and verify (the default Makefile target):
bundle install
make validate
### Gitaly
Some tests need a Gitaly server. The
[`docker-compose.yml`](./docker-compose.yml) file will run Gitaly on
port 8075. To tell the tests where Gitaly is, set
`GITALY_CONNECTION_INFO`:
export GITALY_CONNECTION_INFO='{"address": "tcp://localhost:8075", "storage": "default"}'
make test
If no `GITALY_CONNECTION_INFO` is set, the test suite will still run, but any
tests requiring Gitaly will be skipped. They will always run in the CI
environment.
## Git LFS remark
Starting with GitLab 8.12, GitLab supports Git LFS authentication through SSH.
Loading
Loading
version: '3.1'
services:
gitaly:
environment:
- GITALY_TESTING_NO_GIT_HOOKS=1
image: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
ports:
- '8075:8075'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment