mirror of https://github.com/linkerd/linkerd2.git
actions: Limit job runtime to <= 30 minutes (#5216)
The default job timeout is 6 hours! This allows runaway builds to consume our actions resources unnecessarily. This change limits integration test jobs to 30 minutes. Static checks are limited to 10 minutes.
This commit is contained in:
parent
7a0c64a9e2
commit
440a201997
|
@ -17,6 +17,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
target: [proxy, controller, web, cni-plugin, debug, cli-bin, grafana]
|
target: [proxy, controller, web, cni-plugin, debug, cli-bin, grafana]
|
||||||
name: Docker build (${{ matrix.target }})
|
name: Docker build (${{ matrix.target }})
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
# actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
@ -72,6 +73,7 @@ jobs:
|
||||||
name: Static CLI tests (windows)
|
name: Static CLI tests (windows)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
# actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
@ -109,6 +111,7 @@ jobs:
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
name: Integration tests (${{ matrix.integration_test }})
|
name: Integration tests (${{ matrix.integration_test }})
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
# actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
|
|
@ -13,6 +13,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
target: [proxy, controller, web, cni-plugin, debug, cli-bin, grafana]
|
target: [proxy, controller, web, cni-plugin, debug, cli-bin, grafana]
|
||||||
name: Docker build (${{ matrix.target }})
|
name: Docker build (${{ matrix.target }})
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
# actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
@ -71,6 +72,7 @@ jobs:
|
||||||
# todo: Keep in sync with `kind_integration.yml`
|
# todo: Keep in sync with `kind_integration.yml`
|
||||||
windows_static_cli_tests:
|
windows_static_cli_tests:
|
||||||
name: Static CLI tests (windows)
|
name: Static CLI tests (windows)
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
steps:
|
steps:
|
||||||
|
@ -106,6 +108,7 @@ jobs:
|
||||||
- cni-calico-deep
|
- cni-calico-deep
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
name: Integration tests (${{ matrix.integration_test }})
|
name: Integration tests (${{ matrix.integration_test }})
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -133,6 +136,7 @@ jobs:
|
||||||
bin/tests --images skip --name ${{ matrix.integration_test }} "$CMD"
|
bin/tests --images skip --name ${{ matrix.integration_test }} "$CMD"
|
||||||
arm64_integration_tests:
|
arm64_integration_tests:
|
||||||
name: ARM64 integration tests
|
name: ARM64 integration tests
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
steps:
|
steps:
|
||||||
|
@ -185,6 +189,7 @@ jobs:
|
||||||
# only runs for stable tags. The conditionals are at each step level instead of the job level
|
# only runs for stable tags. The conditionals are at each step level instead of the job level
|
||||||
# otherwise the jobs below that depend on this one won't run
|
# otherwise the jobs below that depend on this one won't run
|
||||||
name: Pack Chocolatey release
|
name: Pack Chocolatey release
|
||||||
|
timeout-minutes: 30
|
||||||
needs: [kind_integration_tests, arm64_integration_tests]
|
needs: [kind_integration_tests, arm64_integration_tests]
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
|
@ -212,6 +217,7 @@ jobs:
|
||||||
path: ./linkerd.*.nupkg
|
path: ./linkerd.*.nupkg
|
||||||
gh_release:
|
gh_release:
|
||||||
name: Create GH release
|
name: Create GH release
|
||||||
|
timeout-minutes: 30
|
||||||
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [choco_pack]
|
needs: [choco_pack]
|
||||||
|
@ -258,6 +264,7 @@ jobs:
|
||||||
./target/release/linkerd2-cli-*.nupkg
|
./target/release/linkerd2-cli-*.nupkg
|
||||||
website_publish:
|
website_publish:
|
||||||
name: Linkerd website publish
|
name: Linkerd website publish
|
||||||
|
timeout-minutes: 30
|
||||||
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [gh_release]
|
needs: [gh_release]
|
||||||
|
@ -271,6 +278,7 @@ jobs:
|
||||||
event-type: release
|
event-type: release
|
||||||
website_publish_check:
|
website_publish_check:
|
||||||
name: Linkerd website publish check
|
name: Linkerd website publish check
|
||||||
|
timeout-minutes: 30
|
||||||
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
if: startsWith(github.ref, 'refs/tags/stable') || startsWith(github.ref, 'refs/tags/edge')
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [website_publish]
|
needs: [website_publish]
|
||||||
|
@ -301,6 +309,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
chart_deploy:
|
chart_deploy:
|
||||||
name: Helm chart deploy
|
name: Helm chart deploy
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [gh_release]
|
needs: [gh_release]
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -10,6 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
go_lint:
|
go_lint:
|
||||||
name: Go lint
|
name: Go lint
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
|
@ -21,6 +22,7 @@ jobs:
|
||||||
run: bin/lint --verbose
|
run: bin/lint --verbose
|
||||||
go_format:
|
go_format:
|
||||||
name: Go format
|
name: Go format
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
|
@ -32,6 +34,7 @@ jobs:
|
||||||
run: bin/fmt
|
run: bin/fmt
|
||||||
proto_diff:
|
proto_diff:
|
||||||
name: Proto diff
|
name: Proto diff
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
|
@ -43,6 +46,7 @@ jobs:
|
||||||
run: bin/protoc-diff
|
run: bin/protoc-diff
|
||||||
shellcheck:
|
shellcheck:
|
||||||
name: shellcheck
|
name: shellcheck
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -54,6 +58,7 @@ jobs:
|
||||||
bin/shellcheck-all
|
bin/shellcheck-all
|
||||||
psscript-analyzer:
|
psscript-analyzer:
|
||||||
name: PSScriptAnalyzer
|
name: PSScriptAnalyzer
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -70,6 +75,7 @@ jobs:
|
||||||
failOnInfos: true
|
failOnInfos: true
|
||||||
markdown_lint:
|
markdown_lint:
|
||||||
name: Markdown lint
|
name: Markdown lint
|
||||||
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
|
@ -10,6 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
go_unit_tests:
|
go_unit_tests:
|
||||||
name: Go unit tests
|
name: Go unit tests
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: golang:1.14.2
|
image: golang:1.14.2
|
||||||
|
@ -24,6 +25,7 @@ jobs:
|
||||||
gotestsum -- -cover -race -v -mod=readonly ./...
|
gotestsum -- -cover -race -v -mod=readonly ./...
|
||||||
js_unit_tests:
|
js_unit_tests:
|
||||||
name: JS unit tests
|
name: JS unit tests
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: node:14-stretch
|
image: node:14-stretch
|
||||||
|
|
Loading…
Reference in New Issue