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 GameCI Gitlab Docs #492

Merged
merged 14 commits into from
Jan 10, 2025
Merged

Improve GameCI Gitlab Docs #492

merged 14 commits into from
Jan 10, 2025

Conversation

GabLeRoux
Copy link
Member

@GabLeRoux GabLeRoux commented Jan 9, 2025

This pull request includes several updates to the GitLab CI documentation for Unity projects. The changes aim to improve clarity, update outdated information, and provide better guidance for setting up and activating Unity licenses in GitLab CI/CD pipelines.

Documentation Updates:

  • docs/05-gitlab/01-getting-started.mdx: Reordered steps for configuring a Unity license and adding build scripts. Updated instructions for setting up GitLab CI, including clearer steps and additional information on customizing the configuration. [1] [2]
  • docs/05-gitlab/02-activation.mdx: Added detailed instructions for activating Unity licenses, including personal, professional, and license server methods. Included troubleshooting tips and updated the activation guide to reflect recent changes.
  • docs/05-gitlab/03-example-project.mdx: Added information about subscribing to unity3d-gitlab-ci-example releases to track changes and maintain stable versions.

Summary by CodeRabbit

  • Documentation
    • Updated GitLab CI/CD documentation for Unity projects.
    • Improved clarity and organization of getting started, activation, and example project guides.
    • Added new section on project release subscriptions and enhanced information on release management.
    • Enhanced troubleshooting and activation method instructions, including clearer steps for different Unity license types and local debugging.
    • Added visual elements to improve documentation presentation.
    • Minor grammatical corrections and formatting adjustments in deployment guides for Android and iOS.
    • Adjusted step numbering and phrasing for better clarity in iOS deployment instructions.

- Added caution message about the slightly outdated video tutorial.
- Updated information on setting up GitLab CI for Unity projects.
- Included instructions for extracting and storing Unity serial for Personal licenses.
- Added steps for using a License Server with GitLab CI.
- Updated debugging activation locally with Docker.
- Added next steps after activating the Unity license in GitLab CI.
Copy link

coderabbitai bot commented Jan 9, 2025

Walkthrough

The pull request involves documentation updates for GitLab CI integration with Unity projects across three markdown files. The changes focus on improving the clarity, organization, and comprehensiveness of instructions related to Unity project setup, license activation, and CI configuration. The documentation has been restructured to provide more detailed, step-by-step guidance, with enhanced explanations of Unity license activation methods and GitLab CI integration processes.

Changes

File Change Summary
docs/05-gitlab/01-getting-started.mdx - Reordered steps in "Overall steps" section
- Rephrased final step to emphasize project build and test
- Updated "Supported versions" section with clearer Docker image references
docs/05-gitlab/02-activation.mdx - Added new image import
- Reorganized activation methods section
- Expanded instructions for Personal, Professional, and License Server activations
- Added new debugging section for local activation
docs/05-gitlab/03-example-project.mdx - Added informational block about project releases
- Included details on release tracking and subscription options
docs/05-gitlab/06-deployment/android.mdx - Minor grammatical corrections and formatting adjustments
docs/05-gitlab/06-deployment/ios.mdx - Renumbered steps in "Unity Settings" section
- Minor text corrections and formatting adjustments

Possibly related issues

Possibly related PRs

Suggested reviewers

  • webbertakken

Poem

🐰 In GitLab's CI, a Unity tale unfolds,
Docs rewritten, more clear than of old,
Licenses dance, configurations bright,
A rabbit's guide to building just right!
Documentation springs to life with glee! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Jan 9, 2025

Cat Gif

Copy link

github-actions bot commented Jan 9, 2025

Visit the preview URL for this PR (updated for commit 002ba64):

https://game-ci-5559f--pr492-improve-gitlab-docs-84ywnopk.web.app

