Skip to content

Commit

Permalink
Merge pull request #588 from travis-ci/damian-dist-image
Browse files Browse the repository at this point in the history
Specifying an unsupported language + `dist: xenial` routes the build to trusty
  • Loading branch information
DamianSzymanski authored Oct 29, 2019
2 parents 830b8d2 + a3c5bb1 commit 8466d9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions image/api_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ func (as *APISelector) buildCandidateTags(params *Params) ([]*tagSet, error) {
addTags("os:"+params.OS, "language_"+params.Language+":true")
}

if hasDist {
addTags("dist:" + params.Dist)
}

if hasLang {
addDefaultTag("language_" + params.Language + ":true")
}
Expand Down
2 changes: 2 additions & 0 deletions image/api_selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ var (
&tagSet{[]string{"dist:precise", "language_ruby:true"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"group_edge:true", "language_ruby:true"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"language_ruby:true", "os:linux"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"dist:precise"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"language_ruby:true"}, true, uint64(4), "corp/frob"},
&tagSet{[]string{"dist:precise"}, true, uint64(4), "corp/frob"},
&tagSet{[]string{"group_edge:true"}, true, uint64(4), "corp/frob"},
Expand Down Expand Up @@ -135,6 +136,7 @@ var (
&tagSet{[]string{"dist:yosammity", "language_node_js:true"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"group_fancy:true", "language_node_js:true"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"language_node_js:true", "os:osx"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"dist:yosammity"}, false, uint64(4), "corp/frob"},
&tagSet{[]string{"language_node_js:true"}, true, uint64(4), "corp/frob"},
&tagSet{[]string{"osx_image:xcode6.1"}, true, uint64(4), "corp/frob"},
&tagSet{[]string{"dist:yosammity"}, true, uint64(4), "corp/frob"},
Expand Down

0 comments on commit 8466d9d

Please sign in to comment.