On Fri, Feb 10, 2017 at 2:56 PM, Greg Sheremeta <gshereme(a)redhat.com> wrote:
I can assist too. What do you need? If it's easier, I'm
available on IRC.
On Fri, Feb 10, 2017 at 8:00 AM, Sandro Bonazzola <sbonazzo(a)redhat.com>
wrote:
> Vojtech, can you please help Ryan and Marek with cockpit-ovirt?
>
Hi guys, we can organize a short session to explain the changes and help
people to use the new packages. Does that make sense?
Generally, any project using nodejs-modules should move from npm to Yarn
(using ovirt-engine-yarn) and then modify the `projects.list` file in
nodejs-modules repo, see [1] for reference.
[1]
https://gerrit.ovirt.org/#/c/71134/
This triggers new nodejs-modules RPM build, which will contain all
dependencies required by all projects defined via the the `projects.list`
file.
If you face issues with CI yum caching like we did in Dashboard (e.g.
nodejs-modules defined in .packages file wasn't actually installed), you
might try installing it manually in your build script, see [2] for
reference.
[2]
https://gerrit.ovirt.org/#/c/71923/
>
> On Wed, Feb 8, 2017 at 3:29 PM, Vojtech Szocs <vszocs(a)redhat.com> wrote:
>
>> Hello devs,
>>
>> following packages, intended as build-time dependencies of oVirt
>> JavaScript projects, have been updated:
>>
>> * ovirt-engine-nodejs
>> * ovirt-engine-nodejs-modules
>> * ovirt-engine-yarn
>>
>> If you use those packages, please read on to learn how to adapt your
>> project. oVirt Dashboard (master) is already adapted and you can use
>> it as your reference.
>>
>> ==
>>
>> 1, move your project from npm to Yarn:
>>
>> - using nodejs-modules implies that your project moves from npm to
>> Yarn, please do this as your first step
>> - make sure to add yarn.lock file to source control: rm -rf
>> node_modules && yarn install # generates yarn.lock
>> - your automation/*.packages should contain something like this:
>>
>> ovirt-engine-nodejs-6.9.4
>> ovirt-engine-nodejs-modules-1.0.3
>> ovirt-engine-yarn-0.19.1
>>
>> - since oVirt CI uses yum cache, always specify exact version of
>> nodejs-modules in your automation/*.packages
>> - in your RPM build script, make sure to set up Node.js env.: source
>> /usr/share/ovirt-engine-nodejs-modules/setup-env.sh
>>
>> ==
>>
>> 2a, dependency handling - 1st time:
>>
>> - clone nodejs-modules repo & update the projects.list file - add
>> URL(s) to your project's files (package.json + yarn.lock)
>> - bump .z in RPM Version and reset the RPM Release number, submit
>> patch to Gerrit
>> - in your project, update automation/*.packages to use the right
>> nodejs-modules version
>>
>> 2b, dependency handling - whenever your dependencies change:
>>
>> - clone nodejs-modules repo & bump RPM Release number, submit patch to
>> Gerrit
>> - in your project, update automation/*.packages to use the right
>> nodejs-modules version
>>
>> ==
>>
>> Q: how does the new nodejs-modules work?
>>
>> A: instead of maintaining one big package.json file to specify all
>> dependencies of all projects (effectively forcing all projects to use
>> single dependency tree), it contains the projects.list file with
>> URL(s) to specific project files.
>>
>> When building nodejs-modules RPM, it goes through the list of URL(s),
>> downloading project's files (package.json + yarn.lock), then
>> downloading required dependencies (using Yarn) and collecting their
>> .tar.gz sources. The nodejs-modules RPM therefore contains a flat list
>> of all .tar.gz sources of all dependencies of all projects.
>>
>> When you source the setup-env.sh script, it does, among other things,
>> tell Yarn to use
>> /usr/share/ovirt-engine-nodejs-modules/yarn-offline-cache containing
>> all .tar.gz sources. Then, it runs Yarn in offline mode to populate
>> your project's node_modules directory.
>>
>> ==
>>
>> Hope this helps.
>>
>> Regards,
>> Vojtech
>> _______________________________________________
>> Devel mailing list
>> Devel(a)ovirt.org
>>
http://lists.ovirt.org/mailman/listinfo/devel
>>
>
>
>
> --
> Sandro Bonazzola
> Better technology. Faster innovation. Powered by community collaboration.
> See how it works at
redhat.com
>
> _______________________________________________
> Devel mailing list
> Devel(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/devel
>
--
Greg Sheremeta, MBA
Red Hat, Inc.
Sr. Software Engineer
gshereme(a)redhat.com