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

Improve Development Documentation #53

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

GabLeRoux
Copy link
Member

@GabLeRoux GabLeRoux commented Oct 1, 2024

This pull request includes significant updates to the documentation, particularly enhancing the DEVELOPMENT.md guide and the README.md file. The changes aim to provide clearer instructions and a more comprehensive overview of the project's setup, deployment, and functionality.

Documentation Enhancements:

  • Development Guide:

    • Renamed the file from # Development to # Development Guide and added a detailed table of contents.
    • Expanded sections on setting up the development environment, including installing Firebase CLI, project dependencies, and running the project locally.
    • Added detailed instructions for deploying the project to Firebase, including logging in and deploying specific services.
    • Included optional setup for Firebase Admin SDK with environment variable configuration for Linux/MacOS and Windows.
    • Provided a thorough guide on setting up integrations and environment variables for Discord and GitHub.
    • Added sections on updating configuration variables in Firebase and troubleshooting tips.
  • README Overview:

    • Added an overview of the GameCI Versioning Backend, explaining its purpose and integration with GitHub and Discord.
    • Detailed the backend's functionality for ingesting Unity versions and GameCI Docker versions, including scraping Unity's version archive and scheduling CI build jobs.
    • Explained the scheduler's role in managing CI jobs and builds, including status tracking and notifications.
    • Provided instructions for backing up and restoring the Firestore database using the backfire tool.
    • Linked to the updated DEVELOPMENT.md for further development instructions.

I went forward and tried to improve the docs. I wrote this after seing a user mentionning they couldn't find the docs on how to work with this project after looking at the readme. There is now a link to DEVELOPMENT.md at the end of the ReadMe.

You can see the results here:

Copy link
Member

@davidmfinol davidmfinol left a comment

Choose a reason for hiding this comment

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

This is actually great as a refresher for me too

```
export internal.token="my_internal_token"
```bash
export INTERNAL_TOKEN="your_internal_token"
Copy link
Member Author

Choose a reason for hiding this comment

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

I found it weird to have dots in these values, but this is probably going to break things. 🤔 Is this a special syntax for firebase functions configuration?

I would appreciate if someone could confirm this one so we can go forward with merging the rest of it 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I pretty much confirmed this by reading the code.

functions/src/api/testFunction.ts
12:const internalToken = defineSecret('INTERNAL_TOKEN');

functions/src/api/reportNewBuild.ts
14:const internalToken = defineSecret('INTERNAL_TOKEN');

functions/src/api/reportPublication.ts
12:const internalToken = defineSecret('INTERNAL_TOKEN');

functions/src/api/reportBuildFailure.ts
11:const internalToken = defineSecret('INTERNAL_TOKEN');

DEVELOPMENT.md
147:export INTERNAL_TOKEN="your_internal_token"

I'm quite sure the syntax when working locally with export is to use INTERNAL_TOKEN instead of internal.token.

```
- **Start Specific Emulators Only:** To run specific components (e.g., `functions` only):
```bash
firebase emulators:start --only functions
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if this will work, but working with firebase emulators is most likely a good approach to working locally with this project. Feedback would be appreciated here.

Copy link
Member

@webbertakken webbertakken Oct 7, 2024

Choose a reason for hiding this comment

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

The thing is that in order to create a proper dev workflow you'd have to mock the dispatching github actions (for the building of images) from the cronjob, or skip the cronjob altogether (at which point the emulators don't do much at all).

@GabLeRoux
Copy link
Member Author

I added some comments which I forgot to hit submit as a self review. I would appreciate if someone can give it a try and confirm if the commands are ok. I will give it a try too shortly

DEVELOPMENT.md Outdated Show resolved Hide resolved
@GabLeRoux GabLeRoux changed the title Improve documentation Improve Development Documentation Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants