Skip to content

Commit 0443920

Browse files
authored
Merge pull request #25 from toluna-terraform/source-repository-argument-in-post-step
adding source_repository argument to post step
2 parents 967e577 + e4ce0c0 commit 0443920

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module "build" {
5555
ADO_PASSWORD = data.aws_ssm_parameter.ado_password.value,
5656
TEST_REPORT = var.test_report_group,
5757
CODE_COVERAGE_REPORT = var.coverage_report_group
58-
SOURCE_REPOSITORY = var.source_repository
58+
SOURCE_REPOSITORY = var.source_repository
5959
})
6060
}
6161

@@ -112,7 +112,8 @@ module "post" {
112112
FROM_ENV = var.from_env,
113113
APP_NAME = var.app_name,
114114
ENV_TYPE = var.env_type,
115-
ENABLE_JIRA_AUTOMATION = var.enable_jira_automation
115+
ENABLE_JIRA_AUTOMATION = var.enable_jira_automation,
116+
SOURCE_REPOSITORY = var.source_repository
116117
})
117118
}
118119

templates/post_buildspec.yml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ phases:
4040
commands:
4141
- |
4242
REPORT_URL="https://console.aws.amazon.com/codesuite/codedeploy/applications/lmbda-deploy-${ENV_NAME}/deployment-groups/lambda-deploy-group-${ENV_NAME}"
43-
URL="https://api.bitbucket.org/2.0/repositories/tolunaengineering/${APP_NAME}/commit/$COMMIT_ID/statuses/build/"
43+
URL="https://api.bitbucket.org/2.0/repositories/${SOURCE_REPOSITORY}/commit/$COMMIT_ID/statuses/build/"
4444
curl --request POST --url $URL -u "$BB_USER:$BB_PASS" --header "Accept:application/json" --header "Content-Type:application/json" --data "{\"key\":\"${APP_NAME} Deploy\",\"state\":\"SUCCESSFUL\",\"description\":\"Deployment to ${ENV_NAME} succeeded\",\"url\":\"$REPORT_URL\"}"
4545
- |
4646
if [ "${ENV_NAME}" == "prod" ] && [ "${ENABLE_JIRA_AUTOMATION}" == "true" ] ; then

0 commit comments

Comments
 (0)