-
Notifications
You must be signed in to change notification settings - Fork 79
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
Run release
command from Procfile in Deploy flow
#226
Conversation
pkg/server/deploy/errors.go
Outdated
@@ -7,5 +7,6 @@ import ( | |||
|
|||
var ( | |||
ErrBuildFail = status.Errorf(codes.Unknown, "Build return a non zero value") | |||
ErrReleaseFail = status.Errorf(codes.Unknown, "Release command return a non zero value") | |||
ErrInvalidTeresaYamlFile = status.Errorf(codes.InvalidArgument, "Invalid Teresa Yaml file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return -> returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y + p
sorry
pkg/server/deploy/deploy.go
Outdated
@@ -68,7 +68,7 @@ func (ops *DeployOperations) Deploy(user *storage.User, appName string, tarBall | |||
slugURL := fmt.Sprintf("%s/slug.tgz", buildDest) | |||
releaseCmd := confFiles.Procfile[ProcfileReleaseCmd] | |||
if confFiles.Procfile != nil && releaseCmd != "" { | |||
if err := ops.runReleaseCmd(a, slugURL, w); err != nil { | |||
if err := ops.runReleaseCmd(a, deployId, slugURL, w); err != nil { | |||
log.WithError(err).Errorf("Running release command %s in app %s", releaseCmd, appName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe log deployId on errors, don't know if it's useful for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? I'll add
@aguerra updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔁
i.e. `teresa.yaml` and `Procfile`
2742ede
to
226aeba
Compare
This is the most wanted feature according to our users!
This feature enables devs to run tasks (e.g. migrations, APM deploy notify, etc) before update the current deploy.
The release command will be run between build phase and deploy update phase. If some error comes across in release phase the deployed content won't be updated.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)