Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed RELEASE workflow input on GitHub Actions. #449

Merged
merged 10 commits into from
Apr 9, 2024
12 changes: 1 addition & 11 deletions .github/workflows/arena-brazil-testing-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Deploy to Brazil Arena testing
on:
workflow_dispatch:
inputs:
release:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
required: true

jobs:
build-deploy:
Expand Down Expand Up @@ -54,7 +44,7 @@ jobs:
SSH_HOST: ${{ vars.TS_HOST }}
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
MIX_ENV: ${{ vars.MIX_ENV }}
RELEASE: ${{ inputs.release }}
RELEASE: arena
PHX_SERVER: ${{ vars.PHX_SERVER }}
PHX_HOST: ${{ vars.HOST }}
PORT: ${{ vars.ARENA_PORT }}
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/arena-europe-testing-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Deploy to Europe Arena testing
on:
workflow_dispatch:
inputs:
release:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
required: true

jobs:
build-deploy:
Expand Down Expand Up @@ -54,7 +44,7 @@ jobs:
SSH_HOST: ${{ vars.TS_HOST }}
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
MIX_ENV: ${{ vars.MIX_ENV }}
RELEASE: ${{ inputs.release }}
RELEASE: arena
PHX_SERVER: ${{ vars.PHX_SERVER }}
PHX_HOST: ${{ vars.HOST }}
PORT: ${{ vars.ARENA_PORT }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/loadtest-brazil-client-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ on:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
- bot_manager
required: true
target_server:
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/loadtest-brazil-server-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Deploy to Brazil Loadtest Server
on:
workflow_dispatch:
inputs:
release:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
required: true

jobs:
build-deploy:
Expand Down Expand Up @@ -54,7 +44,7 @@ jobs:
SSH_HOST: ${{ vars.TS_LOADTEST_SERVER_HOST }}
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
MIX_ENV: ${{ vars.MIX_ENV }}
RELEASE: ${{ inputs.release }}
RELEASE: arena
PHX_SERVER: ${{ vars.PHX_SERVER }}
PHX_HOST: ${{ vars.LOADTEST_SERVER_HOST }}
PORT: ${{ vars.ARENA_PORT }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/loadtest-europe-client-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ on:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
- bot_manager
required: true
target_server:
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/loadtest-europe-server-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Deploy to Europe Loadtest Server
on:
workflow_dispatch:
inputs:
release:
type: choice
description: What release to deploy
options:
- game_backend
- arena
- arena_load_test
- game_client
required: true

jobs:
build-deploy:
Expand Down Expand Up @@ -54,7 +44,7 @@ jobs:
SSH_HOST: ${{ vars.TS_LOADTEST_SERVER_HOST }}
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
MIX_ENV: ${{ vars.MIX_ENV }}
RELEASE: ${{ inputs.release }}
RELEASE: arena
PHX_SERVER: ${{ vars.PHX_SERVER }}
PHX_HOST: ${{ vars.LOADTEST_SERVER_HOST }}
PORT: ${{ vars.ARENA_PORT }}
Expand Down
9 changes: 1 addition & 8 deletions devops/deploy.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By removing this, we no longer have a way of confirming if the release we are deploying is the same as the already deployed (if any).

Since we no longer have the option to choose which release we want, these lines are no longer in need.

However, the loadtest client servers still have the choice to select between loadtest and bots manager. In this case, the script would generate two different services that run concurrently.

Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ mv /tmp/mirra_backend $HOME/

mkdir -p $HOME/.config/systemd/user/

existing_service=$(ls $HOME/.config/systemd/user/*.service 2>/dev/null)

if [[ $(wc -l <<<$existing_service) > 1 || "$(basename ${existing_service})" != "${RELEASE}.service" ]]; then
echo "The release you are trying to deploy is not the same as the installed"
exit 1
fi

cat <<EOF >$HOME/.config/systemd/user/${RELEASE}.service
[Unit]
Description=$RELEASE
Expand All @@ -47,7 +40,7 @@ EnvironmentFile=$HOME/.env
LimitNOFILE=4000

[Install]
WantedBy=multi-user.target
WantedBy=default.target
EOF

systemctl --user enable $RELEASE
Expand Down
Loading