How to include commercial addons to GitLab build

Hello,

I have been playing with GitLab (also in expectation of your DevOps Cloud product), and I can push and build CUBA applications, but not the ones including the commercial add-ons:

[45](---) > Could not GET 'https://repo.cuba-platform.com/content/groups/premium/com/haulmont/addon/bproc/bproc-global/1.2.1/bproc-global-1.2.1.pom'. Received status code 401 from server: Unauthorized
...
[51](---) > Could not GET 'https://repo.cuba-platform.com/content/groups/premium/com/haulmont/addon/maps/maps-global/1.3.1/maps-global-1.3.1.pom'. Received status code 401 from server: Unauthorized

I can see that the GitLab server can not connect to the commercial repository because it doesn’t have the credentials.

Hot to best deal with it, is there a way to connect to the official repository from the GitLab worker gradle script, or should I find the jars and upload them too to the GitLab repository? Where and how, please? (/libs directory?)

Kind regards,
Mladen

Hi,
You can pass credentials to the build process as environment variables or as command-line parameters.
It’s described in this page:
https://doc.cuba-platform.com/manual-7.2/access_to_repo.html#access_to_premium_repo

  • Another way is to set the following environment variables for your operating system:

    • CUBA_PREMIUM_USER - will be used if premiumRepoUser is not set.
    • CUBA_PREMIUM_PASSWORD - will be used if premiumRepoPass is not set.

When you run the Gradle tasks from the command line, you can also pass the properties as command line arguments with the -P prefix, for example:

gradlew assemble -PpremiumRepoUser=111111222222 -PpremiumRepoPass=abcdefabcdef
1 Like

Thank you.