You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup the CI pipeline in Google CloudBuild.
Steps
I've followed carefully all the steps porting the gitlab pipeline example over.
I've generated and activated the license successfully. The generation was done in a CloudBuild runner and the activation manually in the unity website.
I've encoded to base64 the licence and added it as a secret environment variable. Then decoded it before saving it to disk.
Findings
The before_script.sh is running fine and writing to disk the licence at: /root/.local/share/unity3d/Unity/Unity_lic.ulf
I've also inspected the licence by cat /root/.local/share/unity3d/Unity/Unity_lic.ulf and it matches with the one i've downloaded.
The Problem
The problem i'm having is that when the build.sh is running it seems that doesn't detect the license file located in /root/.local/share/unity3d/Unity/Unity_lic.ulf and so it tries to generate a new license to activate.
Here is the output I'm getting:
docker.io/unityci/editor:2021.3.6f1-webgl-1.0.1
+ mkdir -p /root/.cache/unity3d
+ mkdir -p /root/.local/share/unity3d/Unity/
+ set +x
Writing '$UNITY_LICENSE' to license file /root/.local/share/unity3d/Unity/Unity_lic.ulf
+ echo'Building for WebGL'
+ export BUILD_PATH=/workspace/Builds/WebGL/
+ BUILD_PATH=/workspace/Builds/WebGL/
+ mkdir -p /workspace/Builds/WebGL/
Building for WebGL
+ cat /root/.local/share/unity3d/Unity/Unity_lic.ulf
[REDACTED LICENCE OUTPUT]
Branch: 2021.3/staging
Build type: Release
Batch mode: YES
System name: Linux
Distro version: #1 SMP Debian 5.10.127-1 (2022-06-30)
Kernel version: 5.10.0-16-cloud-amd64
Architecture: x86_64
Available memory: 3930 MB
[LicensingClient] Channel doesn't exist: "LicenseClient-root"[Licensing::Module] Successfully launched the LicensingClient (PId: 59)[SignatureVerifier] Application signature verification not supported on this platform.[LicensingClient] Handshaking with LicensingClient (version: 1.9.0+249add7)[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-root" (connect: 1.37s, validation: 0.20s, handshake: 0.00s)[Licensing::Module] Connected to LicensingClient (PId: 59, launch time: 0.00, total connection time: 1.57s)Entitlement-based licensing initiated[Licensing::Module] Error: Access token is unavailable[LicensingClient] Licenses updated successfully[UnityConnectServicesConfig] config is NOT valid, switching to defaultCancelling DisplayDialog: Failed to activate/update license Missing or bad username or password. Please try again using valid credentials or contact support@unity3d.comThis should not be called in batch mode.
Bug description
Context
I'm trying to setup the CI pipeline in Google CloudBuild.
Steps
I've followed carefully all the steps porting the gitlab pipeline example over.
I've generated and activated the license successfully. The generation was done in a CloudBuild runner and the activation manually in the unity website.
I've encoded to base64 the licence and added it as a secret environment variable. Then decoded it before saving it to disk.
Findings
The
before_script.sh
is running fine and writing to disk the licence at:/root/.local/share/unity3d/Unity/Unity_lic.ulf
I've also inspected the licence by
cat /root/.local/share/unity3d/Unity/Unity_lic.ulf
and it matches with the one i've downloaded.The Problem
The problem i'm having is that when the
build.sh
is running it seems that doesn't detect the license file located in/root/.local/share/unity3d/Unity/Unity_lic.ulf
and so it tries to generate a new license to activate.Here is the output I'm getting:
cloud build:
Ugly workaround
If i run the job by using "docker in docker" it seems to work correctly, for example, given the following configuration:
Steps to reproduce
Simply try to run the following job in cloudbuild:
alter the before_script.sh to decode the variable, for example:
Expected behavior
The cloudbuild runner picks up the license when running the
build.sh
scriptAdditional details
The text was updated successfully, but these errors were encountered: