Loading
Wire environment card to rollout deploy data
What does this MR do and why?
The environment card component has been updated to display real data instead of hardcoded placeholder values. Previously, the card showed static mock information (like "5 apps", "10m ago", "@abc.com"); now it pulls live details from the actual environment object passed to it, including the release version, last deployment time, who deployed it, the number of applications, and the associated cluster agent.
References
- Related to https://gitlab.com/gitlab-org/gitlab/-/issues/600769
- Missing backend fields: https://gitlab.com/gitlab-org/gitlab/-/issues/600766 and https://gitlab.com/gitlab-org/gitlab/-/issues/600767
Screenshots
| With data | ![]() |
| Without data | ![]() |
How to set up and validate locally
-
Enable the
ai_native_deployfeature flag -
Visit
/o/default/-/deploy/environmentsand register an environment -
Run following in the gdk rails console
organization = Organizations::Organization.find_by!(path: 'default') environment = Cd::Environment.find_by!(organization: organization, name: 'prod-apac-west-1') application = Cd::Application.find_by!(organization: organization, name: 'todo') deployer = User.find_by!(username: 'root') release = 'v1_0_0' deployed_at = 10.minutes.ago driver_binding = environment.environment_driver_bindings.max_by(&:version) version_set = Cd::VersionSet.find_or_create_by!(application: application, name: release) rollout = Cd::Rollout.create!( version_set: version_set, application: application, workflow_ref: 'release-pipeline' ) Cd::RolloutEnvironment.create!( rollout: rollout, environment: environment, driver_binding: driver_binding, position: 1, state: :pending ) rollout.start! rollout.complete! rollout.rollout_environments.each do |rollout_environment| rollout_environment.update!( state: :completed, started_at: deployed_at - 5.minutes, finished_at: deployed_at ) end -
Environments with finished rollouts show release version, last deployment time, who deployed it, the number of applications, and the associated cluster agent; ones without show
—
Edited by Rajan Mistry

