Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #208 from Financial-Times/change-api-repo-info
Browse files Browse the repository at this point in the history
feat: include repo info in the Change API requests
  • Loading branch information
sjparkinson authored Jul 29, 2019
2 parents e48c9a3 + e6a49b8 commit 966fdea
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/tasks/deploy.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,26 @@ deplo%: ## deploy: deploy the app to heroku
$(MAKE) change-api

change-api:
curl \
--header "Content-Type: application/json" \
--header "x-api-key: $(CHANGE_API_KEY)" \
@$(LOG "Saving deployment to the Change API...")
@curl \
--header "Content-Type: application/json" \
--header "x-api-key: $(CHANGE_API_KEY)" \
--request POST \
--data "{ \
--data "{ \
\"user\": { \
\"githubName\": \"$(CIRCLE_USERNAME)\" \
}, \
\"environment\": \"production\", \
\"systemCode\": \"$(CIRCLE_PROJECT_REPONAME)\", \
\"systemCode\": \"$(shell curl https://next-registry.ft.com/v2/ | jq ".[] | select(.repository == \"https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}\") | .code")\", \
\"gitRepositoryName\": \"$(CIRCLE_PROJECT_USERNAME)/$(CIRCLE_PROJECT_REPONAME)\", \
\"commit\": \"$(CIRCLE_SHA1)\" \
}" \
https://api.ft.com/change-log/v1/create
@$(DONE)

heroku-postbuil%:
npm update
@if [ -e bower.json ]; then $(BOWER_INSTALL); fi
make build-production
make deploy-assets
npm prune --production #Need to explicitly run this so review apps are the same as production apps

0 comments on commit 966fdea

Please sign in to comment.