BYU CI/CD Skip to main content

BYU CI/CD

CI/CD process for all BYU Mendix Apps

If this is your first time using this pipeline, see the "One-Time Mendix Deploy Setup" section below.
For full setup instructions for the CI/CD pipeline, see the CI/CD Setup documentation.

Branching Strategy and Process

  1. When starting work on a story or incident, create a local branch by forking from the acceptance branch 
  2. When your code is working locally, merge commit your local branch to the acceptance branch and push the changes. Doing so will automatically deploy it to the acceptance environment. 
  3. Now that it is on the Acceptance environment, your code can be reviewed by users or testers. 
  4. After you have passed a code review, your changes have been approved, and all unit tests are passing, merge commit the acceptance branch to the main branch and push. Doing so will automatically run all unit tests in the app. If they all pass, your changes will be deployed to Prod at 2am. If any tests fail, the deployment will be cancelled. Running the unit tests and this automated process should take less than 15 minutes. Check the Mendix Deploy app to make sure the tests passed and your package is ready to be deployed at 2am. 

Hotfixes/Immediate Deployments

  • If you must make an immediate deployment to the Production environment, you may do so by directly modifying the main branch and deploying manually with Sprintr. 
  • After making and pushing changes on main, the pipeline will be triggered to deploy at 2am, and a job will be created on the Mendix Deploy app. Since you are deploying immediately, you may want to cancel it. 
  • After making changes to main, you must merge the main branch into the acceptance branch, so that it does not get out of date. 
Visualization of CI/CD pipeline

One-Time Mendix Deploy Setup

  1. Generate a Personal Access Token and API key for your pipelines 
    1. Create a Mendix Personal Access Token for your pipelines 
    2. To find your Mendix API key, navigate to your Mendix user settings https://user-settings.mendix.com/link/profile 
    3. Go to the Developer Settings tab and press New Token 
    4. Name it (something like “pipeline”) 
    5. Select the following boxes: 
      Boxes to check while creating Personal Access Token
      More boxes to check while creating Personal Access Token
    6. Click Create 
    7. Copy and save your Personal Access Token somewhere you’ll remember 
  2. Create an API key for your pipelines (if you haven’t already) 
    1. Return to the Developer Settings tab of Mendix User Settings 
    2. Press Configure API Keys 
    3. Press Create New API Key and add a description relating to its use for pipelines 
    4. Copy and save your new API key somewhere you’ll remember 
  3. Set up BYU’s Mendix Deploy app (Note: this only needs to be done once per developer, it will apply to all apps in Mendix Deploy) 
    1. Log in to https://byu-mendix-deploy.apps.us-2a.mendixcloud.com/index.html 
    2. Press Manage API Info 
    3. Enter your Mendix API key you saved earlier
    4. Enter your Mendix user name (Likely your BYU email, but can be found by selecting your profile picture on mendix.com) 
    5. Enter your Mendix Personal Access Token you saved earlier and press Save 

Author: Matthew Bailey, OIT Application Engineering Campus Life Team 7/31/2024