Created
July 13, 2020 13:35
-
-
Save jesseschutt/f1891368bd40d2593a8b503bb0f06733 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SENTRY_BEARER_TOKEN="MyBearerToken" | |
export SENTRY_PROJECT="my-sentry-project-name" | |
export ENVIRONMENT="develop" | |
export PREVIOUS_SHA=`tail {{release}}/.commit_hash_previous` | |
cd {{ release }} | |
curl https://sentry.io/api/0/organizations/zaengle/releases/ \ | |
-H "Authorization: Bearer ${SENTRY_BEARER_TOKEN}" \ | |
-X POST \ | |
-H "Content-Type:application/json" \ | |
-d "{ | |
\"environment\":\"${ENVIRONMENT}\", | |
\"version\":\"{{sha}}\", | |
\"refs\":[{ | |
\"repository\":\"zaengle/my-repository-name\", | |
\"commit\":\"{{sha}}\", | |
\"previousCommit\": \"${PREVIOUS_SHA}\" | |
}], | |
\"projects\": [\"my-sentry-project-name\"] | |
}" | |
curl https://sentry.io/api/0/organizations/zaengle/releases/{{sha}}/deploys/ \ | |
-X POST \ | |
-H "Authorization: Bearer ${SENTRY_BEARER_TOKEN}" \ | |
-H 'Content-Type: application/json' \ | |
-d " | |
{ | |
\"environment\": \"${ENVIRONMENT}\", | |
\"name\": \"{{release}}\" | |
}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "{{ sha }}" > {{release}}/.commit_hash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yes | cp -f {{project}}/current/.commit_hash {{release}}/.commit_hash_previous | |
echo "{{ sha }}" > {{release}}/.commit_hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment