Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10907664
D17162.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D17162.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 08:09 (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4577028
Default Alt Text
D17162.diff (2 KB)
Attached To
D17162: [CI] Fix previews
Event Timeline
Log In to Comment