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

AzureDevops pipeline FAiling task:: Post-job: Activate Unity License #224

Open
jambstud opened this issue Mar 26, 2023 · 3 comments
Open

Comments

@jambstud
Copy link

Hello,

I'm using a simple AzureDevops pipeline and alsways is failing at this task: Post-job: Activate Unity License

Any recommendation to pass it over?

Pipeline looks :

stages:

  • stage: BuildUnity
    displayName: Build Unity
    jobs:
    • job: BuildUnity
      displayName: Build Unity
      pool:
      vmImage: 'windows-latest'

      steps:

      • task: UnityGetProjectVersionTask@1
        name: unitygetprojectversion
        displayName: Get Unity Project Version
        inputs:
        unityProjectPath: '$(unity.projectPath)'

      • task: PowerShell@2
        displayName: Install Unity
        condition: and(succeeded(), ne(variables['installCached'], true))
        inputs:
        targetType: 'inline'
        script: |
        Install-Module -Name UnitySetup -AllowPrerelease -Force -AcceptLicense

      • task: PowerShell@2
        displayName: Install Unity Components
        condition: and(succeeded(), ne(variables['installCached'], true))
        inputs:
        targetType: 'inline'
        script: |
        Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version '$(unitygetprojectversion.projectVersion)' -Components $(unity.installComponents)) -Verbose

      • task: UnityActivateLicenseTask@1
        displayName: Activate Unity License
        inputs:
        username: '$(unity.username)'
        password: '$(unity.password)'
        serial: '$(unity.serialkey)'
        unityEditorsPathMode: 'unityHub'
        unityProjectPath: '$(unity.projectPath)'

      • script: |
        echo $(unityactivation.logsOutputPath)

image

@kristen-movares
Copy link

kristen-movares commented Apr 4, 2023

Just recently having this exact same issue, in the post-job it tries to activate the already active license (resulting in a exit 1 error) only after doing that it seems to run unity again to actually return the license which it does successfully. Eventually the build finishes with the 1 error resulting in an incorrect result of a faild build.

#218 seems to be related

@jambstud
Copy link
Author

@kristen-movares do you know if any work around is available for this ?
thanks

@o-litnon
Copy link
Contributor

o-litnon commented May 21, 2023

if you're using powershell already...
there's a workaround here: https://github.com/o-litnon/AzurePipelineUnityTasks

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

No branches or pull requests

3 participants