Skip to content

Commit

Permalink
cleanup ci process
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa committed Feb 22, 2024
1 parent 17e28ab commit 20999e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ jobs:
- name: Generate ssh key for CI gateway-sshd
run: make ci-ssh-key

- name: Launch Gateway
run: cd ci/ && docker-compose up -d

- name: Create link on gateway
- name: Launch gateway and create link on gateway
run: make link-ci GATEWAY=gateway-sshd FQDN=app.example.com EXPOSE=app:3000

#- name: Ensure link works by making request to app.example.com
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ 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-key:
ssh-keygen -t ed25519 -f ./ci/gateway-sim-key -N ""

link-ci:
./ci/create-link-ci.sh $(GATEWAY) $(FQDN) $(EXPOSE)
9 changes: 7 additions & 2 deletions ci/create-link-ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash
set -e

cd ci/
ssh-keygen -t ed25519 -f ./gateway-sim-key -N ""
docker compose up -d --build
eval $(ssh-agent -s)
ssh-add ./ci/gateway-sim-key
docker run --network gateway -e SSH_AGENT_PID=$SSH_AGENT_PID -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK -v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK --rm fractalnetworks/gateway-cli:latest $1 $2 $3
ssh-add ./gateway-sim-key
docker run --network gateway -e SSH_AGENT_PID=$SSH_AGENT_PID -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK -v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK --rm fractalnetworks/gateway-cli:latest $1 $2 $3
docker compose down

0 comments on commit 20999e5

Please sign in to comment.