This is an automated email from the ASF dual-hosted git repository.

mappjzc 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 779423b26 fix: jenkins transformation rules have not in effect by 
blueprint (#4088)
779423b26 is described below

commit 779423b26ee76d5718ae779b5cd29437e90a303b
Author: abeizn <[email protected]>
AuthorDate: Tue Jan 3 17:51:23 2023 +0800

    fix: jenkins transformation rules have not in effect by blueprint (#4088)
---
 plugins/jenkins/impl/impl.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/jenkins/impl/impl.go b/plugins/jenkins/impl/impl.go
index 3f5b283a0..0ff878119 100644
--- a/plugins/jenkins/impl/impl.go
+++ b/plugins/jenkins/impl/impl.go
@@ -255,7 +255,7 @@ func EnrichOptions(taskCtx core.TaskContext,
                op.JobPath = fmt.Sprintf("%s/", op.JobPath)
        }
        // We only set op.JenkinsTransformationRule when it's nil and we have 
op.TransformationRuleId != 0
-       if op.JenkinsTransformationRule == nil && op.TransformationRuleId != 0 {
+       if op.JenkinsTransformationRule.DeploymentPattern == "" && 
op.JenkinsTransformationRule.ProductionPattern == "" && op.TransformationRuleId 
!= 0 {
                var transformationRule models.JenkinsTransformationRule
                err = taskCtx.GetDal().First(&transformationRule, dal.Where("id 
= ?", op.TransformationRuleId))
                if err != nil {
@@ -264,7 +264,7 @@ func EnrichOptions(taskCtx core.TaskContext,
                op.JenkinsTransformationRule = &transformationRule
        }
 
-       if op.JenkinsTransformationRule == nil && op.TransformationRuleId == 0 {
+       if op.JenkinsTransformationRule.DeploymentPattern == "" && 
op.JenkinsTransformationRule.ProductionPattern == "" && op.TransformationRuleId 
== 0 {
                op.JenkinsTransformationRule = 
new(models.JenkinsTransformationRule)
        }
 

Reply via email to