Skip to content

Commit

Permalink
Support fetching dev builds from calls-recorder-daily registry
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Jul 10, 2023
1 parent 526c668 commit 762110d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 10 additions & 1 deletion public/job/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
},
},
}
Expand Down

0 comments on commit 762110d

Please sign in to comment.