Run CI/CD Pipeline at specific point in future (one time)

Description

Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/30882 should be implemented first or alongside with this.

We can manually trigger pipelines, and soon will be able to run them on a repeating schedule. But sometimes you just want to trigger a pipeline at a specific time in the future, once. For example, for about.gitlab.com, we use a static site generator for our blog. If you merge in a future blog post, it won't be rendered when merged. If you've got a press embargo on the subject, you want to trigger the blog post to go live at a specific time. Sure, you could set yourself a calendar reminder and trigger the pipeline yourself, but wouldn't it be better to proactively schedule the deploy? Again, this isn't something you need to repeat daily (although that is a reasonable workaround in this particular example), it's something you want to schedule once.

Proposal

I could see this as additional fields on either the manual pipeline trigger or the scheduled pipeline trigger pages. As a user, I'm not sure which one is more intuitive. There's arguments for both.

Design

  • Content of dismissible help, first line with change to: "The Pipelines Schedule runs pipelines in the future, either once or repeatedly, for specific branches or tags."

New_pipeline_menu_Copy_18

immediately New_pipeline_menu_Copy_17

one time New_pipeline_menu_Copy_13

  • Generates a pipeline schedule list entry for the time it's scheduled, this disappears when it has triggered and thus is no longer scheduled. (@bikebilly see if you think this makes sense.. its also why there is no a description field for this non immediate one time schedules) New_pipeline_menu_Copy_12

  • Detail view of date selection image

  • Detail view of time selection image

  • Note that it should be made impossible to schedule a pipeline in the past @brycepj (can we do this with some clever JS that validates the input to be a minimum of 10 minutes into the future?)

repeat New_pipeline_menu_Copy_9

activates "immediate" radio button image

activates "repeat" radio button image

Links / references

Documentation blurb

(Write the start of the documentation of this feature here, include:

  1. Why should someone use it; what's the underlying problem.
  2. What is the solution.
  3. How does someone use this

During implementation, this can then be copied and used as a starter for the documentation.)

Edited by Dimitrie Hoekstra