(expires Fri, 17 Jan 2025 02:20:38 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1f0574f15f83e11bfc148eae8646486a6d0e078b

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
docs/05-gitlab/03-example-project.mdx (1)

3-9: Great addition about release subscriptions!

The info block provides valuable guidance about version tracking. Consider adding a brief note about the benefits of following releases (e.g., "Stay updated with the latest improvements and bug fixes").

 :::info You can subscribe to `unity3d-gitlab-ci-example` releases

-The gitlab project uses tags to easily track what changes and keep stable versions. See
+The gitlab project uses tags to easily track changes and maintain stable versions. Stay updated with the latest improvements and bug fixes by following our releases. See
 [example project's release](https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/releases) for
 more details.

 :::
docs/05-gitlab/01-getting-started.mdx (1)

47-129: Well-structured setup instructions with verification steps

The new setup instructions are comprehensive and include:

  • Clear step-by-step commands
  • Verification checklist
  • Proper file structure visualization

However, consider adding a note about backing up existing files before copying new ones.

 # Copy required files from the example project
+# Note: Make sure to backup any existing files before copying
 cp ../unity3d-gitlab-ci-example/.gitlab-ci.yml ./
 cp -r ../unity3d-gitlab-ci-example/ci ./
 cp ../unity3d-gitlab-ci-example/Assets/Scripts/Editor/BuildCommand.cs ./Assets/Scripts/Editor/
docs/05-gitlab/02-activation.mdx (3)

11-12: Minor language improvement needed

Consider removing the redundant word "specific" as suggested by the static analysis.

-To run Unity in a CI/CD pipeline, you need to activate your license. For specific details about how
+To run Unity in a CI/CD pipeline, you need to activate your license. For details about how
 the activation process works, refer to the following scripts:
🧰 Tools
🪛 LanguageTool

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


173-202: Excellent addition of debugging section

The debugging section with Docker is a valuable addition that will help users troubleshoot activation issues locally. The command structure is clear and well-documented.

Consider adding a note about required Docker permissions.

 ## Debugging activation Locally with Docker

+:::note
+Ensure you have appropriate Docker permissions on your system to run containers.
+:::
+
 To debug or confirm activation locally (instead of pushing every time), you can run:

110-112: Fix list formatting

Remove the extra spaces before list items to maintain consistent formatting.

-  - `UNITY_SERIAL`: The serial extracted from the `.ulf` file.
-  - `UNITY_EMAIL`: The email address associated with your Unity account.
-  - `UNITY_PASSWORD`: The password for your Unity account.
+- `UNITY_SERIAL`: The serial extracted from the `.ulf` file.
+- `UNITY_EMAIL`: The email address associated with your Unity account.
+- `UNITY_PASSWORD`: The password for your Unity account.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2abe5a and cb349e8.

📒 Files selected for processing (3)
  • docs/05-gitlab/01-getting-started.mdx (2 hunks)
  • docs/05-gitlab/02-activation.mdx (1 hunks)
  • docs/05-gitlab/03-example-project.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/02-activation.mdx

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (3)
docs/05-gitlab/01-getting-started.mdx (2)

11-13: LGTM! Improved step ordering

The reordered steps provide a more logical flow, placing the GitLab CI integration before license configuration.


24-31: Clear explanation of version support

The updated section effectively communicates the version compatibility and best practices.

docs/05-gitlab/02-activation.mdx (1)

1-1: LGTM! Added visual guidance

The image import enhances the documentation by providing visual context for the activation process.

docs/05-gitlab/01-getting-started.mdx Outdated Show resolved Hide resolved
docs/05-gitlab/01-getting-started.mdx Outdated Show resolved Hide resolved
docs/05-gitlab/02-activation.mdx Outdated Show resolved Hide resolved
docs/05-gitlab/02-activation.mdx Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
docs/05-gitlab/02-activation.mdx (4)

11-12: Consider removing redundant wording.

The phrase "specific details" is redundant. Consider simplifying to:

-To run Unity in a CI/CD pipeline, you need to activate your license. For specific details about how
+To run Unity in a CI/CD pipeline, you need to activate your license. For details about how
🧰 Tools
🪛 LanguageTool

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


110-112: Improve formatting of the variable list.

Consider using a bullet list format for better readability:

-`UNITY_SERIAL`: The serial extracted from the `.ulf` file.
-`UNITY_EMAIL`: The email address associated with your Unity account.
-`UNITY_PASSWORD`: The password for your Unity account.
+- `UNITY_SERIAL`: The serial extracted from the `.ulf` file
+- `UNITY_EMAIL`: The email address associated with your Unity account
+- `UNITY_PASSWORD`: The password for your Unity account
🧰 Tools
🪛 LanguageTool

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)


136-141: Consider using a reusable component for the caution message.

This caution block is repeated multiple times. Consider creating a reusable MDX component to maintain consistency and follow DRY principles.


178-181: Consider using ARG for version variables in Docker example.

To better align with Docker best practices, consider showing how these could be passed as build arguments:

-UNITY_VERSION=2022.3.12f1
-IMAGE=unityci/editor
-IMAGE_VERSION=3
-DOCKER_IMAGE="$IMAGE:$UNITY_VERSION-base-$IMAGE_VERSION"
+export UNITY_VERSION=${UNITY_VERSION:-2022.3.12f1}
+export IMAGE=${IMAGE:-unityci/editor}
+export IMAGE_VERSION=${IMAGE_VERSION:-3}
+export DOCKER_IMAGE="$IMAGE:$UNITY_VERSION-base-$IMAGE_VERSION"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb349e8 and d28910c.

📒 Files selected for processing (2)
  • docs/05-gitlab/01-getting-started.mdx (2 hunks)
  • docs/05-gitlab/02-activation.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/05-gitlab/01-getting-started.mdx
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/02-activation.mdx

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (4)
docs/05-gitlab/02-activation.mdx (4)

1-1: LGTM! Good addition of visual documentation.

The image import enhances the documentation by providing visual guidance for users.


22-30: LGTM! Clear and well-structured overview.

The section provides clear guidance for different license types with proper navigation links.


114-119: Consider shortening the caution header.

The caution header seems too long for a header. Consider making it more concise.


147-169: LGTM! Clear license server setup instructions.

The section provides clear guidance with a good example of the YAML configuration.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/05-gitlab/02-activation.mdx (3)

11-12: Consider removing redundant wording.

The phrase "specific details" is redundant. Consider simplifying to just "details".

-To run Unity in a CI/CD pipeline, you need to activate your license. For specific details about how
+To run Unity in a CI/CD pipeline, you need to activate your license. For details about how
🧰 Tools
🪛 LanguageTool

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


110-112: Improve formatting of CI/CD variables list.

Consider using proper list formatting for better readability:

-  - `UNITY_SERIAL`: The serial extracted from the `.ulf` file.
-  - `UNITY_EMAIL`: The email address associated with your Unity account.
-  - `UNITY_PASSWORD`: The password for your Unity account.
+* `UNITY_SERIAL`: The serial extracted from the `.ulf` file
+* `UNITY_EMAIL`: The email address associated with your Unity account
+* `UNITY_PASSWORD`: The password for your Unity account
🧰 Tools
🪛 LanguageTool

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)


