Last updated Mar 22, 2022

Rate this page:

Get events from connected event sources

In Compass, there are two main methods for getting events from tools to show on the activity feed. One way is by sending events using the Compass REST API. The other is connecting event sources when you add a relevant link to the component details page from a configured integration.

Here, we’ll show you how to connect to event sources to show events from those sources on the activity feed.

We currently support the Bitbucket Cloud integration to get deployment events from a component’s connected Bitbucket repositories. More tools are coming soon!

Before you begin

  • Depending on the tool you want to get events from, you may need to integrate with your chosen tool and perform additional configurations in that tool. For example, to send deployment events from a component’s Bitbucket repository, you need to integrate Compass with Bitbucket Cloud and set up and configure Bitbucket Pipelines in your component’s repository.
  • Ensure that you are an admin on:
    • the workspace or organization of the event source that you want to connect with Compass
    • your Compass instance

Connect an event source

You can get events from tools to show on the activity feed by connecting event sources to a component in Compass.

To connect to an event source:

  1. If you’ve not already done so, follow the steps outlined in our documentation to integrate with your chosen tool, such as Bitbucket Cloud: Integrate Compass with Bitbucket Cloud.

  2. Some tools may require additional configuration to show events on the activity feed. Configure your chosen tool, if needed.

  3. Add a link to the event source in your component’s details in Compass. For example, to get deployment events from a Bitbucket repository, you would:

    1. In Bitbucket, copy the link to your component’s repository.
    2. Go to your component in Compass.
    3. In the Overview page of your component’s details, add the link in the Repositories section. Learn more about adding links to a component's resources

Once you connect to the event source, events from that source start to appear on the activity feed in Compass.

If you’re connecting to a Bitbucket repository to get deployment events to show on the activity feed, take a note of these additional points:

  • A component's deployment activity appears in Compass only if you've connected the event source to the component and there is at least one deployment in your component’s production-type environment.

  • The activity feed also shows deployment events from a component's upstream dependencies if you've connected event sources to those components. The deployment events from your component’s dependencies appear alongside the deployment events from your component.

  • You can add links to any repositories from the Bitbucket workspace connected to your Compass site. The activity feed shows deployment events from all those repositories when you set up and configure Bitbucket Pipelines. The activity feed does not show deployment events from any repositories that are not in the connected Bitbucket workspace.

  • Suppose you integrate Compass with Bitbucket Cloud after adding a repository link to the component’s details page. In that case, the activity feed gets the deployment events from the connected repository once your app integration completes. The activity feed also backfills historical deployment events from the connected repository.

Set up and configure Bitbucket Pipelines for activity feed

Bitbucket Pipelines is an integrated CI/CD service built into Bitbucket that allows you to automatically build, test, and deploy your code based on a configuration file in your repository. Setting up and configuring a pipeline enables you to view a component’s deployment activity in Compass.

To set up and configure a pipeline for activity feed:

  1. Set up a pipeline in your component’s repository.
  2. Set up and configure your deployment environments. Learn more about setting up deployments in Bitbucket
    • Currently, Compass can read deployment events only from production type environments. For example, we've set up two production type environments named production and prod-east. Production environments in Bitbucket
  3. Configure the deployment steps in the bitbucket-pipelines.yml file. Add the deployment keyword, followed by the name of your production type environment.
    • These steps in our pipeline generate deployment events from the two production environments:
      - step:
          name: 'Deploy to production'
          deployment: production
          trigger: 'manual'
            - echo "Deployed to production."
      - step:
          name: 'Deploy to prod-east'
          deployment: prod-east
          trigger: 'manual'
            - echo "Deployed to prod-east."

Rate this page: