@cs/ci

composed-ci

composed-ci takes the LabVIEW-specific configuration complexities out of your continuous integration.

This package exists because of the following premises:

  1. A LabVIEW project should know how to test and build itself.
  2. Configuration and testing of the LabVIEW-specific test and build steps should be able to be performed in the LabVIEW IDE with an equivalent command line API available for the CI server.

By managing LabVIEW's test-and-build configuration in the project, the API and number of parameters the CI server needs to manage are minimized, which decouples projects from the CI server. This assists with configuring the CI server by removing responsibilities, and minimizes the amount of information that the CI server has to know about your project.

Test-and-build parameters are stored in a json configuration file that lives next to your source code. Includes a user interface to select which build specifications and tests to run.

Dependencies

This project uses VI Analyzer and JKI VI Tester.

This package depends on the following VI Packages (all available on VIPM): LabVIEW CLI by Wiresmith Technology JKI_labs_tool_vi_tester by JKI VI Tester JUnit XML Test Results by JKI VI Analyzer Results to Checkstyle XML Format by National Instruments

This package depends on the following NI Products: VI Analyzer

Command Details

  1. Build This runs one or more LabVIEW build specifications and zips the output.
  2. Mass Compile This performs a LabVIEW native mass compile on the working directory
  3. Open Project This opens the project and checks for broken vis. It also checks for dependency loops.
  4. VI Analyzer Runs one or more VIA configuration files
  5. VI Tester Runs one or more VI Tester test cases. Tests can be individually whitelisted (only run these) or blacklisted. Leave blank to run all.
  6. Relink This will relink G packages in a temporary project. This feature is now a part of GPM and will be deprecated.
  7. Recompile This feature does a bottom up forced recompile of all items in your project. This fixes the majority of linking issues when relink and mass compile fail. This feature is also included in GPM and may be deprecated.
  8. Import Externals (alpha) This will clone any git URL into an externals directory in your project. If it is a g package, its dependencies will be added to the parent project. This feature is being developed with the intention of migrating to GPM.

Source code details and contribution guidelines

The project is composed of several distinct layers with different responsibilities. If you would like to contribute, please conform to this structure for new capabilities.

  1. CLI API

The top level API to be invoked via command line. This layer is responsible for writing the command line output, parsing the command line arguments, and invoking the manual api.

  1. Manual API

The topmost level API that can be called with LabVIEW open (CLI requires LabVIEW to be closed before running). This layer is called from the configure build.vi. This layer is responsible for input validation and calling the composed-ci class methods.

  1. Composed-ci.lvclass

This class’s purpose is to parse composed-ci.json and make the parameters available to the build steps.

  1. Build Steps The build steps unbundle the relevant data from the class private data, validate paths, and call the minimal steps, and report the results to the caller.
  2. Minimal steps The minimal steps are not class aware and simply invoke the methods to do the work of the step

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.3.0] - 2019-09-28

Changed

  • added Report Errors.vi to CLI api vis so the exact error number and message are sent to the command line output
  • bunch of external dependency feature updates
  • changed VI Tester and VI Analyzer step calls in Configure Build.vi to be by reference
  • added dependencies vipc to the tools folder (in bitbucket source)

[1.2.0] - 2019-08-30

Added

  • improved open project log message, now lists specific bad vis it found
  • implemented 'import externals' as a method of adding private source code as a dependency via git, and resolving gpm dependencies and adding them to the parent project. Specify a GIT URI to clone, or leave blank to read the externals.json file and import all.
  • fixed an issue with the project recompile sorting order
  • added cyclic dependency check to project recompile and open project steps
  • switched config file format to JSON using MGI json library. Existing binary configurations can still be read, but not created.

[1.1.0] - 2019-04-25

Added

  • Added a new method called "Recompile Project" that will force a bottom-up recompile on all VIs in a project, including GPM dependencies. This will fix any conflicts that may otherwise occur when opening the project and appear in the dependencies section.

[1.0.1] - 2019-04-17

Changed

  • fixed an issue where dependency order sorting in the relink step did not work for some packages

[1.0.0] - 2019-04-15

Changed

  • removed a breakpoint from manual build step that prevented builds from working
  • updated default value of build target to be 'my computer'
  • build step now creates zip files of build output
  • build output is left in place, in case it is needed by subsequent build specs
  • 'build specification names' no longer builds all if left blank. Builds must be selected using the 'select build specs' button on the configure build UI

[0.9.17] - 2019-02-28

Changed

  • manual API methods now generate usefult errors if input paramaters are bad
  • improved test coverage for bad of missing configuration files
  • improved test coverage for bad or missing working directory
  • improved test coverage for VI tester steps, which must be run manually

[0.9.16] - 2019-02-28

Changed

  • renamed composed-ci.ini to composed-ci.cfg
  • added 'select build spec' button to UI
  • added 'select tests' button to UI and reworked the VI tester operation to use a folder and whitelist/blacklist

Removed

  • removed pipeline build step

[0.9.14] - 2019-02-26

Changed

  • removed dependency on ci-common-steps
  • updated documentation and icon/avatar
  • Open Project from CLI will return an error if <1 good VIs found or >0 bad VIs

[0.9.12] - 2019-02-25

Changed

  • small refactor from VIA feedback
  • added mass compile and relink steps to the CLI API significant rework of the sweet user interface, including new buttons for mass compile and relinking

[0.9.11] - 2019-02-19

Changed

  • updated composed-ci.ini
  • removed configuration.lvlib
  • removed dependency on @cs/configuration
  • added open project step
  • refactor due to new VIA configuration

[0.1.0] - 2019-02-7

Added

Initial release

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security

MIT License

Copyright (c) 2019 Composed Systems, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.