aboutsummaryrefslogtreecommitdiff
blob: 70b578979ca368cdd34a33b6d876adf52e923151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -e
source "$(dirname "$0")"/docker-helper.inc
# Run the actual build process, with no networking permitted.
# Incremental builds do not update indexes correctly, so we cannot use them.
# https://github.com/jekyll/jekyll/issues/3411
# https://github.com/jekyll/jekyll/issues/3747
# By including a container name, we automatically ensure that only one instance is running!
# We may need to explore extra timeouts in future

# Need to be able to build one per www & wwwtest concurrently.
name=gentoo.sites.www.build
[[ "$0" != "${0/build-wwwtest}" ]] && name=gentoo.sites.wwwtest.build
DOCKER_RUN_OPTIONS=( --name "$name" )

# TODO: sometimes this got stuck and the previous container was stopped but not
# removed despite the --rm. We need to detect that and clean it up in future.
docker_run_net_none jekyll build