Skip to content

Commit 8ab9049

Browse files
authored
Merge pull request #30 from jacobsee/fix-deploy-key-enable
Add the deploy key enable function
2 parents 7723088 + 8c09b71 commit 8ab9049

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/redhat/labs/omp/resources/GroupsResource.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public class GroupsResource {
2323
@ConfigProperty(name = "residenciesParentRepositoryId", defaultValue = "6284")
2424
protected Integer residenciesParentRepositoryId;
2525

26+
@ConfigProperty(name = "deployKey")
27+
protected Integer deployKey;
28+
2629
/**
2730
* this method creates a group for CUSTOMER_NAME and a sun-group with the PROJECT_NAME and a repo named iac inside it.
2831
* return the id of the iac project repository
@@ -54,7 +57,9 @@ public GitLabCreateProjectResponse createResidencyStructure(CreateResidencyGroup
5457
GitLabCreateProjectRequest gitLabCreateProjectRequest = new GitLabCreateProjectRequest();
5558
gitLabCreateProjectRequest.namespace_id = createSubGroupResponse.id;
5659
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;
5863

5964
//first try to fetch the customer_name group and get the eid, if doesn't exists create a group.
6065
//then create the project . if project exists freak out

0 commit comments

Comments
 (0)