Skip to content

Commit 08cdd87

Browse files
authored
Merge pull request #48 from epics-containers/dev
fix bug with copying into config
2 parents 3dc7a5f + 01f6a34 commit 08cdd87

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/epics_containers_cli/ioc/local_commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _do_deploy(self, ioc_instance: Path, version: str, args: str):
6363

6464
image = get_instance_image_name(ioc_instance)
6565
log.debug(f"deploying {ioc_instance} with image {image}")
66-
config = ioc_instance / CONFIG_FOLDER / "*"
66+
config = ioc_instance / CONFIG_FOLDER
6767
ioc_name = ioc_instance.name
6868
volume = f"{ioc_name}_config"
6969

@@ -83,7 +83,8 @@ def _do_deploy(self, ioc_instance: Path, version: str, args: str):
8383
f"-v {volume}:/copyto busybox",
8484
interactive=False,
8585
)
86-
run_command(f"{self.docker.docker} cp {config} {dest}", interactive=False)
86+
for file in config.glob("*"):
87+
run_command(f"{self.docker.docker} cp {file} {dest}", interactive=False)
8788
run_command(f"{self.docker.docker} rm -f busybox", interactive=False)
8889

8990
# launch the ioc container with mounted config volume

tests/data/local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ deploy_local:
3030
rsp: ""
3131
- cmd: docker container create --name busybox -v bl45p-ea-ioc-01_config:/copyto busybox
3232
rsp: ""
33-
- cmd: docker cp {data}/iocs/bl45p-ea-ioc-01/config/* busybox:copyto
33+
- cmd: docker cp {data}/iocs/bl45p-ea-ioc-01/config/ioc.yaml busybox:copyto
3434
rsp: ""
3535
- cmd: docker rm -f busybox
3636
rsp: ""
@@ -54,7 +54,7 @@ deploy:
5454
rsp: ""
5555
- cmd: docker container create --name busybox -v bl45p-ea-ioc-01_config:/copyto busybox
5656
rsp: ""
57-
- cmd: docker cp /tmp/ec_tests/iocs/bl45p-ea-ioc-01/config/* busybox:copyto
57+
- cmd: docker cp /tmp/ec_tests/iocs/bl45p-ea-ioc-01/config/ioc.yaml busybox:copyto
5858
rsp: ""
5959
- cmd: docker rm -f busybox
6060
rsp: ""

0 commit comments

Comments
 (0)