-
Notifications
You must be signed in to change notification settings - Fork 5
Build and CI
The project has a Gradle-based building infrastructure and a Jenkins-based CI configuration.
The project uses Gradle to build the MagicDraw Plugin.
- runJava: This task builds the MagicDraw Plugin, installs it in a MagicDraw instance and then runs the MagicDraw with the plugin in it.
- debugJava: It does the same as the runJava task but in debug mode. It provides a debug port to debug the Plugin with remotely.
The project's code-base provides an opportunity to define test for the MagicDraw Plugin. (See more details on the related wiki page)
The tests are runnable and debug-able from Gradle.
- runTest: It builds the MD Plugin and a Test Plugin as well. It installs the plugins in the installed MagicDraw instance then runs the MagicDraw in headless mode to run the tests.
- debugTest: It does the same but in debug mode. It provides a debug port to debug the Plugin with remotely.
These tasks create a jUnit test result XML. It is available in the build/install/target
folder.
The Plugin has a functionality to generate Python code form a SysML MD project. It is runnable with a MagicDraw CommandLineAction which is runnable from Gradle as well. (Check the related wiki page)
- runCodeGen: This Gradle task builds the Plugin and then run the Python Code Generation on an example model.
The project uses Jenkins for Continuos Integration. It is available here.
The project's Jenkins configuration contains a Run Plugin Tests
stage. It runs every time a build triggered. It runs and evaluates the tests had defined for the Plugin.
The test results are published.
The configuration provides an opportunity to run the Python Code Generation on the Jenkins. It is off by default. There is a build parameter called CODE_GEN
, which can enable the Code Generation stage. With another parameter called INPUT_PROJECT
it is possible to add the path of any MD Project from the workspace as the input model of the code generation. The default value of the parameter INPUT_PROJECT
is ../../resources/Python_Codegen_Example.mdzip
, which is a simple example model.
For the Code Generation let run a Build with parameter. Open a build (e.g. master) and click on Build with Parameters
.
Opt in CODE_GEN
parameter. Add a new INPUT_PROJECT
if you wish.
The Run Python Code Generation
will be executed after the Plugin Test execution.
The generated source code will be published as a build artifact. It will be available under the Last Successful Artifacts
or Build Artifacts
. It will be a zip file named <MD_PROJECT_NAME>_generated.zip
.