Skip to content

Commit

Permalink
Make sure that we always fetch latest commit sha
Browse files Browse the repository at this point in the history
When we update the service definition we don't want to copy sha from
the previous deployment but rather fetch the latest one. For that
we need to zero git sha in deployment definiton which will trigger
fetching latest change.
  • Loading branch information
pawelbeza committed Jan 15, 2024
1 parent 7032ba5 commit 927b475
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/koyeb/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ $> koyeb service update myapp/myservice --env PORT=8001 --env '!DEBUG'`,
updateDef = latestDeploy.GetDeployments()[0].Definition
}

// zero the sha to make sure that the latest sha is fetched
if updateDef.Git != nil {
updateDef.Git.Sha = koyeb.PtrString("")
}

err = parseServiceDefinitionFlags(cmd.Flags(), updateDef)
if err != nil {
return err
Expand Down

0 comments on commit 927b475

Please sign in to comment.