Skip to content

Run any step defined in the job response

Overview

The job API responds with a an array of steps which we use to build the user script and after_script.

In gitlab#38352 (comment 264198104) & gitlab#39089 (comment 259412690) we are proposing to extend the steps so that we can run scripts generated from .gitlab-ci.yml.

Proposal

Accept more type of steps that the Rails can generate and run these scripts inside of the build context, meaning if it's inside Docker executor it will run the script inside of the build container. A few things that need to be considered:

  1. Should we add any kind of validation of the StepName, if we do this kind of validation of "known steps" every time rails creates a new step we have to sync up, which can be complex because it would depend on the Runner version
  2. How should the timeout work
  3. Should the script be executed as part of the user script, or in a separate context, meaning it would not have any environment variables that before_script & script. This might not work at all since in #6411 we are planning to execute it in a different environment
Edited by Steve Xuereb