Commandline Operator (COP), is a command line interface for CET Developer/Operator. To see if your version of CET Developer has COP, open a cmd prompt or git bash from Developer and type 'cop':
Note that COP does not have all the features that CET Developer has, but some important features it has are to build extensions, run tests, and upload built extensions to MyConfigura.
Clean and Repair
Before building or testing, it is recommended to clean and repair the workspace.
cop clean cop repair
Cop clean kills running processes and cleans the write folder. Cop repair cleans settings and temporary files.
How to build extensions
Firstly, make sure your shell/cmd prompt is in the correct directory. You want to be at the top-level directory of the repository/workspace you want to build from. This is usually the 'base' folder or the 'extensions' folder in your workspace
The basic command for building an extensions is:
cop make custom.fika
To find out what extensions are available to build for your workspace, type:
cop list extensions
You can also build extension groups (the ones in CET Developer Build Central).
You must add the square brackets "[ ]" when building a group.
cop make [fika]
Groups in build Central:
If you typed the command correctly, cop should make the following display:
Build in progress.
Build completed successfully.
If you want to build beta extensions, you need to specify the "/beta" flag like this:
cop make [fika] /beta
Note that the default upload only uploads 'release' extensions, you have to add a '/beta' flag for the upload command too.
Where to find built extensions and logs
Once cop finishes building the extension(s), they will be moved to the buildOutput folder. You can usually find this folder in the same location as your workspace files.
Like Build Central, cop will log the build process. You can find the logs in the buildLogs folder which should be in the same location as the buildOutput folder.
COP also prints out where the logs will be during any build:
Uploading built extensions
You can also upload built extensions to MyConfigura:
cop upload custom.fika
cop upload [fika]
To change the name of your upload folder add this flag:
cop upload [fika] /uploadname="10.0-RC"
You may use any naming convention for uploads that you like, but it is absolutely necessary to have the "runner-" prefix or "cop-" prefix to your uploads. By default, cop ALREADY adds the "cop-" prefix to uploads no matter what name you specify. The only exception is if your uploadname starts with a "runner-".
This is because uploading frequent builds take too much storage space. Therefore, we periodically clean old builds made with the aforementioned prefixes.
If you want to upload build [beta] extensions, you have to add a "/beta" flag like this:
cop upload [fika] /beta
Advanced Build Options
You can use:
cop make extensions [group]
to only build extensions (no tests)
cop make tests [group]
cop make extensions
will build all extensions available. Same for tests.
It is possible to pass in multiple extensions in one line like this:
cop make custom.fika custom.fika.office
However, combinations like these can result in errors from not building dependencies correctly. To be safe, you can use the following flag:
cop make custom.fika custom.fika.office /includeDependencies
By default, the builder will use the maximum number of threads available in parallel minus one when building. Each thread will be one 'worker' when building:
You can limit the threads that COP uses with the "maxWorkers" flag:
cop make [core] /maxWorkers=4
Running tests in cop is the same as building extensions (see previous section). Simply do:
cop make fikaTestLoadDrawings
To list all possible tests:
cop list tests
Due to the gitlab-runner being a service, any processes, including CET Designer is also run a background task/service. This can cause problems with some tests, especially those that use GUIs or rely on the Graphics on your monitor to pass!
Adding Build Items / Tests
COP is simple a shell interface for functionalities in CET Developer. To add build items/tests to COP, add them like how you would add them for CET Developer.
To create new extensions, see Extension Creation
To add custom test suites, see Test Suites in Build Central