File tree Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,5 @@ website/build
30
30
website /node_modules
31
31
website /vendor
32
32
/tmp
33
+ certs /gitlab-registry.crt
34
+ certs /gitlab-registry.key
Original file line number Diff line number Diff line change @@ -65,16 +65,20 @@ SERVICE ?= gitlab-ce
65
65
GITLAB_TOKEN ?= ACCTEST1234567890123
66
66
GITLAB_BASE_URL ?= http://127.0.0.1:8080/api/v4
67
67
68
- testacc-up : # # Launch a GitLab instance.
68
+ testacc-up : | certs # # Launch a GitLab instance.
69
69
docker-compose up -d $(SERVICE )
70
70
./scripts/await-healthy.sh
71
71
72
72
testacc-down : # # Teardown a GitLab instance.
73
- docker-compose down
73
+ docker-compose down --volumes
74
74
75
75
testacc : # # Run acceptance tests against a GitLab instance.
76
76
TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN ) GITLAB_BASE_URL=$(GITLAB_BASE_URL ) go test -v $(PROVIDER_SRC_DIR ) $(TESTARGS ) -timeout 40m
77
77
78
+ certs : # # Generate certs for the GitLab container registry
79
+ mkdir -p certs
80
+ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout certs/gitlab-registry.key -out certs/gitlab-registry.crt -subj " /CN=gitlab-registry.com" -addext " subjectAltName=DNS:IP:127.0.0.1"
81
+
78
82
# TOOLS
79
83
# Tool dependencies are installed into a project-local /bin folder.
80
84
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ services:
17
17
- logs-ce:/var/log/gitlab
18
18
- data-ce:/var/opt/gitlab
19
19
- ${PWD}/scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh:Z
20
+ - ${PWD}/scripts/gitlab.rb:/etc/gitlab/gitlab.rb:ro
21
+ - ${PWD}/certs:/etc/gitlab/ssl:ro
20
22
healthcheck :
21
23
test : /healthcheck-and-setup.sh
22
24
interval : 10s
@@ -38,6 +40,8 @@ services:
38
40
- data-ee:/var/opt/gitlab
39
41
- ${PWD}/scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh:Z
40
42
- ${PWD}/Gitlab-license.txt:/Gitlab-license.txt:Z
43
+ - ${PWD}/scripts/gitlab.rb:/etc/gitlab/gitlab.rb:ro
44
+ - ${PWD}/certs:/etc/gitlab/ssl:ro
41
45
healthcheck :
42
46
test : /healthcheck-and-setup.sh
43
47
interval : 10s
Original file line number Diff line number Diff line change
1
+ registry_external_url 'http://127.0.0.1:5050'
2
+ registry [ 'enable' ] = true
3
+ registry_nginx [ 'ssl_certificate' ] = "/etc/gitlab/ssl/gitlab-registry.pem"
4
+ registry_nginx [ 'ssl_certificate_key' ] = "/etc/gitlab/ssl/gitlab-registry.key"
Original file line number Diff line number Diff line change @@ -28,11 +28,6 @@ test -f $done || {
28
28
printf ' terraform_token.save!;'
29
29
) | gitlab-rails console
30
30
31
- echo " Enabling the container registry for the instance so that Personal Access Tokens can be created with the read_registry and write_registry scopes"
32
- (
33
- printf ' Gitlab.config.registry["enabled"] = true'
34
- ) | gitlab-rails console
35
-
36
31
# 2020-09-07: Currently Gitlab (version 13.3.6 ) doesn't allow in admin API
37
32
# ability to set a group as instance level templates.
38
33
# To test resource_gitlab_project_test template features we add
You can’t perform that action at this time.
0 commit comments