Skip to content

Commit

Permalink
Merge pull request #15 from mozilla-services/normalize-deployment-env…
Browse files Browse the repository at this point in the history
…ironments

Normalize deployment environments based on service catalog
  • Loading branch information
hackebrot authored May 29, 2024
2 parents 442a88b + d7c32f5 commit e58fdac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion queries/deployments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ WITH
SELECT
deploys.*,
service_catalog.service,
service_catalog.production_env,
service_catalog.staging_env,
FROM
deploys
LEFT JOIN
Expand Down Expand Up @@ -83,7 +85,12 @@ WITH
deploys.service,
deploys.metadata_service as deploys_service,
changes_raw.metadata_service as changes_service,
deploys.metadata_environment as environment,
CASE
WHEN deploys.metadata_environment = production_env THEN "production"
WHEN deploys.metadata_environment = staging_env THEN "staging"
ELSE deploys.metadata_environment
END
AS environment,
deploy_id,
deploys.time_created time_created,
change_metadata,
Expand Down

0 comments on commit e58fdac

Please sign in to comment.