Skip to content

Commit 8395f83

Browse files
Address flakiness of Gitlab jobs (#703)
* Add retries to build, unit test, and integration test Gitlab jobs * Don't trigger integration tests from dd-trace-py * Add timeout to build jobs
1 parent 73650f9 commit 8395f83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/input_files/build.yaml.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ build-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
5454
CI_ENABLE_CONTAINER_IMAGE_BUILDS: "true"
5555
script:
5656
- PYTHON_VERSION={{ $runtime.python_version }} ARCH={{ $runtime.arch }} ./scripts/build_layers.sh
57+
timeout: 15m
58+
retry: 2
5759

5860
check-layer-size ({{ $runtime.name }}-{{ $runtime.arch }}):
5961
stage: test
@@ -85,11 +87,16 @@ unit-test ({{ $runtime.name }}-{{ $runtime.arch }}):
8587
script:
8688
- source venv/bin/activate
8789
- pytest -vv
90+
retry: 2
8891

8992
integration-test ({{ $runtime.name }}-{{ $runtime.arch }}):
9093
stage: test
9194
tags: ["arch:amd64"]
9295
image: registry.ddbuild.io/images/docker:20.10-py3
96+
rules:
97+
- if: '$SKIP_E2E_TESTS == "true"'
98+
when: never
99+
- when: on_success
93100
needs:
94101
- build-layer ({{ $runtime.name }}-{{ $runtime.arch }})
95102
dependencies:
@@ -105,6 +112,7 @@ integration-test ({{ $runtime.name }}-{{ $runtime.arch }}):
105112
- cd integration_tests && yarn install && cd ..
106113
script:
107114
- RUNTIME_PARAM={{ $runtime.python_version }} ARCH={{ $runtime.arch }} ./scripts/run_integration_tests.sh
115+
retry: 2
108116

109117
sign-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
110118
stage: sign

0 commit comments

Comments
 (0)