183-190: Consider adding security best practices for Docker commands.

While the Docker command is correct, consider adding security recommendations:

  1. Use specific image tags instead of relying on latest
  2. Add resource limits to prevent container abuse
 docker run -it --rm \
+  --memory=4g \
+  --cpus=2 \
   -e "[email protected]" \
   -e "UNITY_PASSWORD=example_password" \
   -e "UNITY_SERIAL=EXA-MPLE-SERI-ALKE-Y123" \
   -v "$(pwd):/root/project" \
   $DOCKER_IMAGE \
   bash
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d28910c and f85d1df.

📒 Files selected for processing (1)
  • docs/05-gitlab/02-activation.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/02-activation.mdx

[style] ~11-~11: This phrase is redundant. Consider writing “details”.
Context: ... you need to activate your license. For specific details about how the activation process works,...

(SPECIFIC_DETAILS)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...ed from the .ulf file. - UNITY_EMAIL: The email address associated with your ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~112-~112: Loose punctuation mark.
Context: ...h your Unity account. - UNITY_PASSWORD: The password for your Unity account. :...

(UNLIKELY_OPENING_PUNCTUATION)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build_and_preview
🔇 Additional comments (6)
docs/05-gitlab/02-activation.mdx (6)

1-1: LGTM! Good addition of visual documentation.

The image import enhances the documentation by providing visual guidance for users.


24-30: LGTM! Clear and well-structured guidance.

The section effectively guides users to the appropriate activation method based on their license type.


40-46: LGTM! Clear and comprehensive instructions.

The step-by-step guide with OS-specific paths and detailed instructions is very helpful.


130-130: Maintain consistency with suggested format.

Based on previous feedback, consider using the suggested format:

-1. **Get your serial** (format: `XX-XXXX-XXXX-XXXX-XXXX-XXXX`).
+1. **Get your serial** (format: `XX-XXXX-XXXX-XXXX-XXXX-XXXX`)

149-157: LGTM! Clear server configuration example.

The YAML example and explanation about credential requirements are helpful.


206-211: LGTM! Comprehensive next steps.

The section provides a clear path forward with practical examples of what can be done after activation.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (5)
docs/05-gitlab/01-getting-started.mdx (3)

24-31: Add version compatibility check recommendation

While the automatic version detection is helpful, it would be valuable to add a note recommending users to verify their Unity version's compatibility with the Docker images before proceeding.

Add this note after line 31:

+
+:::tip
+Before proceeding, verify that your Unity version is supported by checking the [Docker > Versions page](/docs/docker/versions).
+:::

37-45: Enhance the caution block clarity

  1. The warning about outdated content should specify which versions it refers to
  2. The "Activation process" point needs a determiner

Apply these changes:

 :::caution
-The video is slightly outdated, but the general concepts are still the same. 👍
+The video (recorded with Unity 2019.x) is slightly outdated, but the general concepts are still the same. 👍

-Activation process has changed a bit since then.
+The activation process has changed a bit since then.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~41-~41: A determiner appears to be missing. Consider inserting it.
Context: ...eral concepts are still the same. 👍 - Activation process has changed a bit since then. -...

(AI_EN_LECTOR_MISSING_DETERMINER)


57-65: Add version recommendation

Consider adding a recommendation about using the latest stable version for better compatibility.

Add this note after line 65:

+:::tip
+We recommend using the latest stable version (v4.0.0 or newer) for the best compatibility and features.
+:::
docs/05-gitlab/02-activation.mdx (2)

11-15: Add version-specific activation notes and official documentation link

Consider adding references to Unity's official documentation and version-specific requirements.

Add after line 15:

+:::info
+- Different Unity versions may have slightly different activation requirements. Always refer to [Unity's official licensing documentation](https://docs.unity3d.com/Manual/LicensesAndActivation.html).
+- The scripts handle version-specific requirements automatically, but it's good to understand the underlying process.
+:::

173-202: Add resource requirements and cleanup notes

Consider adding information about:

  1. Docker resource requirements
  2. Container cleanup instructions

Add before the command:

+:::info Requirements
+- Ensure Docker has at least 4GB of memory allocated
+- At least 10GB of free disk space
+:::
+
+:::tip Cleanup
+The `--rm` flag automatically removes the container when it exits. If you need to force cleanup:
+```bash
+docker ps -a | grep unityci/editor | awk '{print $1}' | xargs -r docker rm -f
+```
+:::
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f85d1df and 5678175.

📒 Files selected for processing (2)
  • docs/05-gitlab/01-getting-started.mdx (2 hunks)
  • docs/05-gitlab/02-activation.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/02-activation.mdx

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)

docs/05-gitlab/01-getting-started.mdx

[uncategorized] ~41-~41: A determiner appears to be missing. Consider inserting it.
Context: ...eral concepts are still the same. 👍 - Activation process has changed a bit since then. -...

(AI_EN_LECTOR_MISSING_DETERMINER)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build_and_preview
🔇 Additional comments (2)
docs/05-gitlab/01-getting-started.mdx (2)

11-13: LGTM! Logical step ordering

The reordering of steps provides a more natural progression from setup to execution.


91-94: Add verification step for copied files

Add a step to verify that the files were copied correctly.

✅ Verification successful

Add file verification steps after copying

After copying the files, verify their presence using:

# Verify that all required files are copied successfully
ls -l .gitlab-ci.yml
ls -l ci/before_script.sh ci/after_script.sh
ls -l Assets/Scripts/Editor/BuildCommand.cs
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify that all required files are present
for file in ".gitlab-ci.yml" "ci/before_script.sh" "ci/after_script.sh" "Assets/Scripts/Editor/BuildCommand.cs"; do
  if [ ! -f "$file" ]; then
    echo "Missing required file: $file"
    exit 1
  fi
done

Length of output: 239

docs/05-gitlab/02-activation.mdx Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (7)
docs/05-gitlab/06-deployment/android.mdx (3)

9-10: Add comma for better readability

Add a comma before "and" as it connects two independent clauses.

-By default, the apk is not signed and the build will use the Unity's default debug key.
+By default, the apk is not signed, and the build will use Unity's default debug key.

Also removed "the" before "Unity's" as it's not needed.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~9-~9: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: .../63)_ By default, the apk is not signed and the build will use the Unity's default ...

(COMMA_COMPOUND_SENTENCE_2)


46-47: Add hyperlink text for better accessibility

Instead of just showing the URL text, provide descriptive link text.

-[Documentation](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)
+[GitLab CI/CD Variables Documentation](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)

75-75: Improve clarity of Fastlane setup instructions

The transition between command-line setup and Fastlane configuration could be clearer.

-That is the simplest way with command line, but you can also make `fastlane/Fastfile` and `fastlane/Appfile`,
+The above approach uses command-line configuration. Alternatively, you can create `fastlane/Fastfile` and `fastlane/Appfile` configuration files
docs/05-gitlab/06-deployment/ios.mdx (4)

24-24: Improve formatting consistency in numbered lists

The nested list formatting could be improved for better readability.

2. In `PlayerSettings -> Other Settings`
-   1. Fill the field `Signing Team ID`
-   2. Ensure `Automatically Sign` is unchecked
-   3. iOS Provisioning Profile
-      1. `ProfileID`: `match AppStore your_bundle_identifier` _Replace `your_bundle_identifier` by yours_
-      2. `ProfileType`: `Distribution`
+   a. Fill the field `Signing Team ID`
+   b. Ensure `Automatically Sign` is unchecked
+   c. iOS Provisioning Profile
+      - `ProfileID`: `match AppStore your_bundle_identifier` _Replace `your_bundle_identifier` with yours_
+      - `ProfileType`: `Distribution`

Also applies to: 26-27, 30-30


34-36: Capitalize Mac and Xcode consistently

Technical product names should be properly capitalized.

-Make a first iOS build using your mac from Unity, that will create an xcode project. Ensure you target
+Make a first iOS build using your Mac from Unity, which will create an Xcode project. Ensure you target
 the same path as the CI. Ex: if you let `BUILD_NAME: ExampleProjectName` in `.gitlab-ci.yml`,
-your xcode project must be at the root of the following path: `.\Builds\iOS\ExampleProjectName\`
+your Xcode project must be at the root of the following path: `.\Builds\iOS\ExampleProjectName\`
🧰 Tools
🪛 LanguageTool

[grammar] ~34-~34: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...ject Make a first iOS build using your mac from Unity, that will create an xcode p...

(APPLE_PRODUCTS)


107-107: Fix verb usage and capitalize Mac

The word "setup" as a verb should be "set up", and "Mac" should be capitalized.

-To automate your build with gitlab, you need to setup your mac as a gitlab runner.
+To automate your build with GitLab, you need to set up your Mac as a GitLab runner.
🧰 Tools
🪛 LanguageTool

[grammar] ~107-~107: The word “setup” is a noun. The verb is spelled with a space.
Context: ...ate your build with gitlab, you need to setup your mac as a gitlab runner. Installati...

(NOUN_VERB_CONFUSION)


[grammar] ~107-~107: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...ild with gitlab, you need to setup your mac as a gitlab runner. Installation: ```b...

(APPLE_PRODUCTS)


125-126: Improve clarity of runner registration instructions

The instruction about not using sudo could be clearer.

-as a gitlab-runner for your specific project. Follow **macOS** instructions **without** sudo command
-for registration.
+as a GitLab runner for your specific project. When following the **macOS** instructions, run the registration
+commands without using sudo.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5678175 and aac4678.

📒 Files selected for processing (2)
  • docs/05-gitlab/06-deployment/android.mdx (3 hunks)
  • docs/05-gitlab/06-deployment/ios.mdx (4 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/06-deployment/android.mdx

[uncategorized] ~9-~9: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: .../63)_ By default, the apk is not signed and the build will use the Unity's default ...

(COMMA_COMPOUND_SENTENCE_2)

docs/05-gitlab/06-deployment/ios.mdx

[grammar] ~34-~34: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...ject Make a first iOS build using your mac from Unity, that will create an xcode p...

(APPLE_PRODUCTS)


[grammar] ~107-~107: The word “setup” is a noun. The verb is spelled with a space.
Context: ...ate your build with gitlab, you need to setup your mac as a gitlab runner. Installati...

(NOUN_VERB_CONFUSION)


[grammar] ~107-~107: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...ild with gitlab, you need to setup your mac as a gitlab runner. Installation: ```b...

(APPLE_PRODUCTS)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build_and_preview

@GabLeRoux
Copy link
Member Author

I consider this ready to merge 🦾

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/05-gitlab/02-activation.mdx (2)

99-111: Consider using environment variables in commands

To prevent accidental exposure of sensitive data in shell history, consider modifying the commands to read from environment variables:

- cat Unity_lic.ulf | grep DeveloperData | sed -E 's/.*Value="([^"]+)".*/\1/' | base64 --decode
+ cat "${ULF_PATH:-Unity_lic.ulf}" | grep DeveloperData | sed -E 's/.*Value="([^"]+)".*/\1/' | base64 --decode

- Get-Content Unity_lic.ulf | Select-String -Pattern 'DeveloperData' | ForEach-Object { $_ -replace '.*Value="([^"]+)".*', '$1' } | [System.Convert]::FromBase64String($_)
+ Get-Content ${Env:ULF_PATH:-Unity_lic.ulf} | Select-String -Pattern 'DeveloperData' | ForEach-Object { $_ -replace '.*Value="([^"]+)".*', '$1' } | [System.Convert]::FromBase64String($_)

228-230: Add verification steps for successful activation

Consider adding steps to verify the generated .ulf file:

If it finishes without errors, a `.ulf` should be located in
`/root/.local/share/unity3d/Unity/Unity_lic.ulf`. You can use or reference that file in your GitLab
environment.
+ 
+ To verify the activation was successful:
+ 1. Check that the `.ulf` file exists and is not empty
+ 2. Verify the file contains a valid license by running:
+    ```bash
+    cat /root/.local/share/unity3d/Unity/Unity_lic.ulf | grep -q "LicenseVersion"
+    ```
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aac4678 and 002ba64.

📒 Files selected for processing (2)
  • docs/05-gitlab/01-getting-started.mdx (2 hunks)
  • docs/05-gitlab/02-activation.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/05-gitlab/01-getting-started.mdx
🧰 Additional context used
🪛 LanguageTool
docs/05-gitlab/02-activation.mdx

[uncategorized] ~124-~124: Loose punctuation mark.
Context: ...ect’s CI/CD Variables: - UNITY_SERIAL: The serial extracted from the .ulf fi...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (3)
docs/05-gitlab/02-activation.mdx (3)

1-38: Well-structured introduction and navigation!

The changes improve documentation clarity by:

  • Adding visual aids
  • Simplifying troubleshooting references
  • Providing clear guidance for license type selection

146-171: LGTM! Clear and secure instructions.

The professional license section provides clear steps and includes appropriate security warnings.


175-198: Well-documented license server configuration!

Clear instructions with helpful YAML example and important notes about credential requirements.

Comment on lines +211 to +215
docker run -it --rm \
-e "[email protected]" \
-e "UNITY_PASSWORD=example_password" \
-e "UNITY_SERIAL=EXA-MPLE-SERI-ALKE-Y123" \
-v "$(pwd):/root/project" \
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use environment variables in Docker example

To prevent accidental credential exposure, consider reading values from environment variables:

docker run -it --rm \
-  -e "[email protected]" \
-  -e "UNITY_PASSWORD=example_password" \
-  -e "UNITY_SERIAL=EXA-MPLE-SERI-ALKE-Y123" \
+  -e "UNITY_EMAIL=${UNITY_EMAIL}" \
+  -e "UNITY_PASSWORD=${UNITY_PASSWORD}" \
+  -e "UNITY_SERIAL=${UNITY_SERIAL}" \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
docker run -it --rm \
-e "UNITY_EMAIL=[email protected]" \
-e "UNITY_PASSWORD=example_password" \
-e "UNITY_SERIAL=EXA-MPLE-SERI-ALKE-Y123" \
-v "$(pwd):/root/project" \
docker run -it --rm \
-e "UNITY_EMAIL=${UNITY_EMAIL}" \
-e "UNITY_PASSWORD=${UNITY_PASSWORD}" \
-e "UNITY_SERIAL=${UNITY_SERIAL}" \
-v "$(pwd):/root/project" \

@webbertakken webbertakken merged commit 92691c9 into main Jan 10, 2025
8 checks passed
@webbertakken webbertakken deleted the improve-gitlab-docs branch January 10, 2025 12:23
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.

2 participants