forked from TencentBlueKing/bk-turbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Turbo编译加速对接权限中心RBAC TencentBlueKing#316
- Loading branch information
Showing
7 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
...z-turbo/src/main/kotlin/com/tencent/devops/turbo/controller/ServiceTurboPlanController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
package com.tencent.devops.turbo.controller | ||
|
||
import com.tencent.bk.sdk.iam.dto.callback.request.CallbackRequestDTO | ||
import com.tencent.devops.api.pojo.Response | ||
import com.tencent.devops.turbo.api.IServiceTurboPlanController | ||
import com.tencent.devops.turbo.service.TurboPlanService | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@Suppress("MaxLineLength") | ||
@RestController | ||
class ServiceTurboPlanController @Autowired constructor( | ||
private val turboPlanService: TurboPlanService | ||
) : IServiceTurboPlanController { | ||
|
||
override fun findTurboPlanIdByProjectIdAndPipelineInfo(projectId: String, pipelineId: String, pipelineElementId: String): Response<String?> { | ||
return Response.success(turboPlanService.findMigratedTurboPlanByPipelineInfo(projectId, pipelineId, pipelineElementId)?.taskId) | ||
override fun findTurboPlanIdByProjectIdAndPipelineInfo( | ||
projectId: String, | ||
pipelineId: String, | ||
pipelineElementId: String | ||
): Response<String?> { | ||
return Response.success( | ||
turboPlanService.findMigratedTurboPlanByPipelineInfo( | ||
projectId, | ||
pipelineId, | ||
pipelineElementId | ||
)?.taskId | ||
) | ||
} | ||
|
||
override fun resourceList(callBackInfo: CallbackRequestDTO): Response<String> { | ||
return Response.success(turboPlanService.getInstanceByResource(callBackInfo)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
src/backend/turbo/common-turbo/common-turbo-auth/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters