Error while trying to build project from CI/CD pipeline

Hello,

I am using azure devops pipeline to deploy my jmix project but while building it, I get this issue:

FAILURE: Build failed with an exception.
** Where:*
Build file ‘/home/app/build.gradle’ line: 24
** What went wrong:*
A problem occurred evaluating root project ‘PortalBackend’.
> Could not get unknown property ‘premiumRepoUser’ for root project ‘PortalBackend’ of type org.gradle.api.Project.

Can anybody help ?
Thanks

Hi,

Perhaps you are using some premium add-ons and your build.gradle contains the following repositories configuration:

repositories {
    mavenCentral() 
    maven {
        url 'https://global.repo.jmix.io/repository/public'
    }
    maven {
        url 'https://nexus.jmix.io/repository/premium'
        credentials {
            username rootProject['premiumRepoUser']
            password rootProject['premiumRepoPass']
        }
    }
}

As you can see, the build system expects premiumRepoUser and premiumRepoPass properties to pass them as repository credentials. Normally they are set by Studio in your ~/.gradle/gradle.properties file when you register the premium subscription, so the build works locally on your machine.
For CI, you have to supply this properties to the Gradle process somehow, for example as -P command line parameters:

./gradlew build -PpremiumRepoUser=123456789012 -PpremiumRepoPass=qwertyuiopas

Regards,
Konstantin

1 Like

Thanks Konstantin,

It solves my probleme.

Regards,
Stanislas