game-ci / versioning-backend

Stateful backend to keep track of unity versions and docker build queues
MIT License
11 stars 4 forks source link

V2 Migration #47

Closed AndrewKahr closed 5 months ago

AndrewKahr commented 1 year ago

Changes

This should merge before working on fixing #48. Prior to merging, all existing functions will need to be deleted as updating to v2 cannot be done in place.

Checklist

AndrewKahr commented 1 year ago

@webbertakken Is there a way to test deployments in a workflow without actually deploying? The build workflow was a green light but the previous deployment failed.

webbertakken commented 1 year ago

@webbertakken Is there a way to test deployments in a workflow without actually deploying? The build workflow was a green light but the previous deployment failed.

Nowadays there is an action that does preview deployments for firebase. It wasn't there when I created this. I have in fact just set that up in another repo of mine and it works well (you would still need to do something based on the env so that the ingeminator code doesn't do stuff in prod though)

AndrewKahr commented 1 year ago

I assume you mean don't let the ingeminator do stuff in the preview deployments and only allow it in prod? Curious if you have any ideas off the top of your head on how to accomplish this.

Would you also be able to set up the service credentials as even if we don't use this action in the end, the one we currently use also complains about the login token being deprecated.

webbertakken commented 1 year ago

It does all of that stuff for you when you run firebase init. You have admin access to the project so you should be able able to provision the service account etc (it goes automatically).

And you can use https://github.com/webbertakken/brioso as reference if you like.

AndrewKahr commented 1 year ago

Wouldn't I need access to secrets on the versioning-backend repo to add the credential after running init? Or am I supposed to run init in a workflow on GitHub?

webbertakken commented 1 year ago

You have editor access in the project

edit: removed public email in screenshot

I'm not sure what you mean by needing access. Could you be very specific?

AndrewKahr commented 1 year ago

I assume I need to access the secrets tab in the repo settings to be able to add the service account credentials but I can't see the settings tab as an editor, I believe I would need maintainer level access.

webbertakken commented 1 year ago

No, you have to run firebase init and choose yes when it asks you to create a deployment workflow for you.

webbertakken commented 1 year ago

I have also given you maintainer access on the repo.

AndrewKahr commented 1 year ago

I'm getting this error:

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) game-ci/versioning-backend

Error: HTTP Error: 403, Policy update access denied.

It sounds like I need even more permissions? https://stackoverflow.com/questions/63995958/firebase-init-functions-returns-403-caller-does-not-have-permission

It may also only be possible for an owner to init based on this: https://stackoverflow.com/questions/74860122/firebase-init-hosinggithub-for-organization

webbertakken commented 1 year ago

Ok I've made you owner

AndrewKahr commented 1 year ago

The cleanup step claims there is an error deleting the artifact but manually going to the artifact page shows that it did indeed clean up the build artifact so I'm not sure what it's warning about. This should be ready to go now though