Digital.ai Release logo

Backstage Digital.ai Release Plugin

Created by digital.ai

Digital.ai Release is a release orchestration tool that helps teams plan, automate, and track software delivery across many environments. It connects to your existing toolchain, models the steps of a release, and gives a clear view of status and history. Teams use templates and workflows to repeat proven paths, reduce risk, and meet audit needs.

The Digital.ai Release plugin brings that context into Backstage. You can see active releases in one place, filter by status or date, and jump into the release flow when you need more detail. You can browse templates, view metadata, and start a new release from a template with a simple handoff to the Release portal. The plugin also surfaces a workflow catalog so teams can search by category or author, pick a target folder, and run the right workflow for their service. It supports more than one Release instance, so platform teams can connect dev, staging, and prod or separate regions without hacks. Permissions are available to limit who can view or act.

Use it to keep release activity close to your service catalog, reduce context switching, and give engineers a standard way to trigger common tasks. It fits cleanly into an internal developer portal so teams can move faster with less guesswork.

Installation Instructions

These instructions apply to self-hosted Backstage only.

Install the frontend plugin

  1. Add the package to your app
Copy
yarn --cwd packages/app add @digital-ai/plugin-dai-release
  1. Add routes in your app so users can reach the pages
Copy
// packages/app/src/App.tsx
import React from 'react';
import { Route } from 'react-router';
import { FlatRoutes } from '@backstage/core-app-api';
import { DaiReleasePage, DaiTemplatePage } from '@digital-ai/plugin-dai-release';

export const routes = (
  <FlatRoutes>
    {/* other routes */}
    <Route path="/dai-release" element={<DaiReleasePage />} />
    <Route path="/dai-template" element={<DaiTemplatePage />} />
  </FlatRoutes>
);
  1. Add sidebar items so the pages are visible in the UI
Copy
// packages/app/src/components/Root/Root.tsx
import React from 'react';
import { SidebarItem } from '@backstage/core-components';
import { ReleaseSvgIcon } from '@digital-ai/plugin-dai-release';

export const Root = () => (
  <>
    {/* other sidebar items */}
    <SidebarItem icon={ReleaseSvgIcon} to="dai-release" text="Dai Release" />
    <SidebarItem icon={ReleaseSvgIcon} to="dai-template" text="Dai Release Template" />
  </>
);

Install the backend plugin legacy backend system

  1. Add the package to your backend
Copy
yarn --cwd packages/backend add @digital-ai/plugin-dai-release-backend
  1. Create a plugin file
Copy
// packages/backend/src/plugins/dai-release.ts
import { createRouter } from '@digital-ai/plugin-dai-release-backend';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';

export default function createPlugin(env: PluginEnvironment): Promise<Router> {
  return createRouter({
    logger: env.logger,
    config: env.config,
    permissions: env.permissions,
  });
}
  1. Wire the router into the backend
Copy
// packages/backend/src/index.ts
import daiRelease from './plugins/dai-release';

// inside main bootstrap after other envs that use useHotMemoize
const daiReleaseEnv = useHotMemoize(module, () => createEnv('dai-release'));

// after other routers
apiRouter.use('/dai-release', await daiRelease(daiReleaseEnv));
  1. Add configuration in app config

Single instance

Copy
# app-config.yaml
daiRelease:
  instances:
    - name: prod
      host: http://your-release.example.com:4516
      token: ${DAI_RELEASE_TOKEN}

Multiple instances

Copy
# app-config.yaml
daiRelease:
  instances:
    - name: prod
      host: http://your-release.example.com:4516
      token: ${DAI_RELEASE_TOKEN_PROD}
    - name: staging
      host: http://your-release-staging.example.com:4516
      token: ${DAI_RELEASE_TOKEN_STAGING}

Configuration details

  • name shows in the UI when choosing an instance
  • host is your Release application host including scheme and port
  • token should come from an environment variable that holds a Release API token with read access

Install the backend plugin new backend system

  1. Add the package if you have not done so
Copy
yarn --cwd packages/backend add @digital-ai/plugin-dai-release-backend
  1. Register the backend module
Copy
// packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults';

const backend = createBackend();

// other feature additions
backend.add(import('@digital-ai/plugin-dai-release-backend'));

backend.start();
  1. Use the same app config shown above for instances

Set environment variables for tokens

  1. Export token values before you run the backend
Copy
export DAI_RELEASE_TOKEN=your_prod_token
export DAI_RELEASE_TOKEN_PROD=your_prod_token
export DAI_RELEASE_TOKEN_STAGING=your_staging_token

Use the variables that match your app config

Optional secure the UI with permissions

  1. Add the common package to the app
Copy
yarn --cwd packages/app add @digital-ai/plugin-dai-release-common
  1. Guard the sidebar item
Copy
// packages/app/src/components/Root/Root.tsx
import { RequirePermission } from '@backstage/plugin-permission-react';
import { daiReleaseViewPermission } from '@digital-ai/plugin-dai-release-common';
import { ReleaseSvgIcon } from '@digital-ai/plugin-dai-release';

<RequirePermission permission={daiReleaseViewPermission} errorPage={<></>}>
  <SidebarItem icon={ReleaseSvgIcon} to="dai-release" text="Dai Release" />
</RequirePermission>
  1. Guard the route
Copy
// packages/app/src/App.tsx
import { RequirePermission } from '@backstage/plugin-permission-react';
import { daiReleaseViewPermission } from '@digital-ai/plugin-dai-release-common';
import { DaiReleasePage } from '@digital-ai/plugin-dai-release';

<Route
  path="/dai-release"
  element={
    <RequirePermission permission={daiReleaseViewPermission}>
      <DaiReleasePage />
    </RequirePermission>
  }
/>
  1. Add the common package to the backend if you plan to write a policy
Copy
yarn --cwd packages/backend add @digital-ai/plugin-dai-release-common
  1. Example backend permission policy
Copy
// packages/backend/src/plugins/permission.ts
import {
  AuthorizeResult,
  isPermission,
  PermissionPolicy,
  PolicyDecision,
  PolicyQuery,
} from '@backstage/plugin-permission-node';
import { daiReleaseViewPermission } from '@digital-ai/plugin-dai-release-common';

class ExamplePermissionPolicy implements PermissionPolicy {
  async handle(request: PolicyQuery): Promise<PolicyDecision> {
    const user = request.user;
    if (isPermission(request.permission, daiReleaseViewPermission)) {
      if (user?.identity.ownershipEntityRefs.includes('group:default/release-admins')) {
        return { result: AuthorizeResult.ALLOW };
      }
      return { result: AuthorizeResult.DENY };
    }
    return { result: AuthorizeResult.ALLOW };
  }
}

export default ExamplePermissionPolicy;

Replace the group reference with one that exists in your catalog

Use the pages in Backstage

  1. Open the route path you added for releases
  • /dai-release shows recent releases and workflows
  • /dai-template shows templates
  1. Use the sidebar links you added to reach these pages

Changelog

This changelog is produced from commits made to the Digital.ai Release plugin since 10 months ago, and based on the code located here. It may not contain information about all commits. Releases and version bumps are intentionally omitted. This changelog is generated by AI.

dai release

Features

  • Add workflow catalog view with categories filters permission checks and multiple instance support PR #81 merged 9 months ago
  • Add free text search on title and description PR #81 merged 9 months ago
  • Add filter icon in the app UI PR #86 merged 6 months ago
  • Add Run workflow from catalog show folder chooser dialog then start the release and redirect PR #82 merged 8 months ago

Bug fixes

  • Fix workflow page text color for dark theme by passing the active theme to DotThemeProvider PR #87 merged 6 months ago
  • Reset categories and authored by when instance changes PR #83 merged 8 months ago
  • Avoid duplicate calls when instance changes PR #83 merged 8 months ago
  • Reset scroll to top on instance change PR #83 merged 8 months ago
  • Remove duplicate data in lists PR #83 merged 8 months ago

Breaking changes

  • None

Documentation

  • Update changelog content PR #85 merged 7 months ago

dai release backend

Features

  • Provide APIs for workflow catalog configured instances and categories add filter support and permission checks support DAI Release versions 23.3 24.1 24.3 PR #81 merged 9 months ago
  • Provide API to get folder list add defaultTargetFolder to list workflows API PR #82 merged 8 months ago

Bug fixes

  • Fix exception when release data has no commit ID PR #83 merged 8 months ago

Breaking changes

  • None

dai release common

Features

  • Add shared support for workflow catalog data PR #81 merged 9 months ago
  • Add FolderBackendResponse type add defaultTargetFolder in WorkflowList PR #82 merged 8 months ago

Breaking changes

  • None

Set up Backstage in minutes with Roadie