Skip to content

Commit

Permalink
Merge branch 'main' into DBTP-1804-pipeline-resource-names-too-long
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStainsby committed Feb 20, 2025
2 parents bffdf26 + e1c9d77 commit 158c93f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .release-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.2.0"
".": "7.3.0"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [7.3.0](https://github.com/uktrade/terraform-platform-modules/compare/7.2.0...7.3.0) (2025-02-20)


### Features

* DBTP-1788 Add deploy_repository key ([#341](https://github.com/uktrade/terraform-platform-modules/issues/341)) ([8c44ce7](https://github.com/uktrade/terraform-platform-modules/commit/8c44ce784fbc22c0455f477b9b41d0b49ee85ca6))


### Bug Fixes

* DBTP-1746 - Allow CDN origin options to be updated ([#334](https://github.com/uktrade/terraform-platform-modules/issues/334)) ([51ee145](https://github.com/uktrade/terraform-platform-modules/commit/51ee145c21dc9686d65eb744a6ff0961b22823eb))
* DBTP-1789 - Remove required pipelines config ([#338](https://github.com/uktrade/terraform-platform-modules/issues/338)) ([4c76c94](https://github.com/uktrade/terraform-platform-modules/commit/4c76c946d2f50468d31597b81c64ca7a1492e001))
* DBTP-1803 - Failure to retrieve service name ([#340](https://github.com/uktrade/terraform-platform-modules/issues/340)) ([916843d](https://github.com/uktrade/terraform-platform-modules/commit/916843dc9df626027162d3b1d2d14c22e2dde0db))
* DBTP-1991 Allow environment pipeline to adjust ElastiCache replication count ([#335](https://github.com/uktrade/terraform-platform-modules/issues/335)) ([2052b95](https://github.com/uktrade/terraform-platform-modules/commit/2052b951f8fe0b655a07e66ab3ab3ede36e9ca23))
* Redis plans being ignored ([#344](https://github.com/uktrade/terraform-platform-modules/issues/344)) ([808748e](https://github.com/uktrade/terraform-platform-modules/commit/808748eb0d8fed6cb0edf524c8c2e8c09fe86616))

## [7.2.0](https://github.com/uktrade/terraform-platform-modules/compare/7.1.0...7.2.0) (2025-02-11)


Expand Down
4 changes: 2 additions & 2 deletions codebase-pipelines/codepipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "aws_codepipeline" "codebase_pipeline" {

configuration = {
ConnectionArn = data.aws_codestarconnections_connection.github_codestar_connection.arn
FullRepositoryId = "uktrade/${var.application}-deploy"
FullRepositoryId = var.deploy_repository != null ? var.deploy_repository : "uktrade/${var.application}-deploy"
BranchName = "main"
DetectChanges = false
}
Expand Down Expand Up @@ -135,7 +135,7 @@ resource "aws_codepipeline" "manual_release_pipeline" {

configuration = {
ConnectionArn = data.aws_codestarconnections_connection.github_codestar_connection.arn
FullRepositoryId = "uktrade/${var.application}-deploy"
FullRepositoryId = var.deploy_repository != null ? var.deploy_repository : "uktrade/${var.application}-deploy"
BranchName = "main"
DetectChanges = false
}
Expand Down
18 changes: 18 additions & 0 deletions codebase-pipelines/tests/unit.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,24 @@ run "test_additional_ecr_repository_public" {
}
}

run "test_deploy_repository" {
command = plan

variables {
deploy_repository = "uktrade/application-deploy"
}

assert {
condition = aws_codepipeline.codebase_pipeline[0].stage[0].action[0].configuration.FullRepositoryId == "uktrade/application-deploy"
error_message = "Should be: uktrade/application-deploy"
}

assert {
condition = aws_codepipeline.manual_release_pipeline.stage[0].action[0].configuration.FullRepositoryId == "uktrade/application-deploy"
error_message = "Should be: uktrade/application-deploy"
}
}

run "test_main_branch_filter" {
command = plan

Expand Down
5 changes: 5 additions & 0 deletions codebase-pipelines/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ variable "repository" {
type = string
}

variable "deploy_repository" {
type = string
default = null
}

variable "additional_ecr_repository" {
type = string
default = null
Expand Down

0 comments on commit 158c93f

Please sign in to comment.