@@ -25,7 +25,7 @@ import (
25
25
"github.com/devtron-labs/devtron/internal/util"
26
26
"github.com/devtron-labs/devtron/pkg/pipeline/adapter"
27
27
"github.com/devtron-labs/devtron/pkg/pipeline/bean"
28
- "github.com/devtron-labs/devtron/pkg/pipeline/constants "
28
+ "github.com/devtron-labs/devtron/pkg/pipeline/helper "
29
29
"github.com/devtron-labs/devtron/pkg/pipeline/repository"
30
30
"github.com/devtron-labs/devtron/pkg/plugin"
31
31
repository2 "github.com/devtron-labs/devtron/pkg/plugin/repository"
@@ -37,7 +37,6 @@ import (
37
37
"github.com/go-pg/pg"
38
38
"go.uber.org/zap"
39
39
"net/http"
40
- "strings"
41
40
"time"
42
41
)
43
42
@@ -681,13 +680,7 @@ func (impl *PipelineStageServiceImpl) CreateStageSteps(steps []*bean.PipelineSta
681
680
impl .logger .Errorw ("error in creating script and mapping for inline step" , "err" , err , "inlineStepDetail" , inlineStepDetail )
682
681
return err
683
682
}
684
- for _ , path := range step .OutputDirectoryPath {
685
- if strings .HasPrefix (path , constants .CiRunnerWorkingDir ) {
686
- errMsg := fmt .Sprintf ("output directory path cannot start with reserved path %s" , constants .CiRunnerWorkingDir )
687
- return util .NewApiError (http .StatusBadRequest , errMsg , errMsg )
688
- }
689
- }
690
-
683
+ step .OutputDirectoryPath = helper .FilterReservedPathFromOutputDirPath (step .OutputDirectoryPath )
691
684
inlineStep := & repository.PipelineStageStep {
692
685
PipelineStageId : stageId ,
693
686
Name : step .Name ,
@@ -1253,6 +1246,7 @@ func (impl *PipelineStageServiceImpl) UpdateStageStepsWithTx(steps []*bean.Pipel
1253
1246
outputVariables = step .RefPluginStepDetail .OutputVariables
1254
1247
conditionDetails = step .RefPluginStepDetail .ConditionDetails
1255
1248
} else if step .StepType == repository .PIPELINE_STEP_TYPE_INLINE {
1249
+ step .OutputDirectoryPath = helper .FilterReservedPathFromOutputDirPath (step .OutputDirectoryPath )
1256
1250
if savedStep .StepType == repository .PIPELINE_STEP_TYPE_REF_PLUGIN {
1257
1251
//step changed from ref plugin to inline, create script and mapping
1258
1252
scriptEntryId , err := impl .CreateScriptAndMappingForInlineStep (step .InlineStepDetail , userId , tx )
0 commit comments