Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 4 additions & 2 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,14 +680,15 @@ 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
}

inlineStep := &repository.PipelineStageStep{
PipelineStageId: stageId,
Name: step.Name,
Description: step.Description,
Index: step.Index,
StepType: step.StepType,
ScriptId: scriptEntryId,
OutputDirectoryPath: step.OutputDirectoryPath,
OutputDirectoryPath: helper.FilterReservedPathFromOutputDirPath(step.OutputDirectoryPath), // TODO: silently filtering reserved paths, not throwing error as of now since this flow is not in tx
DependentOnStep: dependentOnStep,
Deleted: false,
AuditLog: sql.AuditLog{
Expand Down Expand Up @@ -1205,7 +1207,7 @@ func (impl *PipelineStageServiceImpl) UpdateStageStepsWithTx(steps []*bean.Pipel
Description: step.Description,
Index: step.Index,
StepType: step.StepType,
OutputDirectoryPath: step.OutputDirectoryPath,
OutputDirectoryPath: helper.FilterReservedPathFromOutputDirPath(step.OutputDirectoryPath),
DependentOnStep: dependentOnStep,
Deleted: false,
AuditLog: sql.AuditLog{
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