Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support runner.entrypoint parameter #16

Merged
merged 4 commits into from
Sep 18, 2018
Merged
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
7 changes: 5 additions & 2 deletions pkg/steps/script_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (l ScriptStepLoader) LoadStep(def step.StepDef, context step.LoadingContext
Artifacts: artifacts,
}
if entrypoint, ok := runner["entrypoint"].(string); ok {
runConf.Entrypoint = entrypoint
runConf.Entrypoint = &entrypoint
}
if command, ok := runner["command"].(string); ok {
runConf.Command = command
Expand Down Expand Up @@ -121,7 +121,7 @@ type Artifact struct {
type runnerConfig struct {
Image string
Command string
Entrypoint string
Entrypoint *string
Artifacts []Artifact
Args []string
Envfile string
Expand Down Expand Up @@ -176,6 +176,9 @@ tar zxvf %s.tgz 1>&2
dockerArgs = append(dockerArgs, "--env", fmt.Sprintf("%s=%s", name, value))
}
}
if c.Entrypoint != nil {
dockerArgs = append(dockerArgs, "--entrypoint", *c.Entrypoint)
}
var args []string
args = append(args, dockerArgs...)
args = append(args, "--entrypoint", c.Entrypoint)
Expand Down