Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion env_gen.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions env_gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@
| DASHBOARD_PORT | string |3000 | Port for dashboard micro-service | | false |
| DEX_HOST | string |http://localhost | | | false |
| DEX_PORT | string |5556 | | | false |
| GIT_SENSOR_PROTOCOL | string |REST | Protocol to connect with git-sensor micro-service | | false |
| GIT_SENSOR_PROTOCOL | string |GRPC | Protocol to connect with git-sensor micro-service | | false |
| GIT_SENSOR_SERVICE_CONFIG | string |{"loadBalancingPolicy":"pick_first"} | git-sensor grpc service config | | false |
| GIT_SENSOR_TIMEOUT | int |0 | Timeout for getting response from the git-sensor | | false |
| GIT_SENSOR_URL | string |127.0.0.1:7070 | git-sensor micro-service url | | false |
| GIT_SENSOR_URL | string |127.0.0.1:7071 | git-sensor micro-service url | | false |
| HELM_CLIENT_URL | string |127.0.0.1:50051 | Kubelink micro-service url | | false |
| KUBELINK_GRPC_MAX_RECEIVE_MSG_SIZE | int |20 | | | false |
| KUBELINK_GRPC_MAX_SEND_MSG_SIZE | int |4 | | | false |
Expand Down
3 changes: 3 additions & 0 deletions pkg/pipeline/PipelineStageService.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/devtron-labs/devtron/internal/util"
"github.com/devtron-labs/devtron/pkg/pipeline/adapter"
"github.com/devtron-labs/devtron/pkg/pipeline/bean"
"github.com/devtron-labs/devtron/pkg/pipeline/helper"
"github.com/devtron-labs/devtron/pkg/pipeline/repository"
"github.com/devtron-labs/devtron/pkg/plugin"
repository2 "github.com/devtron-labs/devtron/pkg/plugin/repository"
Expand Down Expand Up @@ -679,6 +680,7 @@ func (impl *PipelineStageServiceImpl) CreateStageSteps(steps []*bean.PipelineSta
impl.logger.Errorw("error in creating script and mapping for inline step", "err", err, "inlineStepDetail", inlineStepDetail)
return err
}
step.OutputDirectoryPath = helper.FilterReservedPathFromOutputDirPath(step.OutputDirectoryPath)
inlineStep := &repository.PipelineStageStep{
PipelineStageId: stageId,
Name: step.Name,
Expand Down Expand Up @@ -1244,6 +1246,7 @@ func (impl *PipelineStageServiceImpl) UpdateStageStepsWithTx(steps []*bean.Pipel
outputVariables = step.RefPluginStepDetail.OutputVariables
conditionDetails = step.RefPluginStepDetail.ConditionDetails
} else if step.StepType == repository.PIPELINE_STEP_TYPE_INLINE {
step.OutputDirectoryPath = helper.FilterReservedPathFromOutputDirPath(step.OutputDirectoryPath)
if savedStep.StepType == repository.PIPELINE_STEP_TYPE_REF_PLUGIN {
//step changed from ref plugin to inline, create script and mapping
scriptEntryId, err := impl.CreateScriptAndMappingForInlineStep(step.InlineStepDetail, userId, tx)
Expand Down
1 change: 1 addition & 0 deletions pkg/pipeline/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ const Starting = "Starting"
const TERMINATE_MESSAGE = "workflow shutdown with strategy: Terminate"
const FORCE_ABORT_MESSAGE_AFTER_STARTING_STAGE = "workflow shutdown with strategy: Force Abort"
const POD_TIMEOUT_MESSAGE = "Pod was active on the node longer than the specified deadline"
const CiRunnerWorkingDir = "/devtroncd"
16 changes: 16 additions & 0 deletions pkg/pipeline/helper/helper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package helper

import (
"github.com/devtron-labs/devtron/pkg/pipeline/constants"
"strings"
)

func FilterReservedPathFromOutputDirPath(outputDirectoryPath []string) []string {
var newOutputDirPath []string
for _, path := range outputDirectoryPath {
if !strings.HasPrefix(path, constants.CiRunnerWorkingDir) {
newOutputDirPath = append(newOutputDirPath, path)
}
}
return newOutputDirPath
}
Loading