The following jobs can be added in a pipeline:
All jobs are simple and have few properties.
Shared properties
All jobs have an auto-description and a stop on fail property. Stop on fail means the next action in the pipeline is not executed if the previous one fails.
Actually only actions with special execution settings are still executed:
Mendix cloud job
A Mendix cloud job does all the deployment activities for the Mendix cloud. The following actions are possible:
Job | Description |
Build deployment package | To build a deployment package from the latest commit of a branch Select branch |
Clean | To clean the cloud slot (delete database, deployed package). Use with care! Select environment |
Create backup | Creates a database backup for an environment Select environment |
Create savepoint | Create a savepoint (database backup, deployment package, settings copy) for an environment Select environment |
Restore backup | Restores a backup to an environment Select environmentSelect backup (after selecting environment!) Use case is to restore a specific backup for security or load tests |
Restore savepoint | Restore the latest savepoint to an environment Select environment Use case is to restore a failed pipeline. You might want to check what the latest savepoint is in case multiple attempts have been done to run a pipeline |
Set settings | Update the cloud slot settings (scheduled events, constants, runtime settings) with a locally stored set. Select environmentSelect locally saved and named settings (under app settings, tab Mendix cloud) |
Start | Start environment Select environment |
Stop | Stop environment Select environment |
Synchronize | Sync environment status (running, deployed package), list of deployment packages, list of backups, list of revisions. This is often the first job in a pipeline for Mendix cloud jobs, so CI/CD knows what the latest commit is. |
Transport deployment | To transport a deployment from one cloud environment to the next. Select transport sourceLatest deployment packageOther environments deployment packageDeployment package created by other job in this pipelineSelect from environment (After transport source 2.)Select job (After transport source 3.)Select to environment |
A savepoint stores a backup of the database, the deployment package and all constants/runtime settings/scheduled event settings. So a restore of a savepoint brings the environment in exactly the situation as it was when the savepoint was created.
For this reason the server is stopped first, so the backup is not taken with the application live.
APM job
APM defines API keys per environment, so the API account already exactly defines which agent/environment/runtime is performing the job.
Job | Description |
Snapshot reset | Clear statistics in APM agent |
Snapshot create | Get manual statistics snapshot. Is used in code coverage. |
Recording start | Start performance recording |
Recording stop | Stop performance recording |
Load test | Start a load test based on a named setup in APM Manager/Load test setup. This setup includes all information for the test (script, data, environment, robots, duration, amounts) Name load test |
Unit test | Start unit tests (on 1 runtime instance if multiple exist) |
For a unit test to be triggered you need an APM agent (and thus also an APM license) and an extra module APMAgent2UnitTest that is needed besides the AppStore Unittest module.
To run a load test you must prepare a script and setup and also have a baseline defined. This, so the load test executed during the pipeline can compare performance.
Code coverage job
A typical code coverage job consists of the following steps:
- Reset counters
- Run unit/UI tests
- Get APM snapshot with information on which microflows have run
- Calculate code coverage in ACR and get number
CI/CD job
To call a pipeline in another app. For example when implementing micro services, you can control the pipelines of multiple apps.
Steps:
- Create pipeline in other app
- Create API key in other app
- Use [Send to CI/CD API account]:
A dialog to select the other project is shown.
- Create CI/CD job using:
- API Account from 3
- Pipeline from select dialog
When calling our CI/CD from an external app you can find the pipeline guid on the API tab on the pipeline.