mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 08:10:30 +00:00
Improve logging (#1171)
* feat: use logger from context wherever possible Co-authored-by: Markus Wolf <[email protected]> * feat: add step/job id and results to json logs Co-authored-by: Markus Wolf <[email protected]> * test: value to be masked should not be hard-coded in the action Co-authored-by: Markus Wolf <[email protected]> * fix: replace values following ::add-mask:: in evaluated strings Co-authored-by: Markus Wolf <[email protected]> * feat: [DEBUG] identifier for debug logs to distinguish them Co-authored-by: Markus Wolf <[email protected]> * feat: replace logger with step logger The container gets injected a job logger, but during the time that steps are run, we want to use the step logger. This commit wraps pre/main/post steps in an executor that replaces the job logger with a step logger. Co-authored-by: Markus Wolf <[email protected]> * feat: add pre/post stage identifier fields to json log output Co-authored-by: Markus Wolf <[email protected]> * feat: add job/step result status to skipped steps/jobs Co-authored-by: Markus Wolf <[email protected]> Co-authored-by: Markus Wolf <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
35 files changed
+363
-292
No files matched your search
@@ -230,7 +230,7 @@ func TestIsStepEnabled(t *testing.T) {
|
||||
|
||||
// success()
|
||||
step := createTestStep(t, "if: success()")
|
||||
assertObject.True(isStepEnabled(context.Background(), step.getIfExpression(stepStageMain), step, stepStageMain))
|
||||
assertObject.True(isStepEnabled(context.Background(), step.getIfExpression(context.Background(), stepStageMain), step, stepStageMain))
|
||||
|
||||
step = createTestStep(t, "if: success()")
|
||||
step.getRunContext().StepResults["a"] = &model.StepResult{
|
||||
|
||||
Reference in new issue
Block a user