Last updated Jul 12, 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

  • 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
  • Integrate Compass with your chosen tool, for example, Bitbucket Cloud.
    • You'll need to do this activity only once on your Compass site.

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. Integrate Compass with your chosen tool, if not already done so.

  2. Configure your 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:
      1
      2
      - step:
          name: 'Deploy to production'
          deployment: production
          trigger: 'manual'
          script:
            - echo "Deployed to production."
      - step:
          name: 'Deploy to prod-east'
          deployment: prod-east
          trigger: 'manual'
          script:
            - echo "Deployed to prod-east."
      

Rate this page: