You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2023/01/06 05:54:10 UTC
[incubator-devlake] branch fix-bitbucket created (now 23da060a4)
This is an automated email from the ASF dual-hosted git repository.
warren pushed a change to branch fix-bitbucket
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
at 23da060a4 fix(bitbucket): update e2e (#4125)
This branch includes the following new commits:
new 23da060a4 fix(bitbucket): update e2e (#4125)
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-devlake] 01/01: fix(bitbucket): update e2e (#4125)
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch fix-bitbucket
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 23da060a42442d4a9039e2c04fc1a496e5f6eac0
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Fri Jan 6 13:51:13 2023 +0800
fix(bitbucket): update e2e (#4125)
---
plugins/bitbucket/e2e/pipelines_test.go | 2 +-
.../e2e/snapshot_tables/cicd_pipelines.csv | 22 +++++++++++-----------
plugins/bitbucket/tasks/pipeline_convertor.go | 1 -
plugins/bitbucket/tasks/pipeline_extractor.go | 4 ++--
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/plugins/bitbucket/e2e/pipelines_test.go b/plugins/bitbucket/e2e/pipelines_test.go
index 0edbbdbb1..a1a00feea 100644
--- a/plugins/bitbucket/e2e/pipelines_test.go
+++ b/plugins/bitbucket/e2e/pipelines_test.go
@@ -68,7 +68,7 @@ func TestBitbucketPipelineDataFlow(t *testing.T) {
)
// verify conversion
- dataflowTester.FlushTabler(&devops.CICDPipelineCommit{})
+ dataflowTester.FlushTabler(&devops.CiCDPipelineCommit{})
dataflowTester.FlushTabler(&devops.CICDPipeline{})
dataflowTester.Subtask(tasks.ConvertPipelineMeta, taskData)
dataflowTester.VerifyTable(
diff --git a/plugins/bitbucket/e2e/snapshot_tables/cicd_pipelines.csv b/plugins/bitbucket/e2e/snapshot_tables/cicd_pipelines.csv
index dc8812a69..c7f646737 100644
--- a/plugins/bitbucket/e2e/snapshot_tables/cicd_pipelines.csv
+++ b/plugins/bitbucket/e2e/snapshot_tables/cicd_pipelines.csv
@@ -1,11 +1,11 @@
-id,name,result,status,type,duration_sec,created_date,finished_date,environment
-bitbucket:BitbucketPipeline:1:{0af285e5-c07d-48eb-b0e9-b579f63f6f54},bitbucket:BitbucketPipeline:1:main,MANUAL,IN_PROGRESS,CI/CD,10,2022-09-14T04:35:41.306+00:00,,
-bitbucket:BitbucketPipeline:1:{0b0986ff-87ab-4c61-8244-72ee93270992},bitbucket:BitbucketPipeline:1:main,MANUAL,IN_PROGRESS,CI/CD,10,2022-09-20T12:40:10.785+00:00,,
-bitbucket:BitbucketPipeline:1:{105b3616-0140-4f17-993e-65d8836cbfd4},bitbucket:BitbucketPipeline:1:pipeline,MANUAL,IN_PROGRESS,CI/CD,9,2022-09-20T12:41:07.095+00:00,,
-bitbucket:BitbucketPipeline:1:{60bd9ab0-57d7-4da6-bf39-3b04e8133223},bitbucket:BitbucketPipeline:1:feature/pipelinetest,FAILURE,DONE,CI/CD,0,2022-09-20T12:44:05.761+00:00,2022-09-20T12:44:05.745+00:00,
-bitbucket:BitbucketPipeline:1:{76e9c380-bedf-48f8-ad11-9b4a60307dd6},bitbucket:BitbucketPipeline:1:pipeline,ABORT,DONE,CI/CD,0,2022-09-20T12:42:14.300+00:00,2022-09-20T12:42:23.084+00:00,
-bitbucket:BitbucketPipeline:1:{844365c2-2d8c-4b67-9e27-21c2fcda7bd7},bitbucket:BitbucketPipeline:1:main,MANUAL,IN_PROGRESS,CI/CD,10,2022-09-14T04:35:17.076+00:00,,
-bitbucket:BitbucketPipeline:1:{a57ab3dc-2afd-4e23-acd3-7acf1bb0cf28},bitbucket:BitbucketPipeline:1:main,SUCCESS,DONE,CI/CD,14,2022-09-13T14:10:22.042+00:00,2022-09-13T14:14:03.870+00:00,
-bitbucket:BitbucketPipeline:1:{accb6177-eea1-4d13-9806-037645ca3f67},bitbucket:BitbucketPipeline:1:,FAILURE,DONE,CI/CD,0,2022-09-20T12:45:52.175+00:00,2022-09-20T12:45:52.155+00:00,
-bitbucket:BitbucketPipeline:1:{d676e969-7294-4ca2-9173-4fba9b419fe9},bitbucket:BitbucketPipeline:1:pipeline,FAILURE,DONE,CI/CD,0,2022-09-20T12:45:51.130+00:00,2022-09-20T12:45:51.117+00:00,
-bitbucket:BitbucketPipeline:1:{fc8cfdbd-2e0f-4789-9abb-19bf326f704b},bitbucket:BitbucketPipeline:1:feature/pipelinetest,MANUAL,IN_PROGRESS,CI/CD,12,2022-09-20T12:34:39.893+00:00,,
+id,name,result,status,type,duration_sec,environment
+bitbucket:BitbucketPipeline:1:{0af285e5-c07d-48eb-b0e9-b579f63f6f54},bitbucket:BitbucketPipeline:1:main,SUCCESS,IN_PROGRESS,CI/CD,10,
+bitbucket:BitbucketPipeline:1:{0b0986ff-87ab-4c61-8244-72ee93270992},bitbucket:BitbucketPipeline:1:main,SUCCESS,IN_PROGRESS,CI/CD,10,
+bitbucket:BitbucketPipeline:1:{105b3616-0140-4f17-993e-65d8836cbfd4},bitbucket:BitbucketPipeline:1:pipeline,SUCCESS,IN_PROGRESS,CI/CD,9,
+bitbucket:BitbucketPipeline:1:{60bd9ab0-57d7-4da6-bf39-3b04e8133223},bitbucket:BitbucketPipeline:1:feature/pipelinetest,FAILURE,DONE,CI/CD,0,
+bitbucket:BitbucketPipeline:1:{76e9c380-bedf-48f8-ad11-9b4a60307dd6},bitbucket:BitbucketPipeline:1:pipeline,ABORT,DONE,CI/CD,0,
+bitbucket:BitbucketPipeline:1:{844365c2-2d8c-4b67-9e27-21c2fcda7bd7},bitbucket:BitbucketPipeline:1:main,SUCCESS,IN_PROGRESS,CI/CD,10,
+bitbucket:BitbucketPipeline:1:{a57ab3dc-2afd-4e23-acd3-7acf1bb0cf28},bitbucket:BitbucketPipeline:1:main,SUCCESS,DONE,CI/CD,14,
+bitbucket:BitbucketPipeline:1:{accb6177-eea1-4d13-9806-037645ca3f67},bitbucket:BitbucketPipeline:1:,FAILURE,DONE,CI/CD,0,
+bitbucket:BitbucketPipeline:1:{d676e969-7294-4ca2-9173-4fba9b419fe9},bitbucket:BitbucketPipeline:1:pipeline,FAILURE,DONE,CI/CD,0,
+bitbucket:BitbucketPipeline:1:{fc8cfdbd-2e0f-4789-9abb-19bf326f704b},bitbucket:BitbucketPipeline:1:feature/pipelinetest,SUCCESS,IN_PROGRESS,CI/CD,12,
diff --git a/plugins/bitbucket/tasks/pipeline_convertor.go b/plugins/bitbucket/tasks/pipeline_convertor.go
index 7b97916c6..3b3c030f8 100644
--- a/plugins/bitbucket/tasks/pipeline_convertor.go
+++ b/plugins/bitbucket/tasks/pipeline_convertor.go
@@ -77,7 +77,6 @@ func ConvertPipelines(taskCtx core.SubTaskContext) errors.Error {
Generate(bitbucketPipeline.ConnectionId, bitbucketPipeline.RepoId),
CommitSha: bitbucketPipeline.CommitSha,
Branch: bitbucketPipeline.RefName,
- Repo: bitbucketPipeline.WebUrl,
}
domainPipeline := &devops.CICDPipeline{
DomainEntity: domainlayer.DomainEntity{
diff --git a/plugins/bitbucket/tasks/pipeline_extractor.go b/plugins/bitbucket/tasks/pipeline_extractor.go
index 67d69c413..a08c6dc7f 100644
--- a/plugins/bitbucket/tasks/pipeline_extractor.go
+++ b/plugins/bitbucket/tasks/pipeline_extractor.go
@@ -113,11 +113,11 @@ func ExtractApiPipelines(taskCtx core.SubTaskContext) errors.Error {
bitbucketPipeline := &models.BitbucketPipeline{
ConnectionId: data.Options.ConnectionId,
BitbucketId: bitbucketApiPipeline.Uuid,
- WebUrl: bitbucketApiPipeline.Target.Commit.Links.Html.Href,
+ WebUrl: bitbucketApiPipeline.Links.Self.Href,
Status: bitbucketApiPipeline.State.Name,
RefName: bitbucketApiPipeline.Target.RefName,
CommitSha: bitbucketApiPipeline.Target.Commit.Hash,
- RepoId: bitbucketApiPipeline.Repo.FullName,
+ RepoId: bitbucketApiPipeline.Repo.BitbucketId,
DurationInSeconds: bitbucketApiPipeline.DurationInSeconds,
BitbucketCreatedOn: helper.Iso8601TimeToTime(bitbucketApiPipeline.CreatedOn),
BitbucketCompleteOn: helper.Iso8601TimeToTime(bitbucketApiPipeline.CompletedOn),