CI/CD solutions are a common way to manage release builds and testing for serious software projects.
This reference material provides the basics to get
arc running in a headless build environment, along with tips to improve the CI experience.
As described in the normal install instructions, we depend on
Linux, your package manager will likely provide node,
apt install nodejsor similar.
brew install node.
Windows, If your build worker has Chocolatey, invoke
choco install nodejs-lts.
Yarn recommends installing via npm after
nodejs is installed.
npm install --global yarn
This applies to macOS, and the Linux distro's we've tested (Ubuntu, Arch, Solus)
Just run the normal install setup script to download the latest copy of
arc from our server.
curl https://install.electricui.com | bash
Otherwise, you can download the
arc binary directly from our server:
and add it to your PATH by adding an entry into
.bashrc as you see fit.
Alternatively, add it temporarily to your system's PATH by appending it to the current path:
arc.exe directly from our server, and add the folder to
Invoke-WebRequest -Uri "https://registry.eui.io/arc/latest/arc_latest_windows_amd64.zip" -OutFile "arc_latest_windows_amd64.zip"expand-archive -path 'arc_latest_windows_amd64.zip' -destinationpath 'electricui-arc'
In following stages of the build job, either invoke the arc executable with a fully resolved location, or add it to your PATH (temporarily, or permanently depending on your build environment).
Here are a few different ways to do this:
echo "electricui-arc" | Out-File -Append -FilePath $env:Path -Encoding utf8
$env:Path += ";C:\my-working-directory\electricui-arc"
We offer specific CI/CD accounts and tokens to commercial users.
Before continuing, you need to login to
arc with your Electric UI credentials.
Normally this is done by following the prompts after
arc login, but this process is non-trivial in a scripted environment. Instead, we suggest using the environment variable support built into
Set the environment variables
ARC_PASSWORD. We recommend storing these strings in your CI solutions secret key tooling to prevent leakage through configuration files or logs.
Checking the build setup
The best way to validate the setup is to run
The output will display the active version of
yarn, as well as displaying if a login is active.
Running a production build
In situations where the repository has been pulled into a fresh machine/VM, the project will likely be missing dependencies.
- Set your working directory to the interface directory in your repo.
arc installto fetch the libraries and deps listed in the
This process typically takes 2-4 minutes on a standard low-mid range cloud CI instance, and will typically download about 80-120MB of files.
The build products will be emitted into the
Generally the premade
.zip is the most useful, though unpacked copies are also available alongside.
The default Electric UI template includes stubs for e2e testing.
This section will be detailed at a later date.
For assistance running e2e tests in a CI environment, get in touch.