Page MenuHomePhabricator

D17162.diff
No OneTemporary

D17162.diff

diff --git a/contrib/teamcity/build-configurations.py b/contrib/teamcity/build-configurations.py
--- a/contrib/teamcity/build-configurations.py
+++ b/contrib/teamcity/build-configurations.py
@@ -174,17 +174,18 @@
# Make sure we have at least a context
context = docker_config.get("context", None)
if context is None:
- raise AssertionError(
- f"The docker configuration for build {self.name} is missing a"
- " context, aborting"
- )
- # Make the context path absolute
- context = self.project_root.joinpath(context)
+ context = self.project_root
+ else:
+ # Make the context path absolute
+ context = self.project_root.joinpath(context)
# Make sure the context is a subdir of the git repository. This
# prevents e.g. the use of .. as a context path.
- if Path(self.project_root) not in Path(context).resolve().parents:
+ if (
+ Path(self.project_root) not in Path(context).resolve().parents
+ and Path(self.project_root) != Path(context).resolve()
+ ):
raise AssertionError(
- "The docker context should be a subdirectory of the project root"
+ "The docker context should be the project root or a subdirectory"
)
dockerfile = docker_config.get("dockerfile", None)
diff --git a/contrib/teamcity/build-configurations.yml b/contrib/teamcity/build-configurations.yml
--- a/contrib/teamcity/build-configurations.yml
+++ b/contrib/teamcity/build-configurations.yml
@@ -1024,7 +1024,7 @@
preview-chronik.e.cash:
docker:
- context: modules/
+ dockerfile: chronik.e.cash.Dockerfile
build_args:
- "NGINX_CONF=nginx-preview.conf"
@@ -1035,6 +1035,6 @@
preview-cashtab:
docker:
- context: cashtab
+ dockerfile: cashtab.Dockerfile
build_args:
- "NGINX_CONF=nginx-preview.conf"

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 08:09 (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4577028
Default Alt Text
D17162.diff (2 KB)

Event Timeline