diff --git a/public/job/job.go b/public/job/job.go index 0abd2af..2c60d59 100644 --- a/public/job/job.go +++ b/public/job/job.go @@ -16,13 +16,14 @@ const ( TypeRecording Type = "recording" ) -const minSupportedRecorderVersion = "0.3.1" +const minSupportedRecorderVersion = "0.4.0" // We currently support two formats, semantic version tag or image hash (sha256). // TODO: Consider deprecating tag version and switch to hash only. var recorderRunnerREs = []*regexp.Regexp{ regexp.MustCompile(`^mattermost/calls-recorder@sha256:\w{64}$`), regexp.MustCompile(`^mattermost/calls-recorder:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))$`), + regexp.MustCompile(`^mattermost/calls-recorder-daily:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))-dev$`), } type ServiceConfig struct { diff --git a/public/job/job_test.go b/public/job/job_test.go index f89ae7d..b880c98 100644 --- a/public/job/job_test.go +++ b/public/job/job_test.go @@ -89,6 +89,15 @@ func TestJobConfigIsValid(t *testing.T) { MaxDurationSec: 60, }, }, + { + name: "valid daily", + cfg: Config{ + Type: TypeRecording, + Runner: "mattermost/calls-recorder-daily:v" + minSupportedRecorderVersion + "-dev", + InputData: recorderCfg.ToMap(), + MaxDurationSec: 60, + }, + }, } for _, tc := range tcs { @@ -117,7 +126,7 @@ func TestServiceConfigIsValid(t *testing.T) { { name: "valid config", cfg: ServiceConfig{ - Runner: "mattermost/calls-recorder:v0.3.1", + Runner: "mattermost/calls-recorder:v" + minSupportedRecorderVersion, }, }, }