RelativeCI

Specialized insights for web bundles

FAQ

General

How is RelativeCI working?

RelativeCI is using @relative-ci/agent to collect, filter, and send the webpack stats to the service API. The API will analyze the webpack stats using bundle-stats and save the result.

Security

Does RelativeCI have access to my project source code?

RelativeCI does not have access to the project source code. The Github application installation will ask for the following permissions:

Agent

What data is the agent sending?

The agent filters the webpack stats and sends only the necessary data (eg: asset/module name and size). We do not access, process, or send any source code.

What environment variables are required?

@relative-ci/agent expects the presence of specific environment variables to identify the project and label individual jobs:

  • RELATIVE_CI_KEY: the RelativeCI API key specific for your project
  • Continuous Integration(CI) environment variables: RelativeCI uses env-ci to normalize the variables across different CI services. The agent uses the following properties: branch, build, buildUrl, commit, isCi, pr, prBranch, slug.

How can I exclude specific assets or modules?

@relative-ci/agent uses the webpack stats as a source of data. The webpack stats configuration allows you to exclude assets or modules:

Webpack plugin setup example

// webpack.config.js
const { RelativeCiAgentWebpackPlugin } = require('@relative-ci/agent');

module.exports = {
  // ... your webpack config
  plugins: [
    // ... other plugins
    new RelativeCiAgentWebpackPlugin({
      stats: {        excludeAssets: [/webpack-stats.json/]      }    })
  ]
};

CLI setup example

// webpack.config.js
const { StatsWriterPlugin } = require("webpack-stats-plugin")

module.exports = {
  // ... your webpack config
  plugins: [
    // ... other plugins

    // Write out stats file to build directory.
    new StatsWriterPlugin({
      filename: 'stats.json',
      stats: {
        context: './src', // optional, will improve readability of the paths
        assets: true,
        entrypoints: true,
        chunks: true,
        modules: true,        excludeAssets: [/webpack-stats.json/]
      }
    })
  ]
}

Project

What is a base branch?

The base branch is the project default branch. The default value is master, but you can change it to match your workflow on Project -> Settings.

Job

What is the job baseline?

A baseline is the latest job in the base branch.

Need help?Contact us via Email, Twitter, or Github!