Skip to content

Commit

Permalink
merged main
Browse files Browse the repository at this point in the history
Signed-off-by: 2byrds <[email protected]>
  • Loading branch information
2byrds committed Oct 10, 2024
2 parents 49a89a5 + 56534bf commit 0957996
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
25 changes: 22 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
.PHONY: build-keria
build-keria:
@docker buildx build --platform=linux/amd64 --no-cache -f images/keria.dockerfile --tag weboftrust/keria:0.2.0-rc1 .

VERSION=0.2.0-rc1

define DOCKER_WARNING
In order to use the multi-platform build enable the containerd image store
The containerd image store is not enabled by default.
To enable the feature for Docker Desktop:
Navigate to Settings in Docker Desktop.
In the General tab, check Use containerd for pulling and storing images.
Select Apply and Restart."
endef

build-keria: .warn
@docker build --platform=linux/amd64,linux/arm64 --no-cache -f images/keria.dockerfile -t weboftrust/keria:$(VERSION) .

publish-keria:
@docker push weboftrust/keria --all-tags
@docker push weboftrust/keria:$(VERSION)

.warn:
@echo -e ${RED}"$$DOCKER_WARNING"${NO_COLOUR}

RED="\033[0;31m"
NO_COLOUR="\033[0m"
export DOCKER_WARNING
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,18 @@ You can see a [working example here](https://github.com/WebOfTrust/signify-ts/bl
```bash
pytest tests/
```

## Publishing containers

Enable the containerd image store

The containerd image store isn't enabled by default. To enable the feature for Docker Desktop:
Navigate to Settings in Docker Desktop.
In the General tab, check Use containerd for pulling and storing images.
Select Apply & Restart.
```shell
make build-keri
make publish-keri
```
4 changes: 2 additions & 2 deletions src/keria/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ def on_post(self, req, rep):
caid = icp.pre

if self.agency.get(caid=caid) is not None:
raise falcon.HTTPBadRequest(title="agent already exists",
description=f"agent for controller {caid} already exists")
raise falcon.HTTPConflict(title="agent already exists",
description=f"agent for controller {caid} already exists")

agent = self.agency.create(caid=caid)

Expand Down
2 changes: 1 addition & 1 deletion tests/app/test_agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_boot_ends(helpers):
assert rep.status_code == 202

rep = client.simulate_post("/boot", body=json.dumps(body).encode("utf-8"))
assert rep.status_code == 400
assert rep.status_code == 409
assert rep.json == {
'title': 'agent already exists',
'description': 'agent for controller EK35JRNdfVkO4JwhXaSTdV4qzB_ibk_tGJmSVcY4pZqx already exists'
Expand Down

0 comments on commit 0957996

Please sign in to comment.