mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Renamed procs/jobs to steps in code (#1331)
Renamed `procs` to `steps` in code for the issue #1288 Co-authored-by: Harikesh Prajapati <harikesh.prajapati@druva.com> Co-authored-by: qwerty287 <ndev@web.de> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -112,7 +112,7 @@ func execWithAxis(c *cli.Context, file, repoPath string, axis matrix.Axis) error
|
||||
metadata := metadataFromContext(c, axis)
|
||||
environ := metadata.Environ()
|
||||
var secrets []compiler.Secret
|
||||
for key, val := range metadata.Job.Matrix {
|
||||
for key, val := range metadata.Step.Matrix {
|
||||
environ[key] = val
|
||||
secrets = append(secrets, compiler.Secret{
|
||||
Name: key,
|
||||
@@ -289,8 +289,8 @@ func metadataFromContext(c *cli.Context, axis matrix.Axis) frontend.Metadata {
|
||||
},
|
||||
},
|
||||
},
|
||||
Job: frontend.Job{
|
||||
Number: c.Int("job-number"),
|
||||
Step: frontend.Step{
|
||||
Number: c.Int("step-number"),
|
||||
Matrix: axis,
|
||||
},
|
||||
Sys: frontend.System{
|
||||
@@ -312,13 +312,13 @@ func convertPathForWindows(path string) string {
|
||||
return filepath.ToSlash(path)
|
||||
}
|
||||
|
||||
var defaultLogger = pipeline.LogFunc(func(proc *backendTypes.Step, rc multipart.Reader) error {
|
||||
var defaultLogger = pipeline.LogFunc(func(step *backendTypes.Step, rc multipart.Reader) error {
|
||||
part, err := rc.NextPart()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logStream := NewLineWriter(proc.Alias)
|
||||
logStream := NewLineWriter(step.Alias)
|
||||
_, err = io.Copy(logStream, part)
|
||||
return err
|
||||
})
|
||||
|
||||
@@ -260,8 +260,8 @@ var flags = []cli.Flag{
|
||||
Name: "prev-commit-author-email",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
EnvVars: []string{"CI_JOB_NUMBER"},
|
||||
Name: "job-number",
|
||||
EnvVars: []string{"CI_STEP_NUMBER", "CI_JOB_NUMBER"},
|
||||
Name: "step-number",
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
EnvVars: []string{"CI_ENV"},
|
||||
|
||||
@@ -32,7 +32,7 @@ const (
|
||||
|
||||
// Line is a line of console output.
|
||||
type Line struct {
|
||||
Proc string `json:"proc,omitempty"`
|
||||
Step string `json:"step,omitempty"`
|
||||
Time int64 `json:"time,omitempty"`
|
||||
Type int `json:"type,omitempty"`
|
||||
Pos int `json:"pos,omitempty"`
|
||||
@@ -66,7 +66,7 @@ func (w *LineWriter) Write(p []byte) (n int, err error) {
|
||||
|
||||
line := &Line{
|
||||
Out: out,
|
||||
Proc: w.name,
|
||||
Step: w.name,
|
||||
Pos: w.num,
|
||||
Time: int64(time.Since(w.now).Seconds()),
|
||||
Type: LineStdout,
|
||||
|
||||
Reference in New Issue
Block a user