fix #108 - ensure container names are unique for matrix runs
This commit is contained in:
parent
4f84be12e3
commit
59b9b8e97a
3 changed files with 12 additions and 2 deletions
|
@ -63,7 +63,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
||||||
|
|
||||||
for i, matrix := range matrixes {
|
for i, matrix := range matrixes {
|
||||||
rc := runner.newRunContext(run, matrix)
|
rc := runner.newRunContext(run, matrix)
|
||||||
if len(matrix) > 1 {
|
if len(matrixes) > 1 {
|
||||||
rc.Name = fmt.Sprintf("%s-%d", rc.Name, i+1)
|
rc.Name = fmt.Sprintf("%s-%d", rc.Name, i+1)
|
||||||
}
|
}
|
||||||
if len(rc.String()) > maxJobNameLen {
|
if len(rc.String()) > maxJobNameLen {
|
||||||
|
|
10
pkg/runner/testdata/matrix/push.yml
vendored
10
pkg/runner/testdata/matrix/push.yml
vendored
|
@ -13,3 +13,13 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, macos-latest]
|
os: [ubuntu-18.04, macos-latest]
|
||||||
node: [4, 6, 8, 10]
|
node: [4, 6, 8, 10]
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node: [8.x, 10.x, 12.x, 13.x]
|
||||||
|
steps:
|
||||||
|
- run: echo ${NODE_VERSION} | grep ${{ matrix.node }}
|
||||||
|
env:
|
||||||
|
NODE_VERSION: ${{ matrix.node }}
|
||||||
|
|
Loading…
Reference in a new issue