gitlab-org--gitlab-foss/spec/factories/ci/pipeline_schedule.rb

30 lines
704 B
Ruby
Raw Normal View History

FactoryBot.define do
factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do
2017-04-01 05:02:46 -04:00
cron '0 1 * * *'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
2017-04-07 10:02:13 -04:00
ref 'master'
active true
description "pipeline schedule"
project
2017-04-07 08:47:29 -04:00
2017-04-04 08:22:12 -04:00
trait :nightly do
cron '0 1 * * *'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end
2017-04-04 08:22:12 -04:00
trait :weekly do
2017-03-30 14:16:24 -04:00
cron '0 1 * * 6'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end
2017-04-04 08:22:12 -04:00
trait :monthly do
cron '0 1 22 * *'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end
trait :inactive do
active false
end
end
end