Skip to content

Instantly share code, notes, and snippets.

@jkotchoff
Created April 12, 2020 04:45
Show Gist options
  • Save jkotchoff/581e0353c15415db1f3dc53a616d6cc6 to your computer and use it in GitHub Desktop.
Save jkotchoff/581e0353c15415db1f3dc53a616d6cc6 to your computer and use it in GitHub Desktop.
Bitrise CI slack workflow
...
workflows:
primary:
steps:
- [email protected]:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- [email protected]: {}
- [email protected]:
inputs:
- content: |-
#!/bin/bash
set -e
set -x
envman add --key GITHUB_URL --value "https://github.com/jkotchoff/stocklight/commit/`git log --pretty=format:'%H' -n 1`"
- [email protected]:
inputs:
- content: |-
#!/bin/bash
set -e
set -x
if [ $BITRISE_BUILD_STATUS -eq 1 ]
then envman add --key GIPHY_KEYWORDS --value "fail,disappointed,try again"
else envman add --key GIPHY_KEYWORDS --value "success,congrats,victory,such wow,awesome,shipit,yes,panda,cat,hell yeah,applaud,lgtm,surprise,suprise motherfucker,yeah bitches,high five,legendary,lil bub"
fi
- [email protected]:
inputs:
- access_token: "$BUILD_STATUS_ACCESS_TOKEN"
- verbose: 'yes'
- [email protected]:
inputs:
- workdir: app
- command: install
- [email protected]:
inputs:
- workdir: app
- command: test
- [email protected]:
inputs:
- gif_words: "$GIPHY_KEYWORDS"
- [email protected]:
run_if: '{{enveq "BUILD_STATUS_CHANGED" "true"}}'
inputs:
- is_debug_mode: 'yes'
- webhook_url: https://hooks.slack.com/services/.../.../...
- channel: "#development"
- channel_on_error: "#development"
- author_name: 'Build #$BITRISE_BUILD_NUMBER triggered by $GIT_CLONE_COMMIT_AUTHOR_NAME'
- message: ":white_check_mark: Woot! Build was succesful"
- message_on_error: "\U0001F631 Bugger, Something went wrong"
- fields: []
- buttons: |-
View on Bitrise|${BITRISE_BUILD_URL}
View on GitHub|$GITHUB_URL
- image_url: "$GIF_URL"
- [email protected]: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment