-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Conversation
- 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.
WalkthroughThe 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
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 |
There was a problem hiding this 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 stepsThe 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 neededConsider 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 sectionThe 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 formattingRemove 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
📒 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 orderingThe reordered steps provide a more logical flow, placing the GitLab CI integration before license configuration.
24-31
: Clear explanation of version supportThe updated section effectively communicates the version compatibility and best practices.
docs/05-gitlab/02-activation.mdx (1)
1-1
: LGTM! Added visual guidanceThe image import enhances the documentation by providing visual context for the activation process.
Co-authored-by: Webber Takken <[email protected]>
There was a problem hiding this 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
📒 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.
Co-authored-by: Gabriel Le Breton <[email protected]>
There was a problem hiding this 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:
- Use specific image tags instead of relying on latest
- 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
📒 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.
There was a problem hiding this 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 recommendationWhile 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
- The warning about outdated content should specify which versions it refers to
- 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 recommendationConsider 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 linkConsider 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 notesConsider adding information about:
- Docker resource requirements
- 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
📒 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 orderingThe reordering of steps provides a more natural progression from setup to execution.
91-94
: Add verification step for copied filesAdd 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 doneLength of output: 239
There was a problem hiding this 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 readabilityAdd 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 accessibilityInstead 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 instructionsThe 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 filesdocs/05-gitlab/06-deployment/ios.mdx (4)
24-24
: Improve formatting consistency in numbered listsThe 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 consistentlyTechnical 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 MacThe 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 instructionsThe 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
📒 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
I consider this ready to merge 🦾 |
There was a problem hiding this 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 commandsTo 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 activationConsider 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
📒 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.
docker run -it --rm \ | ||
-e "[email protected]" \ | ||
-e "UNITY_PASSWORD=example_password" \ | ||
-e "UNITY_SERIAL=EXA-MPLE-SERI-ALKE-Y123" \ | ||
-v "$(pwd):/root/project" \ |
There was a problem hiding this comment.
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.
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" \ |
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 tounity3d-gitlab-ci-example
releases to track changes and maintain stable versions.Summary by CodeRabbit