-
Notifications
You must be signed in to change notification settings - Fork 433
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
feat (api): add release builtin action #1019
Conversation
|
||
res, err := g.post(url, "application/json", bytes.NewBuffer(b), false) | ||
if err != nil { | ||
return nil, err |
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.
wrap
engine/api/workflow_application.go
Outdated
"github.com/go-gorp/gorp" | ||
"github.com/gorilla/mux" | ||
|
||
"bufio" |
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.
import order
engine/api/workflow_application.go
Outdated
return errU | ||
} | ||
|
||
router.Handle("/project/{permProjectKey}/workflows/{workflowName}/runs/{number}/nodes/{id}/release", POST(releaseApplicationWorkflowHandler)) |
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.
???
engine/api/workflow_application.go
Outdated
|
||
for _, a := range artifactToUpload { | ||
b := &bytes.Buffer{} | ||
writer := bufio.NewWriter(b) |
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.
bytes.Buffer is already a Writer
engine/api/action/builtin.go
Outdated
gitrelease.Parameter(sdk.Parameter{ | ||
Name: "releaseNote", | ||
Description: "Set a release note for the release", | ||
Type: sdk.StringParameter, |
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.
TextParameter
engine/api/action/builtin.go
Outdated
}) | ||
gitrelease.Parameter(sdk.Parameter{ | ||
Name: "artifacts", | ||
Description: "Set a list of artifacts, separate by , .", |
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.
- doc sur les regex
engine/api/action/builtin.go
Outdated
gitrelease.Parameter(sdk.Parameter{ | ||
Name: "artifacts", | ||
Description: "Set a list of artifacts, separate by , .", | ||
Type: sdk.StringParameter, |
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.
TextParameter
|
||
// Release Create a release Github | ||
func (g *GithubClient) Release(fullname string, tagName string, title string, releaseNote string) (*sdk.VCSRelease, error) { | ||
var url = "/repos/" + fullname + "/releases" |
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.
fullname needs escape ?
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.
no
sdk/cdsclient/client_workflow.go
Outdated
return err | ||
} | ||
if code >= 300 { | ||
return fmt.Errorf("Cannot create workflow node run release") |
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.
display http code ? (and body err ?)
tmp["cds.run"] = fmt.Sprintf("%d.%d", 1, 0) | ||
tmp["cds.run.number"] = fmt.Sprintf("%d", 1) | ||
tmp["cds.run.subnumber"] = fmt.Sprintf("%d", 0) | ||
// TODO Update suggest.go with new variable |
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.
Don't forget
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.
it's not for me ;)
No description provided.