WIP: Web terminal for CI builds

What does this MR do?

Enables web terminal for CI builds on Kubernetes. I wanted to create this WIP MR right away to help guide the feature discussion, taking implementation complexity into account.

What changes are missing in this MR?

  • Delaying pod deletion for some time after the build completes:
    • Either for as long as the user is connected (upto a certain time limit) - if we want to provide web terminal for all running builds,
    • or, just for a fixed period - if we only enable it on explicit user request
      • in this case, we'll need a new column in the DB to store whether terminal access is enabled for a build
  • Frontend changes with help from UX - for now I've just added a simple Terminal button in the right sidebar if the build is still running
  • Refactoring of the controller code

I favour the first approach of enabling this feature for all running builds, unless it makes things more complex.

Why was this MR needed?

The most common use-case is to debug failed builds by interactively inspecting logs, partial build outputs, etc. It's something developers at my company frequently ask for.

Screenshots (if relevant)

Screenshot-2018-2-22_build1___1010____Jobs___H5bp_Html5_Boilerplate

Screenshot-2018-2-22_Terminal_for_build___build1___1010____H5bp_Html5_Boilerplate

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #25990 (closed)

Edited by Vicky Chijwani

Merge request reports

Loading