Skip to content

Commit

Permalink
buildkite: automatic retries in case of agent failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed May 7, 2020
1 parent c127480 commit 5eaacb2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .buildkite/code.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ docker_plugin_sgx: &docker_plugin_sgx
oasislabs/docker#v3.0.1-oasis1:
<<: *docker_plugin_sgx_config

retry: &retry_agent_failure
automatic:
- exit_status: -1 # Agent was lost
limit: 2
- exit_status: 255 # Forced agent shutdown
limit: 2

steps:
###########
# Lint jobs
Expand All @@ -69,21 +76,29 @@ steps:
- .buildkite/go/lint.sh
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

- label: Lint Rust crate versions
command: .buildkite/rust/lint_crate_versions.sh
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

- label: Audit Rust dependencies for vulnerabilities
command: .buildkite/rust/cargo_audit.sh
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

- label: Audit Go dependencies for vulnerabilities
command: .buildkite/go/nancy_audit.sh
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -105,6 +120,8 @@ steps:
- buildkite-agent artifact upload oasis-net-runner
- cd /workdir/go/oasis-remote-signer
- buildkite-agent artifact upload oasis-remote-signer
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -126,6 +143,8 @@ steps:
- buildkite-agent artifact upload simple-keyvalue-ops-client
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -146,6 +165,8 @@ steps:
- buildkite-agent artifact upload simple-keyvalue
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -160,6 +181,8 @@ steps:
- .buildkite/rust/test_generic.sh .
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -176,6 +199,8 @@ steps:
# TODO: Consider making this a part of the development Docker image.
- go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
- make -C go build-fuzz
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -190,6 +215,8 @@ steps:
- coverage-oasis-node.txt
- coverage-mkvs.txt
- /tmp/oasis-node-test_*/test-node.log
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -210,6 +237,8 @@ steps:
TEST_BASE_DIR: /tmp
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -230,6 +259,8 @@ steps:
TEST_BASE_DIR: /tmp
agents:
queue: intel-sgx
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin_sgx

Expand All @@ -248,6 +279,8 @@ steps:
TEST_BASE_DIR: /tmp
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -266,6 +299,8 @@ steps:
soft_fail: true
agents:
buildkite_agent_size: large
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin

Expand All @@ -284,5 +319,7 @@ steps:
artifact_paths:
- merged-coverage.txt
soft_fail: true
retry:
<<: *retry_agent_failure
plugins:
<<: *docker_plugin
1 change: 1 addition & 0 deletions .changelog/2894.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: automatically retry jobs due to host agent failures

0 comments on commit 5eaacb2

Please sign in to comment.