You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/18 09:40:43 UTC

[GitHub] [incubator-devlake] warren830 opened a new pull request, #2769: Feat add jenkins repo mapping

warren830 opened a new pull request, #2769:
URL: https://github.com/apache/incubator-devlake/pull/2769

   # Summary
   
   1. add build_origin_triggger_enricher.go to find ancestor build
   2. convert build_repo mapping to domain
   
   ### Does this close any open issues?
   closes #2768 
   
   ### Screenshots
   <img width="1266" alt="image" src="https://user-images.githubusercontent.com/39366025/185363937-cb999b8b-0783-45d5-afcc-b90b62414147.png">
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] abeizn merged pull request #2769: Feat add jenkins repo mapping

Posted by GitBox <gi...@apache.org>.
abeizn merged PR #2769:
URL: https://github.com/apache/incubator-devlake/pull/2769


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #2769: Feat add jenkins repo mapping

Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #2769:
URL: https://github.com/apache/incubator-devlake/pull/2769#discussion_r949742684


##########
plugins/jenkins/impl/impl.go:
##########
@@ -65,15 +65,17 @@ func (plugin Jenkins) Description() string {
 
 func (plugin Jenkins) SubTaskMetas() []core.SubTaskMeta {
 	return []core.SubTaskMeta{
-		tasks.CollectApiJobsMeta,
-		tasks.ExtractApiJobsMeta,
-		tasks.CollectApiBuildsMeta,
-		tasks.ExtractApiBuildsMeta,
-		tasks.CollectApiStagesMeta,
-		tasks.ExtractApiStagesMeta,
-		tasks.EnrichApiBuildsMeta,

Review Comment:
   Do you really want to annotate?



##########
plugins/jenkins/tasks/build_cicd_convertor.go:
##########
@@ -64,13 +43,9 @@ func ConvertBuildsToCICD(taskCtx core.SubTaskContext) error {
 	data := taskCtx.GetData().(*JenkinsTaskData)
 
 	clauses := []dal.Clause{
-		dal.Select(`tjb.connection_id, tjb.duration, tjb.display_name, tjb.estimated_duration, tjb.number,
-			tjb._raw_data_remark, tjb._raw_data_id, tjb._raw_data_table, tjb._raw_data_params,
-			tjb.result, tjb.timestamp, tjb.start_time, tjbr.commit_sha, tjb.type, tjb.class, 
-			tjb.triggered_by, tjb.building, tjbr.branch, tjbr.repo_url, tjb.has_stages`),
-		dal.From("_tool_jenkins_builds tjb"),
-		dal.Join("left join _tool_jenkins_build_repos tjbr on tjbr.build_name = tjb.display_name"),
-		dal.Where("tjb.connection_id = ?", data.Options.ConnectionId),
+		dal.Select(`*`),

Review Comment:
   Is it possible not to use * here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #2769: Feat add jenkins repo mapping

Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #2769:
URL: https://github.com/apache/incubator-devlake/pull/2769#discussion_r949742144


##########
plugins/azure/models/build.go:
##########
@@ -0,0 +1,76 @@
+package models
+
+import (
+	"github.com/apache/incubator-devlake/models/common"
+	"time"
+)
+
+type AzureBuild struct {
+	common.NoPKModel
+	// collected fields
+	ConnectionId      uint64    `gorm:"primaryKey"`
+	JobName           string    `gorm:"primaryKey;type:varchar(255)"`
+	Duration          float64   // build time
+	DisplayName       string    `gorm:"type:varchar(255)"` // "#7"
+	EstimatedDuration float64   // EstimatedDuration
+	Number            int64     `gorm:"primaryKey"`
+	Result            string    // Result
+	Timestamp         int64     // start time
+	StartTime         time.Time // convered by timestamp
+	CommitSha         string    `gorm:"type:varchar(255)"`
+}
+
+func (AzureBuild) TableName() string {
+	return "_tool_azure_builds"
+}
+
+type AutoGenerated struct {

Review Comment:
   change name?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org