Skip to content

Commit

Permalink
Restore wrongly deleted workflow and rename workflow for server that …
Browse files Browse the repository at this point in the history
…doesn't exist
  • Loading branch information
Nico-Sanchez committed Nov 6, 2024
1 parent d5bcbd8 commit 36affb2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 113 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "[LOADTEST-SERVER-EUROPE] Deploy to Europe Loadtest Server"
name: "[TESTING-BRAZIL] Deploy to Brazil Arena Testing AWS"
on:
workflow_dispatch:

jobs:
build-deploy:
name: Build and deploy to Europe Loadtest Server
name: Build and deploy to Brazil staging
runs-on: ubuntu-latest
environment:
name: testing-europe
url: https://loadtest-europe-server.championsofmirra.com/
name: testing-brazil
url: https://arena-brazil-testing-aws.championsofmirra.com/

steps:
- uses: actions/checkout@v4
Expand All @@ -20,42 +20,40 @@ jobs:
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci

- name: Create ssh private key file from env var
- name: Add host keys
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ vars.TS_LOADTEST_SERVER_HOST }}
SSH_HOST: ${{ vars.AWS_TS_ARENA_HOST }}
run: |
set -ex
mkdir -p ~/.ssh/
sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > ~/.ssh/id_ed25519
chmod 400 ~/.ssh/id_ed25519
retries=5; until ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts || [ $retries -eq 0 ]; do ((retries--)); sleep 5; done
- name: Copy deploy script
env:
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
SSH_HOST: ${{ vars.TS_LOADTEST_SERVER_HOST }}
SSH_HOST: ${{ vars.AWS_TS_ARENA_HOST }}
run: |
set -ex
rsync -avz --mkpath devops/deploy.sh ${SSH_USERNAME}@${SSH_HOST}:/home/${SSH_USERNAME}/deploy-script/
- name: Execute deploy script
env:
SSH_HOST: ${{ vars.TS_LOADTEST_SERVER_HOST }}
SSH_HOST: ${{ vars.AWS_TS_ARENA_HOST }}
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
MIX_ENV: ${{ vars.MIX_ENV }}
RELEASE: arena
PHX_SERVER: ${{ vars.PHX_SERVER }}
PHX_HOST: ${{ vars.LOADTEST_SERVER_HOST }}
OVERRIDE_JWT: ${{ vars.OVERRIDE_JWT }}
PHX_HOST: ${{ vars.AWS_HOST }}
PORT: ${{ vars.ARENA_PORT }}
GATEWAY_URL: ${{ vars.GATEWAY_URL }}
BOT_MANAGER_PORT: ${{ vars.BOT_MANAGER_PORT }}
BOT_MANAGER_HOST: ${{ vars.BOT_MANAGER_HOST }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
NEWRELIC_APP_NAME: ${{ vars.NEWRELIC_APP_NAME_LOADTEST_SERVER }}
NEWRELIC_APP_NAME: ${{ vars.NEWRELIC_APP_NAME_AWS }}
NEWRELIC_KEY: ${{ secrets.NEWRELIC_KEY }}
DBUS_SESSION_BUS_ADDRESS: ${{ vars.DBUS_SESSION_BUS_ADDRESS }}
DBUS_SESSION_BUS_ADDRESS: ${{ vars.DBUS_SESSION_BUS_ADDRESS_AWS }}
XDG_RUNTIME_DIR: ${{ vars.XDG_RUNTIME_DIR_AWS }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
set -ex
Expand All @@ -65,7 +63,7 @@ jobs:
RELEASE=${RELEASE} \
PHX_SERVER=${PHX_SERVER} \
PHX_HOST=${PHX_HOST} \
OVERRIDE_JWT=${OVERRIDE_JWT} \
BOT_MANAGER_HOST=${BOT_MANAGER_HOST} \
PORT=${PORT} \
GATEWAY_URL=${GATEWAY_URL} \
BOT_MANAGER_PORT=${BOT_MANAGER_PORT} \
Expand All @@ -74,4 +72,5 @@ jobs:
NEWRELIC_APP_NAME=${NEWRELIC_APP_NAME} \
NEWRELIC_KEY=${NEWRELIC_KEY} \
DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS} \
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} \
/home/${SSH_USERNAME}/deploy-script/deploy.sh
2 changes: 1 addition & 1 deletion .github/workflows/loadtest-brazil-server-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "[LOADTEST-SERVER-BRAZIL] Deploy to Brazil Loadtest Server"
name: "[Placeholder, this server doesn't exist] - [LOADTEST-SERVER-BRAZIL] Deploy to Brazil Loadtest Server"
on:
workflow_dispatch:

Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/loadtest-europe-client-deploy.yml

This file was deleted.

0 comments on commit 36affb2

Please sign in to comment.