Hi all
i’m trying to write integration-tests and for that i start gitlab in a docker container like described here:
everything looks good so far, but how can i execute api requests now? i could’t find a solution on how to authenticate with username and password. and to create a personal access token i think i need to login first?
I haven’t read that page and have no idea how things work when you run GitLab in a docker container, but:
If you have shell access to the machine GitLab runs on, you don’t need to login first, you can create an access token with gitlab-rails.
We have the following in our configuration management:
hmm i’m really not sure that works. my configuration looks like this:
integration-test:
variables:
FF_NETWORK_PER_BUILD: 1
CI_DEBUG_SERVICES: “true”
services:
- name: gitlab/gitlab-ce:latest
alias: gitlabmock.com
variables:
GITLAB_HTTPS: “false” # ensure that plain http works
GITLAB_ROOT_PASSWORD: “blabla” # to access the api with user root:password
script:
- curl --fail http://gitlabmock.com/api/v4/users
there is also a variable called GITLAB_OMIBUS_CONFIG: GitLab Docker images | GitLab
Is there any possibility to configure the image with this variable? i have no clue about ruby but in the docs the following is specified:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
what is a gitlab.rb config? maybe it’s possible to disable the authentication in the docker image? so there would be no need to create a personal access token