Skip to content

Commit 929b87c

Browse files
committed
Add flag --git-workdir to koyeb services update
1 parent 59a3b8a commit 929b87c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ koyeb apps init NAME [flags]
236236
--git-build-command string Buid command
237237
--git-no-deploy-on-push Disable new deployments creation when code changes are pushed on the configured branch
238238
--git-run-command string Run command
239+
--git-workdir string Path to the sub-directory containing the code to build and deploy
239240
-h, --help help for init
240241
--instance-type string Instance type (default "nano")
241242
--max-scale int Max scale (default 1)
@@ -911,6 +912,7 @@ koyeb services create NAME [flags]
911912
--git-build-command string Buid command
912913
--git-no-deploy-on-push Disable new deployments creation when code changes are pushed on the configured branch
913914
--git-run-command string Run command
915+
--git-workdir string Path to the sub-directory containing the code to build and deploy
914916
-h, --help help for create
915917
--instance-type string Instance type (default "nano")
916918
--max-scale int Max scale (default 1)
@@ -1194,6 +1196,7 @@ koyeb services update NAME [flags]
11941196
--git-build-command string Buid command
11951197
--git-no-deploy-on-push Disable new deployments creation when code changes are pushed on the configured branch
11961198
--git-run-command string Run command
1199+
--git-workdir string Path to the sub-directory containing the code to build and deploy
11971200
-h, --help help for update
11981201
--instance-type string Instance type (default "nano")
11991202
--max-scale int Max scale (default 1)

pkg/koyeb/services.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ func addServiceDefinitionFlags(flags *pflag.FlagSet) {
188188
flags.String("git-build-command", "", "Buid command")
189189
flags.String("git-run-command", "", "Run command")
190190
flags.Bool("git-no-deploy-on-push", false, "Disable new deployments creation when code changes are pushed on the configured branch")
191+
flags.String("git-workdir", "", "Path to the sub-directory containing the code to build and deploy")
191192
flags.String("docker", "", "Docker image")
192193
flags.String("docker-private-registry-secret", "", "Docker private registry secret")
193194
flags.String("docker-command", "", "Docker command")
@@ -377,6 +378,8 @@ func parseServiceDefinitionFlags(flags *pflag.FlagSet, definition *koyeb.Deploym
377378
buildCommand, _ := flags.GetString("git-build-command")
378379
runCommand, _ := flags.GetString("git-run-command")
379380
noDeployOnPush, _ := flags.GetBool("git-no-deploy-on-push")
381+
workdir, _ := flags.GetString("git-workdir")
382+
380383
createGitSource.SetRepository(git)
381384
if branch != "" {
382385
createGitSource.SetBranch(branch)
@@ -391,6 +394,8 @@ func parseServiceDefinitionFlags(flags *pflag.FlagSet, definition *koyeb.Deploym
391394
}
392395

393396
createGitSource.SetNoDeployOnPush(noDeployOnPush)
397+
createGitSource.SetWorkdir(workdir)
398+
394399
definition.SetGit(*createGitSource)
395400
definition.Docker = nil
396401
}

0 commit comments

Comments
 (0)