Replace ngrok
This change switches the integration tests to an alternate tunneling service. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
237afdb25d
commit
e1e46211a1
1 changed files with 35 additions and 9 deletions
44
.github/workflows/integration-tests.yml
vendored
44
.github/workflows/integration-tests.yml
vendored
|
|
@ -24,13 +24,41 @@ jobs:
|
|||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
sudo apt-get -qq update && sudo apt-get -qq install -y apg coreutils make
|
||||
|
||||
- name: Set up ngrok
|
||||
id: ngrok
|
||||
uses: gabriel-samfira/ngrok-tunnel-action@v1.1
|
||||
with:
|
||||
ngrok_authtoken: ${{ secrets.NGROK_AUTH_TOKEN }}
|
||||
port: 9997
|
||||
tunnel_type: http
|
||||
- name: Set up localshow tunnel
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p /home/runner/.ssh
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /home/runner/.ssh/ssh_key
|
||||
sudo chown -R runner:runner /home/runner/.ssh
|
||||
sudo chmod 500 /home/runner/.ssh
|
||||
sudo chmod 400 /home/runner/.ssh/ssh_key
|
||||
|
||||
SUBDOMAIN=$(apg -a 0 -M l -m 12 -n 1)
|
||||
echo "::add-mask::$SUBDOMAIN"
|
||||
|
||||
BASE_URL="${{ secrets.TUNNEL_BASE_URL }}"
|
||||
GARM_BASE_URL="https://$SUBDOMAIN.$BASE_URL"
|
||||
echo "::add-mask::$GARM_BASE_URL"
|
||||
|
||||
echo "GARM_BASE_URL=$GARM_BASE_URL" >> $GITHUB_ENV
|
||||
|
||||
cat <<EOF | sudo tee /etc/systemd/system/localshow-tunnel.service
|
||||
[Unit]
|
||||
Description=Localshow tunnel
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/ssh -q -i /home/runner/.ssh/ssh_key -N -n -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -R $SUBDOMAIN:80:127.0.0.1:9997 $BASE_URL
|
||||
Restart=always
|
||||
User=runner
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable localshow-tunnel
|
||||
sudo systemctl start localshow-tunnel
|
||||
|
||||
- name: Generate secrets
|
||||
run: |
|
||||
|
|
@ -57,7 +85,6 @@ jobs:
|
|||
set -o errexit
|
||||
make integration 2>&1
|
||||
env:
|
||||
GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }}
|
||||
ORG_NAME: gsamfira
|
||||
REPO_NAME: garm-testing
|
||||
CREDENTIALS_NAME: test-garm-creds
|
||||
|
|
@ -87,7 +114,6 @@ jobs:
|
|||
sudo systemctl stop garm@runner || true
|
||||
go run ./test/integration/gh_cleanup/main.go || true
|
||||
env:
|
||||
GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }}
|
||||
ORG_NAME: gsamfira
|
||||
REPO_NAME: garm-testing
|
||||
GH_TOKEN: ${{ secrets.GH_OAUTH_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue