See what happened on a component
The Events tab of a component is its journal: every push, tag, release, pipeline, Argo CD sync and quality gate its tools reported, day by day, most recent first. When a push was caused by the release of another component, the line says so and leads you to it.
What it shows, and for whomβ
- The events of this component only, from the tools it is linked to by its
catalog-info.yaml. - Anyone who can see the component in the catalog sees its tab. A link to another component appears only when you can see that component too.
- A tool with a webhook shows from its first webhook received. A tool read every 5 minutes also brings its last 7 days (see Without a webhook).
Before you startβ
-
You are an administrator to turn the tab on and to set up the webhooks.
-
The component carries the annotation of at least one tool in its
catalog-info.yaml:apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: shop-app
annotations:
gitlab.com/project-slug: acme/shop-app # GitLab
github.com/project-slug: acme/shop-app # GitHub
argocd/app-name: shop-app # Argo CD
sonarqube.org/project-key: acme-shop-app # SonarQube
spec:
type: service
lifecycle: production
owner: group:default/platformKeep only the lines of the tools you use.
1. π Turn on Eventsβ
-
In the sidebar, at the bottom, click Administration.
-
Under Platform, click Plugins.
-
On the Events card (What happened on a component, day by day: pushes, pipelines, syncs.), click the Enable Events switch. The message Events is on appears.
Your component's page now has an Events tab, next to its other tabs.
2. π Let GitLab send its eventsβ
-
In Administration, under Platform, click Company connections, then the Webhooks tab.
-
On the GitLab card, click Configure.
-
In the window Configure GitLab Secret, next to Webhook URL, click Copy address. The address ends in
/api/orion-events/gitlab, for examplehttps://astrolabe.example.com/api/orion-events/gitlab. -
In Webhook Secret, type a long random text, for example
a-long-random-text, then click Save Secret. -
In your GitLab project, open Settings βΊ Webhooks and add a webhook:
- URL: the address you copied;
- Secret token: the same secret;
- Trigger: tick Push events, Tag push events, Releases events, Pipeline events and Job events.
This step in GitLab was not checked on a live instance.
The GitLab card of the Webhooks tab now offers Manage. For more on this card, see Set the GitLab webhook secret.
3. π Let GitHub send its eventsβ
-
In Administration βΊ Company connections, click the Webhooks tab.
-
On the GitHub card, click Configure.
-
In the window Configure GitHub Secret, next to Webhook URL, click Copy address. The address ends in
/api/orion-events/github. -
In Webhook Secret, type a long random text, then click Save Secret.
-
In your GitHub repository, open Settings βΊ Webhooks βΊ Add webhook:
- Payload URL: the address you copied, Content type
application/json; - Secret: the same secret;
- Let me select individual events: tick Pushes, Branch or tag creation, Releases, Workflow runs and Workflow jobs.
This step in GitHub was not checked on a live instance.
- Payload URL: the address you copied, Content type
4. π Argo CD and SonarQubeβ
Argo CD syncs and SonarQube quality gates come from their connection in Administration βΊ Company connections: Add the Argo CD integration, Add the SonarQube integration. Astrolabe reads them every 5 minutes (see below). This read and their webhook were not checked on a live instance.
β³ Without a webhookβ
A tool with a connection in Administration βΊ Company connections and no webhook is read every
5 minutes. The first read brings back the last 7 days. The tab then says, for example,
GitLab has no webhook: its API is read every 5 min.
For GitLab and GitHub, the component must be registered from its own repository: in
Catalog βΊ Register an existing component, give the address of the catalog-info.yaml in the
repository named by its annotation, for example
https://gitlab.example.com/acme/shop-app/-/blob/main/catalog-info.yaml for
gitlab.com/project-slug: acme/shop-app.
5. π Read the tabβ
-
In the sidebar, click Catalog, then the name of your component, for example
shop-app. -
Click the Events tab.
-
Each day has its title, for example Today β Friday, October 30. Each line gives the tool, what happened and the time:
Line What it says Push Renovate Bot pushed the commit 9f8e7d6 on main β βchore: bump shop-lib to 1.4.2β, with the pipeline of that commit, for example#7101 Β· failedTag Lib Maintainer created the tag v1.4.2 on the commit a1b2c3dPipeline The workflow #7101 failed for the commit 9f8e7d6, with its duration, for example1 min 15 s -
To narrow the list, click a source above it (All sources, GitLabβ¦), or choose a branch in Branch. At the bottom, Show older events loads the previous days.
π See which release triggered a pushβ
Under a push, a line starting with β³ says what caused it:
| Line | When it appears |
|---|---|
β³ triggered by the release 1.4.2 of shop-lib (05:23:45) | The commit message names a package and its version, for example chore: bump shop-lib to 1.4.2 (Renovate, Dependabot, Β« bump β¦ to β¦ Β»). |
β³ pushed by shop-lib | The commit was pushed by the bot of another component's GitLab project. Not checked on a live instance. |
β³ triggered by pipeline #4512 of shop-lib | The pipeline was started by a pipeline of another component. Not checked on a live instance. |
On the component of the release, the tag says the other way round:
β³ pushed the commit 9f8e7d6 to shop-app.
The name of the other component is a link to its Events tab when Astrolabe knows that component:
the child declares it in spec.dependsOn, under the name of the package, and Tech stack is on in
Administration βΊ Plugins. These conditions were not checked on a live instance.
spec:
dependsOn:
- component:default/shop-lib
Your commit message does not name the package? Add this line at the end of the message, after an empty line:
Triggered-By: shop-lib@1.4.2
The push then shows β³ triggered by the release 1.4.2 of shop-lib.
β That's it!
Next: Common problems with Events.