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:
Harikesh00
2022-10-28 21:08:53 +05:30
committed by GitHub
parent b44e895017
commit 36e42914fa
109 changed files with 1474 additions and 1364 deletions

View File

@@ -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
})

View File

@@ -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"},

View File

@@ -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,