Commit 0862bff8 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'qa-allow-setting-sandbox-group' into 'master'

Allow using a different sandbox group for QA

See merge request !17000
parents 9ca361db 4061d291
Pipeline #17316486 passed with stages
in 27 minutes and 39 seconds
...@@ -70,6 +70,14 @@ If you need to authenticate as a different user, you can provide the ...@@ -70,6 +70,14 @@ If you need to authenticate as a different user, you can provide the
GITLAB_USERNAME=jsmith GITLAB_PASSWORD=password bin/qa Test::Instance https://gitlab.example.com GITLAB_USERNAME=jsmith GITLAB_PASSWORD=password bin/qa Test::Instance https://gitlab.example.com
``` ```
If your user doesn't have permission to default sandbox group
`gitlab-qa-sandbox`, you could also use another sandbox group by giving
`GITLAB_SANDBOX_NAME`:
```
GITLAB_USERNAME=jsmith GITLAB_PASSWORD=password GITLAB_SANDBOX_NAME=jsmith-qa-sandbox bin/qa Test::Instance https://gitlab.example.com
```
All [supported environment variables are here](https://gitlab.com/gitlab-org/gitlab-qa#supported-environment-variables). All [supported environment variables are here](https://gitlab.com/gitlab-org/gitlab-qa#supported-environment-variables).
[GDK]: https://gitlab.com/gitlab-org/gitlab-development-kit/ [GDK]: https://gitlab.com/gitlab-org/gitlab-development-kit/
...@@ -16,6 +16,18 @@ module QA ...@@ -16,6 +16,18 @@ module QA
def personal_access_token def personal_access_token
ENV['PERSONAL_ACCESS_TOKEN'] ENV['PERSONAL_ACCESS_TOKEN']
end end
def user_username
ENV['GITLAB_USERNAME']
end
def user_password
ENV['GITLAB_PASSWORD']
end
def sandbox_name
ENV['GITLAB_SANDBOX_NAME']
end
end end
end end
end end
...@@ -16,7 +16,7 @@ module QA ...@@ -16,7 +16,7 @@ module QA
end end
def sandbox_name def sandbox_name
'gitlab-qa-sandbox' Runtime::Env.sandbox_name || 'gitlab-qa-sandbox'
end end
end end
end end
......
...@@ -4,11 +4,11 @@ module QA ...@@ -4,11 +4,11 @@ module QA
extend self extend self
def name def name
ENV['GITLAB_USERNAME'] || 'root' Runtime::Env.user_username || 'root'
end end
def password def password
ENV['GITLAB_PASSWORD'] || '5iveL!fe' Runtime::Env.user_password || '5iveL!fe'
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment