diff --git a/public/job/job.go b/public/job/job.go index d3b9117..454fe40 100644 --- a/public/job/job.go +++ b/public/job/job.go @@ -79,11 +79,11 @@ func RunnerIsValid(runner, registry string) error { } recorderRunnerREs := []*regexp.Regexp{ - regexp.MustCompile(fmt.Sprintf(`^%s/%s:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-dev)?)$`, registry, RecordingJobPrefix)), + regexp.MustCompile(fmt.Sprintf(`^%s/%s:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))(?:-dev)?$`, registry, RecordingJobPrefix)), regexp.MustCompile(fmt.Sprintf(`^%s/%s-daily:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))-dev$`, registry, RecordingJobPrefix)), } transcriberRunnerREs := []*regexp.Regexp{ - regexp.MustCompile(fmt.Sprintf(`^%s/%s:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-dev)?)$`, registry, TranscribingJobPrefix)), + regexp.MustCompile(fmt.Sprintf(`^%s/%s:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))(?:-dev)?$`, registry, TranscribingJobPrefix)), regexp.MustCompile(fmt.Sprintf(`^%s/%s-daily:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))-dev$`, registry, TranscribingJobPrefix)), } diff --git a/public/job/job_test.go b/public/job/job_test.go index 29c2261..f8c2a83 100644 --- a/public/job/job_test.go +++ b/public/job/job_test.go @@ -118,6 +118,26 @@ func TestJobConfigIsValid(t *testing.T) { }, registry: ImageRegistryDefault, }, + { + name: "valid -dev build", + cfg: Config{ + Type: TypeRecording, + Runner: "mattermost/calls-recorder:v" + MinSupportedRecorderVersion + "-dev", + InputData: recorderCfg.ToMap(), + MaxDurationSec: 60, + }, + registry: ImageRegistryDefault, + }, + { + name: "valid -dev build, transcriber", + cfg: Config{ + Type: TypeRecording, + Runner: "mattermost/calls-transcriber:v" + MinSupportedTranscriberVersion + "-dev", + InputData: recorderCfg.ToMap(), + MaxDurationSec: 60, + }, + registry: ImageRegistryDefault, + }, { name: "valid daily", cfg: Config{ @@ -172,6 +192,15 @@ func TestServiceConfigIsValid(t *testing.T) { }, }, }, + { + name: "valid -dev config", + cfg: ServiceConfig{ + Runners: []string{ + "mattermost/calls-recorder:v" + MinSupportedRecorderVersion + "-dev", + "mattermost/calls-transcriber:v" + MinSupportedTranscriberVersion + "-dev", + }, + }, + }, } for _, tc := range tcs {