How to determine the last deployment of all components

Garyl Paras
Contributor
August 11, 2023

We have GitLab integration and we can see the deployment within the component but I can't figure out if there's a filter or a report that will list all components and their last deployments in prod/staging.
Maybe a new column in the Component page that shows the last deployment.

1 answer

1 vote
Josh Campbell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2024

Hey @Garyl Paras! Thanks for the suggestion, I've added a backlog ticket for this. In the meantime, you could use GraphQL to build a report for this. Here's a query to get you started that can pull the last deployment event for each component, though you'll need to filter out anything without a deployment yourself as the API won't do this:

query MyQuery {
compass {
searchComponents(cloudId: <your-cloud-id>, query: {}) {
... on CompassSearchComponentConnection {
nodes {
component {
events(query: {eventTypes: DEPLOYMENT, first: 1}) {
... on CompassEventConnection {
nodes {
... on CompassDeploymentEvent {
deploymentProperties {
state
startedAt
completedAt
}
}
eventType
lastUpdated
}
}
}
id
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}

 Hope this helps! Also if you don't mind, I'd be keen to know what you'll use this for? :) Is this like a report you'd reference at some cadence or something that a certain team/person wants to see ad-hoc? And then what do you do with this information? Thanks Garyl great to hear from you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events