Giter Club home page Giter Club logo

ovirt-engine-nodejs-modules's Introduction

ovirt-engine-nodejs-modules

last build

Summary

This package contains the dependencies needed to build oVirt JavaScript applications. By using this package, a project can use nodejs dependencies and build without downloading packages.

Usage

Modify your build script and/or CI job configuration to ensure this packages is installed when building your project:

  • ovirt-engine-nodejs-modules

It’s highly recommended to specify an explicit version and release when requiring the ovirt-engine-nodejs-modules package in your project. For example, in your rpm.spec file:

BuildRequires: ovirt-engine-nodejs-modules >= 2.3.0-1

Note that ovirt-engine-nodejs-modules requires nodejs and takes care of installing the yarn package manager.

Build script

In your build script, source setup-env.sh to set up the Node.js environment and run yarn install to populate the ./node_modules directory:

cd /path/to/your/project
source /usr/share/ovirt-engine-nodejs-modules/setup-env.sh

The setup script runs yarn install in offline mode, using JavaScript package sources located at:

/usr/share/ovirt-engine-nodejs-modules/yarn-offline-cache

If the setup-env.sh command fails, it usually means that you need to add a pre-seed and rebuild the ovirt-engine-nodejs-modules RPM so the offline cache directory will be updated to contains all dependencies currently required by your project or pull request.

Using this package in a project

Simply modify the projects.list.mjs JavaScript file, adding the project’s git information. The git repository will be fetched to access the project’s package.json and yarn.lock file.

Both package.json and yarn.lock are mandatory in the target project. The build will fail if any of those files are not available.

For example, in the projects section of projects.list.mjs, the following block references a git repo, branch (any commitish will work) and folder to be included in the package:

    'ovirt-web-ui': {
      git_url: 'https://github.com/oVirt/ovirt-web-ui.git',
      branch: 'master',
      folder: '/',
    },

Package versioning

The project is version is the standard x.y.z-release format. In general, only bump the x number for major project changes.

When adding a project to the projects.list.mjs file, bump .y in Version and reset the Release number.

When rebuilding the package to pickup changes in the projects listed in the projects.list.mjs file, bump .z in Version and reset the Release number.

When adding a pre-seed source to the pre-seeds.list.mjs file, bump .y in Version and reset the Release number.

When adding or removing a specific pull request pre-seed, bump .z in Version and reset the Release number.

Bump the Release number for a rebuild with the same project and pre-seed configurations.

Pre-seed

If you need dependencies to build a pull request where changes to package.json or yarn.lock are not yet merged, you can add a manual pre-seed based on a GitHub pull request. This avoids a chicken and egg problem.

Summary

Adding a pre-seed is as easy as adding a reference to a pull request with the package.json and/or yarn.lock changes.

The check CI script will only pass if all pre-seeds are linked to an open pull request.

NOTE: Pre-seeds for merged or closed pull-requests patches must be removed for CI to pass.

For example

To pre-seed from a GitHub pull request 42 against the oVirt/ovirt-web-ui project, update the pre-seeds.list.mjs file to look like:

    'ovirt-web-ui': {
      github: {
        owner: 'oVirt',
        repo: 'ovirt-web-ui'
      },
      folder: '/',
      pr: [
        42,
      ]
    },

Any number of project and PRs per project can be listed.

After a pull request adding a pre-seed is merged, the newly built version of ovirt-engine-nodejs-modules will now be pre-seeded with the new package.json and yarn.lock requirements. Offline CI builds of the source pre-seed will now work.

ovirt-engine-nodejs-modules's People

Contributors

avivtur avatar bond95 avatar gregsheremeta avatar irosenzw avatar jhernand avatar ljelinkova avatar machacekondra avatar mareklibra avatar michalskrivanek avatar pcbailey avatar rszwajko avatar sandrobonazzola avatar sgratch avatar sjd78 avatar thaorell avatar vojtechszocs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.