Skip to content

Commit

Permalink
Add ci make target that builds gateway sim for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa committed Feb 22, 2024
1 parent c571f87 commit 658ee93
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build images
run: make docker

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gateway-sim-key*
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: docker link setup gateway
.PHONY: docker link setup gateway ci

docker:
docker build -t fractalnetworks/selfhosted-gateway:latest ./src/gateway/
Expand All @@ -17,3 +17,7 @@ link:

link-macos:
docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" --rm -it fractalnetworks/gateway-cli:latest $(GATEWAY) $(FQDN) $(EXPOSE}

ci:
ssh-keygen -t ed25519 -f ./ci/gateway-sim-key -N ""
docker build -t fractalnetworks/gateway-sim -f ./ci/Dockerfile ./ci
8 changes: 8 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM alpine:latest
RUN apk add openssh-server
RUN ssh-keygen -A

COPY gateway-sim-key.pub /root/.ssh/authorized_keys

ENTRYPOINT [ "/usr/sbin/sshd", "-D", "-e" ]

0 comments on commit 658ee93

Please sign in to comment.