Skip to content
Snippets Groups Projects

Native Step Runner Integration for Docker Executor

Merged Axel von Bertoldi requested to merge avonbertoldi/47414/steps-integration-docker into main
2 files
+ 13
0
Compare changes
  • Side-by-side
  • Inline
Files
2
  • When the run keyword is used, the StepsShim will have inserted a
    Build.Step to run `/step-runner ci` and a STEPS build variable. When
    steps integration is enabled, we don't execute build steps, so lets
    remove them to avoid confusion. Let's replace them with an empty Step
    with the name `run`.
    
    
    This has two effects:
    1.  It results in a `Executing "step_run" stage of the job script` log
        int he job trace, which is purely cosmetic but nicer than `Executing
        step_script ...`.
    2. It preserves execution when steps integration is not enabled. I
       really really do not want to break for other executors so I'm making
       the minimal change necessary. Ideally when steps has been integrated
       into the k8s and instance executors, and when we drop all other
       executors, we'll be a position to refactor job execution with and
       without steps.
    
    We'll deal with the STEPS variable later.
+ 12
0
@@ -826,6 +826,18 @@ func (mr *RunCommand) processBuildOnRunner(
build.Session = buildSession
build.ArtifactUploader = mr.network.UploadRawArtifacts
// If native steps is enabled, the script steps won't be executed anyway, but this change ensures the job log trace
// is coherent since it will print:
// Executing "step_run" stage of the job script
if build.UseNativeSteps() {
build.Steps = common.Steps{{
Name: common.StepNameRun,
Timeout: 3600,
When: common.StepWhenAlways,
AllowFailure: false,
}}
}
trace.SetDebugModeEnabled(build.IsDebugModeEnabled())
// Add build to list of builds to assign numbers
Loading