game-ci / documentation

📚 Documentation for GameCI open source projects
https://game.ci
MIT License
187 stars 119 forks source link

No docs for a standalone Docker environment #386

Open mancioshell opened 1 year ago

mancioshell commented 1 year ago

I'm trying to use unityci/editor:ubuntu-2021.3.22f1-android-1.0.1 to build my unity project using docker. I have read the docs, but there isn't any steps to reproduce a simple build in a Docker container in a local environment.

I have tried to follow the following: https://game.ci/docs/gitlab/activation

But unfortunately i'm getting the following error during the activation phase:

[Licensing::Client] Error: Code 500 while processing request (status: Unable to update licenses. Errors: No ULF license found.,No license activation found for this computer.) [Licensing::Client] Error: Code 500 while updating license in client (status: Unable to update licenses. Errors: No ULF license found.,No license activation found for this computer.) [Licensing::Client] Successfully resolved entitlements [Licensing::Module] Error: License is not active (com.unity.editor.headless). HasEntitlements will fail.

webbertakken commented 1 year ago

There isn't, because there's a large amount of logic needed to even do basic things. Think of activation, returning the license, error handling and so on. It would be hard to manually pass those in as parameters to docker. This is why using GitHub Actions is actually simpler than "a simple build in a Docker container" at this moment.

That said, we are working on a full fledged CLI that does everything an action does, which will offer support for running builds locally as well, on our roadmap for v3. You can follow the progress on discord in the #cli channel or in the game-ci/cli repository.

mancioshell commented 1 year ago

@webbertakken thank you for your reply. I understand what you mean, but in my Company we are using bamboo as CI/CD tool and i have to write a custom container job to build our unity Project. The idea was to write a script in a docker local environment and then create an automation on bamboo pipeline. I really appreciate your support and the upcoming game-cli/cli but Is there in the meantime any method to run manually step by step which i could use?

webbertakken commented 1 year ago

Yes, for other CI systems than the explicitly supported ones, we recommend following our GitLab unity example project. It has all the necessary scripts and should generally work the same across most CI systems or at the very least serve as a decent example.

mancioshell commented 1 year ago

@webbertakken i have already tried to follow the gitlab example. For example i have cloned the project and tried the activation (locally) following the docs: https://game.ci/docs/gitlab/activation

But i'm getting the following error, and i haven't seen any troubleshooting in the docs which could help in my case.

[Licensing::Client] Error: Code 500 while processing request (status: Unable to update licenses. Errors: No ULF license found.,No license activation found for this computer.) [Licensing::Client] Error: Code 500 while updating license in client (status: Unable to update licenses. Errors: No ULF license found.,No license activation found for this computer.) [Licensing::Client] Successfully resolved entitlements [Licensing::Module] Error: License is not active (com.unity.editor.headless). HasEntitlements will fail.

I'm using the 2021.3.22f1 versione of unity editor.

webbertakken commented 1 year ago

Many people have gone before you (including for Bamboo) and got it working so the example project generally is a valid starting point.

I'm not an expert on Unity error codes and they aren't always very descriptive but it looks like you're not actually passing the ULF file. Did you double and triple check your configuration?

You wouldn't be the first person, but assuming you have also done that:

I do not know what is causing your error, but judging by the 500 which means Internal Server Error, which is likely the response of the unity server (as a client wouldn't use 500 error) it could be that the specific unity version isn't working correctly on the CLI or that you've hit one of the common issues from https://game.ci/docs/troubleshooting/common-issues#i-cannot-activate-because.

If I had to guess it's special characters in the email, password or license file or you're hitting the UTF-16 server instead of the needed UTF-8 or vice versa.

For further help please don't tag me directly but address the community in general. You could also try using #help on discord and searching there for people hitting the same problem. There are years worth of logs and people have probably hit the same problem before.

mancioshell commented 1 year ago

There Is no particular configuration to do in gitlab example. I have only setted UNITY_USERNAME and UNITY_PASSWORD in the script. There is no clear documentation which explain if and where i have to pass my ULF file. (To be honest, I thought it was up to the script ti download the ULF file.) Thank you for your support, and execuse me for my tags. I have already checked any other issue in discord or GitHub, but i haven't found any solution to my particular use case.