Skip to content

adding source_repository argument to post step #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module "build" {
ADO_PASSWORD = data.aws_ssm_parameter.ado_password.value,
TEST_REPORT = var.test_report_group,
CODE_COVERAGE_REPORT = var.coverage_report_group
SOURCE_REPOSITORY = var.source_repository
SOURCE_REPOSITORY = var.source_repository
})
}

Expand Down Expand Up @@ -112,7 +112,8 @@ module "post" {
FROM_ENV = var.from_env,
APP_NAME = var.app_name,
ENV_TYPE = var.env_type,
ENABLE_JIRA_AUTOMATION = var.enable_jira_automation
ENABLE_JIRA_AUTOMATION = var.enable_jira_automation,
SOURCE_REPOSITORY = var.source_repository
})
}

2 changes: 1 addition & 1 deletion templates/post_buildspec.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ phases:
commands:
- |
REPORT_URL="https://console.aws.amazon.com/codesuite/codedeploy/applications/lmbda-deploy-${ENV_NAME}/deployment-groups/lambda-deploy-group-${ENV_NAME}"
URL="https://api.bitbucket.org/2.0/repositories/tolunaengineering/${APP_NAME}/commit/$COMMIT_ID/statuses/build/"
URL="https://api.bitbucket.org/2.0/repositories/${SOURCE_REPOSITORY}/commit/$COMMIT_ID/statuses/build/"
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\"}"
- |
if [ "${ENV_NAME}" == "prod" ] && [ "${ENABLE_JIRA_AUTOMATION}" == "true" ] ; then
Expand Down