No description
Find a file
2018-03-09 09:47:58 +01:00
src Use proper es6 import syntax 2017-10-18 19:12:56 +02:00
test Add integration test using Cockpit test API 2018-03-09 09:47:58 +01:00
.babelrc initial commit. Created a basic webpack.config.js file, some basic .babelrc settings, and some notes on the build 2017-06-20 07:41:52 -04:00
.eslintignore Add more sample content to subscriptions page 2017-07-26 10:33:14 +02:00
.eslintrc.json Add more sample content to subscriptions page 2017-07-26 10:33:14 +02:00
.gitignore Add integration test using Cockpit test API 2018-03-09 09:47:58 +01:00
.travis.yml Add .travis.yml (#15) 2017-10-19 17:54:52 +02:00
cockpit-starter-kit.spec Consistently name everything [cockpit-]starter-kit (#14) 2017-10-19 17:54:12 +02:00
LICENSE Initial commit with a LICENSE and README 2017-06-14 18:19:15 +02:00
Makefile Add integration test using Cockpit test API 2018-03-09 09:47:58 +01:00
org.cockpit-project.starter-kit.metainfo.xml Consistently name everything [cockpit-]starter-kit (#14) 2017-10-19 17:54:12 +02:00
package.json Add integration test using Cockpit test API 2018-03-09 09:47:58 +01:00
README.md Add integration test using Cockpit test API 2018-03-09 09:47:58 +01:00
Vagrantfile vagrant: bump base box to fedora 26 2017-10-18 16:42:54 +02:00
webpack.config.js Remove the index.js indirection 2017-10-18 16:42:54 +02:00

Cockpit Starter Kit

Scaffolding for a Cockpit module.

Building

Run make to build the package. It builds into the dist directory. Link or copy that to a location were cockpit-bridge looks for packages.

make install compiles and installs the package in /usr/share/cockpit/. The convenience targets srpm and rpm build the source and binary rpms, respectively. Both of these make use of the dist-gzip target, which is used to generate the distribution tarball. In production mode, source files are automatically minified and compressed. Set NODE_ENV=production if you want to duplicate this behavior.

Testing

Run make check to build an RPM, install it into a standard Cockpit test VM (centos-7 by default), and run the test/check-starter-kit integration test on it. This uses Cockpit's Chrome DevTools Protocol based browser tests, through a Python API abstraction. Note that this API is not guaranteed to be stable, so if you run into failures and don't want to adjust tests, consider checking out Cockpit's test/common from a tag instead of master (see the test/common target in Makefile).

After the test VM is prepared, you can manually run the test without rebuilding the VM, possibly with extra options for tracing and halting on test failures (for interactive debugging):

TEST_OS=centos-7 test/check-starter-kit -tvs

You can also run the test against a different Cockpit image, for example:

TEST_OS=fedora-27 make check

Vagrant

This directory contains a Vagrantfile that installs and starts cockpit on a Fedora 26 cloud image. Run vagrant up to start it and vagrant rsync to synchronize the dist directory to /usr/local/share/cockit/starter-kit. Use vagrant rsync-auto to automatically sync when contents of the dist directory change.