Deploy to Test and Production Instances

If you're a developer who's fairly comfortable with Git and the development lifecycle, you'll probably want to set things up so you have control of moving your visual app from the development phase into test, and finally to production.

When a project is first created and configured, it's typically set up so that changes committed to the main branch automatically kick off a pipeline that packages the visual app and deploys it to whichever Visual Builder instance was named as the project's Development instance. To deploy your visual applications to other non-production instances, like a test pod or another Development environment, you'll need to create new packaging and deployment jobs and create a pipeline to run the jobs.

Note:

Before you proceed, contact your Visual Builder administrator and make sure that the Visual Builder test and production instances are properly configured and running. For example, you may want to confirm that security options are configured for each instance and the instance points to the correct database for test and production.

Set Up the Project for Testing

When your development cycles are complete, configure the VB Studio project to build and deploy visual applications to a Visual Builder test instance. This involves the following steps:

To perform this action: Do this:
1. Create an environment for the Visual Builder test instance. Your test instance can reside either in your current identity domain or in another identity domain. From the current identity domain:
  1. In the left navigator, click Environments Environments.
  2. Click + Create Environment. In Environment Name and Description, enter a unique name and description, and click Create.
  3. In the Service Instances tab, click Add Instance.
  4. In the Add Service Instances dialog box, click Visual Builder.
  5. Select Identity Domain.
  6. Select the Visual Builder instance you want to add.
  7. Click Add.

If your test instance resides in another identity domain, see Add Additional Deployment Instances.

2. Create a new test branch in your project's Git repo.
  1. In the left navigator, click Git Git.
  2. Click Refs, then click Branches Branches.
  3. From the Repositories drop-down list, select the repository.
  4. Click + Create Branch.
  5. In the New Branch dialog box, in Name, enter the branch name. From the Base drop-down list, select the main branch as the base branch.
  6. Click Create.
3. Create copies of your existing development packaging and deployment jobs and modify them to deploy to the test instance. Create a copy of the packaging job used for development and modify it:
  1. In the left navigator, click Builds Builds.
  2. In the Jobs tab, click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job's description.
  5. Select the Copy From Existing check box.
  6. In Copy From, select the packaging job used for development.
  7. In Template, change the build executor template if needed.
  8. Click Create.
  9. In the Job Configuration screen, click Save.
Create a copy of the deployment job used for development and modify it:
  1. Click Jobs Overview to return to the Jobs tab. Or click Builds Builds in the left navigator.
  2. Click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job's description.
  5. Select the Copy From Existing check box.
  6. In Copy From, select the deployment job used for development.
  7. In Template, change the build executor template if needed.
  8. Click Create.
  9. In the Job Configuration screen, click Before Build.
  10. In From job, select the packaging job that you created for the test instance.
  11. Click Steps.
  12. In Target Instance, select the test instance.
  13. In Username and Password, enter the credentials of a user who can access the test instance.
  14. Click Save.
4. Set up a pipeline for the test instance.
  1. In the left navigator, click Builds Builds.
  2. Click Pipelines.
  3. Click + Create Pipeline.
  4. In the Create Pipeline dialog box, in Name and Description, enter a unique name and description.
  5. Click Create.
  6. Right-click the Start node, and select Add New Start Jobs.
  7. Select the packaging job you created for the test instance and click Save.
  8. To run the deployment job after the packaging job successfully completes, right-click the packaging job, select Add, then Add New on Success Jobs.
  9. Select the deployment job you created for the test instance and click Save.
  10. Click Save on the Pipeline Configuration page.
5. Run the pipeline. In most cases, you'll want to have this pipeline automatically triggered when anyone commits to main, but you do have the option to run the pipeline manually. (As an developer working alone or with just a few others on a project, it's unlikely that this option would appeal to you, but it does exist.)
  1. Click the Pipelines tab and locate the pipeline you want to run.
  2. From the Actions Actions menu menu, click Run Pipeline.

    You can also click the pipeline name to get to the Pipeline Details page, then click Run.

Set Up the Project for Production

When you're ready to move your visual app to production, the process is similar, with a few additional steps:
To perform this action: See this:
1. Create an environment for your Visual Builder production instance. Add the Visual Builder Production Instance to an Environment
2. Create a new branch in your project's Git repo for changes that are ready for production. After creating this branch, any changes pushed to the main branch won't be added automatically to the production branch. Instead, you must create a merge request or manually push the changes to the production branch, as a means of protecting the branch against untested or unwanted additions. Create a Production Branch
3. Create and configure the production build jobs:
  • Create a packaging job
  • Create a deployment job
4. (Optional) Restrict users who can edit the production jobs or run their builds. Configure a Production Job's Privacy Setting
5. Set up the pipeline. Create and Configure a Pipeline
6. Run the pipeline. Run the Pipeline

See Set Up the Project to Deploy for Production in Administering Visual Builder Studio.