https://metaplay.io logo
How to use CI to upload configs to selected env
# questions-and-feedback
d
So I just have had an conversation with the metaplay documentation AI agent about that, you can see it here https://chatgpt.com/share/6992d780-7944-8007-91c3-1aead0dac03e I am not great with AI yet as you can see but what struck me is that at the end it told me to use metaplay cli; now we are already using metaplay cli to build and deploy our server images, however the gameconfig subcommand does not seem to exist so question is; is it just an AI halucynating what I would like to hear? is it in progress and lastly - maybe it should be added to CLI it would definielty make our life very much easier 🙂 we are already able to build the ocnfig archive files on our CI it is just uploading them to the environment that I need solved
j
The AI is indeed hallucinating but the basic idea is correct. We don't have the
metaplay gameconfig
helpers yet, but uploading game configs can be done with cli as follows:
metaplay debug admin-request ENV-NAME-HERE POST "/api/gameconfig?setAsActive=false&name=uploaded+from+cli" --file "Backend/Server/GameConfig/StaticGameConfig.mpa"
To upload and publish the config, you can use
setAsActive=true
. We also currently expose these on Unity via
BackendAdminApi
helper with nicer typing, but it is intended for interactive use and may not work in batch mode. I've added a todo to investigate adding these
metaplay gameconfig
commands 🙂 I've also added a todo to investigate why the AI helper connector didn't recommend the CLI's existing commands, maybe it failed to use the command reference correctly here.
d
thank you for the response this is nicer then using CURL that the AI did suggest before in the same conversation