Skip to content

Commit 2be949b

Browse files
committed
fix tests on debian buster; misc release improvements
1 parent 5b07c06 commit 2be949b

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

bin/docker_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ while [ $# -ne 0 ]; do
5151
done
5252

5353
if [ -z "$base_image" ]; then
54+
# shellcheck disable=SC1091
5455
. "$repo/nginx-version-info"
5556
# shellcheck disable=SC2153
5657
base_image="$BASE_IMAGE"

bin/release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def send_ci_request_paged(path, payload=None, method=None):
228228

229229
# TODO: Poll until the number of "build-and-test-all" jobs changes from
230230
# zero.
231-
delay_seconds = 10
231+
delay_seconds = 20
232232
print(f'sleeping for {delay_seconds} seconds...')
233233
time.sleep(delay_seconds)
234234

@@ -328,7 +328,7 @@ def handle_job(job, work_dir):
328328
while True:
329329
jobs = send_ci_request_paged(f'/workflow/{workflow_id}/job')
330330
for job in jobs:
331-
if job['status'] == 'blocked':
331+
if job['status'] in ('blocked', 'not_running'):
332332
continue
333333
job_number = job['job_number']
334334
if job_number not in done_jobs:

bin/run_in_build_image.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
repo=$(dirname "$0")/..
4+
# shellcheck disable=SC1091
45
. "$repo/nginx-version-info"
56
base_image_without_colons=$(echo "$BASE_IMAGE" | tr ':' '_')
67
built_image="nginx-datadog-build-$base_image_without_colons"
@@ -11,6 +12,11 @@ if tty --silent; then
1112
interactive_flags='--interactive --tty'
1213
fi
1314

15+
# If the image doesn't exist locally, try DockerHub instead.
16+
if [ "$(docker images -q "$BUILD_IMAGE:latest" 2>/dev/null)" = '' ]; then
17+
BUILD_IMAGE=datadog/docker-library:$BUILD_IMAGE
18+
fi
19+
1420
# shellcheck disable=SC2086
1521
docker run \
1622
$interactive_flags \

test/services/nginx/install_tools.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ install_nginx_on_amazon_linux() {
1111
# nginx.
1212
# Also, if we're on Amazon Linux, nginx won't be installed yet, so install it.
1313
if command -v apt-get >/dev/null 2>&1; then
14+
# If this is Debian "stretch," then we need to change the package
15+
# repository links as of April 2023.
16+
. /etc/os-release
17+
if [ "$PRETTY_NAME" = 'Debian GNU/Linux 9 (stretch)' ]; then
18+
echo 'deb http://archive.debian.org/debian stretch main contrib non-free' >/etc/apt/sources.list
19+
fi
1420
apt-get update
1521
DEBIAN_FRONTEND=noninteractive apt-get install -y procps
1622
if ! command -v nginx >/dev/null 2>&1; then

0 commit comments

Comments
 (0)