Skip to content
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

Add support for rollbar_username #7

Merged
merged 8 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ You can find it under your project's settings in the Project access token sectio
When notifiying deploys in two stages, for sending to Rollbar when a deploy starts and the status of its result (succeeded or failed ) you need
also to set the `DEPLOY_ID` environment variable with the ouput of the previous step.

Optionally set `ROLLBAR_USERNAME` environment variable, usernames can be found at:
> https://rollbar.com/settings/accounts/YOUR_TEAM/members/


### Inputs

Expand Down Expand Up @@ -42,6 +45,7 @@ steps:
version: ${{ github.sha }}
env:
ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }}
ROLLBAR_USERNAME: ${{ secrets.ROLLBAR_USERNAME }}
jackton1 marked this conversation as resolved.
Show resolved Hide resolved
```


Expand All @@ -58,6 +62,7 @@ steps:
status: 'started'
env:
ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }}
ROLLBAR_USERNAME: ${{ secrets.ROLLBAR_USERNAME }}

...

Expand All @@ -71,5 +76,6 @@ steps:
status: 'succeeded'
env:
ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }}
ROLLBAR_USERNAME: ${{ secrets.ROLLBAR_USERNAME }}
DEPLOY_ID: ${{ steps.rollbar_pre_deploy.outputs.deploy_id }}
```
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RESPONSE=$(curl -X $METHOD https://api.rollbar.com/api/1/deploy/$DEPLOY_ID \
-H "X-ROLLBAR-ACCESS-TOKEN: $ROLLBAR_ACCESS_TOKEN" \
--form environment=$1 \
--form revision=$2 \
--form status=$3)
--form status=$3 \
--form rollbar_username=$ROLLBAR_USERNAME)

# Get the deploy id depending on the response as they are different for POST and PATCH
if [[ $METHOD == "POST" ]]; then
Expand Down