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

Screenshots

With data Screenshot 2026-08-03 at 10.08.40 PM.png
Without data Screenshot 2026-08-03 at 10.08.48 PM.png

How to set up and validate locally

  1. Enable the ai_native_deploy feature flag

  2. Visit /o/default/-/deploy/environments and register an environment

  3. 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
  4. 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

Merge request reports

Loading
Loading