Skip to content

Commit

Permalink
depend: 更新分析工具SDK v0.0.18 -> v0.0.27
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlkl committed Sep 14, 2023
1 parent aa5c8e8 commit 5c891a9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
10 changes: 8 additions & 2 deletions standard-adapter/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module github.com/TencentBlueKing/ci-repoAnalysis/standard-adapter

go 1.20
go 1.21.0

require github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.18
require github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.27

require (
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
golang.org/x/sync v0.3.0 // indirect
)
15 changes: 13 additions & 2 deletions standard-adapter/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.18 h1:rX6zJTJD99IX8noGXNisjQ/4CSMYdI8BbDN7SDckudg=
github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.18/go.mod h1:AXra//9jqgUGWl41/a0jL1vj5xG9Hw201KPYdfePmsw=
github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.27 h1:7ebEMRpNv976qVJUTaqXil3PtycCGVU75klLdKH4Ja0=
github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.27/go.mod h1:gaNOplWKoBM1MBtwllE4y/x1UfXdvlBgLUrECkdnLPE=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA=
github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
7 changes: 2 additions & 5 deletions standard-adapter/pkg/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ type StandardAdapterExecutor struct {
// Execute 执行扫描
func (e StandardAdapterExecutor) Execute(_ *object.ToolConfig, file *os.File) (*object.ToolOutput, error) {
// 将toolInput写入/bkrepo/workspace/input.json
toolInput, err := api.GetClient(object.GetArgs()).Start()
if err != nil {
return nil, err
}
toolInput := api.GetClient(object.GetArgs()).ToolInput
newToolInput := &object.ToolInput{
TaskId: toolInput.TaskId,
ToolConfig: toolInput.ToolConfig,
Expand All @@ -44,7 +41,7 @@ func (e StandardAdapterExecutor) Execute(_ *object.ToolConfig, file *os.File) (*
args = append(args, splitCmd[1:]...)
}
args = append(args, "--input", toolInputFile, "--output", toolOutputFile)
err = util.ExecAndLog(cmd, args, e.WorkDir)
err := util.ExecAndLog(cmd, args, e.WorkDir)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 5c891a9

Please sign in to comment.