skip unsupported platforms

Signed-off-by: Casey Lee <[email protected]>
This commit is contained in:
Casey Lee committed 2020-02-20 21:06:01 -05:00
1 parent 73559207c7
commit 5b7019cd0b
6 files changed
+23 -14

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
containerSpec.Volumes = job.Container.Volumes
containerSpec.Options = job.Container.Options
} else {
containerSpec.Image = platformImage(ee.Interpolate(job.RunsOn))
containerSpec.Image = platformImage(rc.PlatformName)
}
return common.NewPipelineExecutor(
rc.setupShellCommand(containerSpec, step.Shell, step.Run),
@@ -154,7 +154,7 @@ func (rc *RunContext) setupShellCommand(containerSpec *model.ContainerSpec, shel
}
func platformImage(platform string) string {
switch platform {
switch strings.ToLower(platform) {
case "ubuntu-latest", "ubuntu-18.04":
return "ubuntu:18.04"
case "ubuntu-16.04":