You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2022/06/13 01:21:47 UTC
[incubator-devlake] branch main updated: fix(jenkins): copy inputjson (#2166)
This is an automated email from the ASF dual-hosted git repository.
zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new b9223678 fix(jenkins): copy inputjson (#2166)
b9223678 is described below
commit b92236788fb16967ed6d3ac460d69add567adf9f
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Mon Jun 13 09:21:43 2022 +0800
fix(jenkins): copy inputjson (#2166)
closes #2158
---
plugins/jenkins/tasks/build_extractor.go | 4 +++-
plugins/jenkins/tasks/job_collector.go | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/plugins/jenkins/tasks/build_extractor.go b/plugins/jenkins/tasks/build_extractor.go
index 117c8c53..514b5155 100644
--- a/plugins/jenkins/tasks/build_extractor.go
+++ b/plugins/jenkins/tasks/build_extractor.go
@@ -85,7 +85,9 @@ func ExtractApiBuilds(taskCtx core.SubTaskContext) error {
}
}
} else if vcs == "svn" {
- build.CommitSha = strconv.Itoa(body.ChangeSet.Revisions[0].Revision)
+ if len(body.ChangeSet.Revisions) > 0 {
+ build.CommitSha = strconv.Itoa(body.ChangeSet.Revisions[0].Revision)
+ }
}
results = append(results, build)
diff --git a/plugins/jenkins/tasks/job_collector.go b/plugins/jenkins/tasks/job_collector.go
index dba80a2a..bfad4879 100644
--- a/plugins/jenkins/tasks/job_collector.go
+++ b/plugins/jenkins/tasks/job_collector.go
@@ -59,6 +59,7 @@ func CollectApiJobs(taskCtx core.SubTaskContext) error {
ApiClient: data.ApiClient,
PageSize: 100,
Incremental: incremental,
+ Concurrency: 1,
UrlTemplate: "api/json",
Query: func(reqData *helper.RequestData) (url.Values, error) {