Change the option to use scheduling instead of next_run_scheduled
What does this MR do and why?
This is a fix forward for !110716 (merged) to use scheduling option.
Because if next_run_scheduled is used, we will need to update all the other places and make sure they pass next_run_scheduled: true.
If we use scheduling, we only need to update only one place which is the PipelineScheduleWorker.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Enable feature flag by running:
rails runner 'Feature.enable(:ci_use_run_pipeline_schedule_worker)' - create a new project
338609-test-play-button - add CI config by going to
CI/CD->Editorwith the following content:image: busybox:latest build: script: - echo "Do your build here" - sleep 15 - go to
CI/CD->Schedulesand create a schedule - click the
Playbutton for the created schedule - go to
CI/CD->Pipelinesand check if the pipeline for this schedule is created and runs - wait until the next schedule time and see if the pipeline is triggered as scheduled or run this command in Rails console to trigger it now:
Ci::PipelineSchedule.find($ID_FOR_THE_CREATED_PIPELINE_SCHEDULE).update_columns(next_run_at: 1.day.ago) PipelineScheduleWorker.new.perform
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #338609 (closed)
Edited by Tianwen Chen