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

30 lines
705 B
Ruby
Raw Normal View History

FactoryGirl.define do
factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do
2017-04-01 09:02:46 +00:00
cron '0 1 * * *'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
2017-04-07 14:02:13 +00:00
ref 'master'
active true
description "pipeline schedule"
project
2017-04-07 12:47:29 +00:00
2017-04-04 12:22:12 +00:00
trait :nightly do
cron '0 1 * * *'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end
2017-04-04 12:22:12 +00:00
trait :weekly do
2017-03-30 18:16:24 +00:00
cron '0 1 * * 6'
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end
2017-04-04 12:22:12 +00: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