Building and Deploying

Admin: Corporate Admin
Page: Administration > Deployment
URL: {client_ID}.corpadmin.directscale.com/Corporate/Admin/Deployment
Permission: ViewAdministration()

Once you've created your custom code and committed it to GitHub, you can now Build and Deploy it.



Accessing the Page

If you can't access the Deployment page, it may need to be enabled:

  1. Contact Customer Care.
  2. Request to enable the Deployment page in Corporate Admin.

⚠Important

Only enable the Deployment page when you have Extension code ready to commit, or errors may occur.

Suppose the page is enabled and you still can't access it. In that case, you may need the ViewAdministration() permission enabled for your Role by your Corporate Administrator.



Testing Code Before Deploying

❗Warning

You should always test your code on your Stage environment first. Attempting to Deploy any code with errors can break vital functionality.

  1. In GitHub, push your changes to Master.
  2. On your Stage environment (corpadmin.directscalestage.com), navigate to the Deployment page.
  3. Queue a New Build. If your build fails, then there were errors in your code. See Failed Builds.
  4. Resolve any errors.
  5. When ready, you can Deploy to Live.


Building a New Artifact

  1. On the Deployment page, you may see all your previous builds from GitHub.

    Deployment page

  2. Click Queue New Build to add a new build artifact. This queues the build across all environments (Stage/Live).

    Queue New Build button

  3. Test your code on Stage.



Failed Builds

If your build fails, then there were errors in your code.

Failed builds link

  1. Click the Failed link to open a modal where you can view the errors. Each error indicates at which class and line number the error occurred.

    Build Errors pop-up

✅Tip

If you refresh the page in the browser after the build fails, you’ll get an Extension Load Log that provides you more context to the errors.
2. Locate the errors in your code.
3. When committed and ready to go, you can return to the Deployment page and queue a new build.

📘Note

Many deployment errors on the Extension are caused by dependency registration. For example, suppose you register your Hooks/APIs in the wrong order, and one is dependent on another. In that case, the build will fail unless the dependent one is listed first.



Deploying to Live

📘Note

The Build only Deploys to the current environment. Log in to each environment and deploy manually.

  1. Click Deploy. This queues the pipeline, and your new version is ready to use.

    Deploy button

  2. The currently deployed version displays at the top right of the page:

    Build version



Rollback

Old code is better than broken code, so if you've made a mistake, you can always roll back to an older version.

⚠Important

Always deploy in your Stage environment first.

On the Deployment page:

  1. Use the table to locate the version to which you want to revert.
  2. Click Deploy.