- Documentation
- Mailing list: Google Groups
- Build status:
Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-gitlab
$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone git@github.com:terraform-providers/terraform-provider-gitlab
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-gitlab
$ make build
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.14+ is required).
To compile the provider, run make build
. This will build the provider and put the provider binary in the $GOPATH/bin
directory.
$ make build
...
$ $GOPATH/bin/terraform-provider-gitlab
...
The Terraform Provider only has acceptance tests, these can run against a gitlab instance where you have a token with administrator permissions (likely not gitlab.com). There is excellent documentation on how to run gitlab from docker at gitlab.com
In order to run the full suite of acceptance tests, export the environment variables:
GITLAB_TOKEN
//token for account with admin priviligesGITLAB_BASE_URL
//URL with api part e.g.http://localhost:8929/api/v4/
and run make testacc
.
$ make testacc
This module supports both Gitlab CE and Gitlab EE. We run tests on Gitlab EE, but can't run them on pull requests from forks.
Features that only work on one flavour can use the following helpers as
SkipFunc: isRunningInEE
and isRunningInCE
. You can see an exemple of this
for gitlab_project_push_rules
tests.