File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/com/redhat/labs/omp/resources Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ public class GroupsResource {
23
23
@ ConfigProperty (name = "residenciesParentRepositoryId" , defaultValue = "6284" )
24
24
protected Integer residenciesParentRepositoryId ;
25
25
26
+ @ ConfigProperty (name = "deployKey" )
27
+ protected Integer deployKey ;
28
+
26
29
/**
27
30
* this method creates a group for CUSTOMER_NAME and a sun-group with the PROJECT_NAME and a repo named iac inside it.
28
31
* return the id of the iac project repository
@@ -54,7 +57,9 @@ public GitLabCreateProjectResponse createResidencyStructure(CreateResidencyGroup
54
57
GitLabCreateProjectRequest gitLabCreateProjectRequest = new GitLabCreateProjectRequest ();
55
58
gitLabCreateProjectRequest .namespace_id = createSubGroupResponse .id ;
56
59
gitLabCreateProjectRequest .name = RESIDENCY_PROJECT_NAME ;
57
- return gitLabService .createNewProject (gitLabCreateProjectRequest );
60
+ GitLabCreateProjectResponse gitLabProject = gitLabService .createNewProject (gitLabCreateProjectRequest );
61
+ gitLabService .enableDeployKey (gitLabProject .id , deployKey );
62
+ return gitLabProject ;
58
63
59
64
//first try to fetch the customer_name group and get the eid, if doesn't exists create a group.
60
65
//then create the project . if project exists freak out
You can’t perform that action at this time.
0 commit comments