awesome-ci-recipes
awesome-ci-recipes copied to clipboard
Useful scripts and tricks for continuous integration
Configs
- Travis sample config (simple)
Environment Variables
-
cross-ci
— normalize CI variables across CI runners. -
env-ci
— get environment variables exposed by CI services. - Set env vars on CircleCI:
echo 'export MY_VAR=123' >> $BASH_ENV
Notifying
-
npx ci-scripts slack
— send build infromation to Slack. -
npx ci-scripts github-post
— send build infromation to GitHub. -
slack-cli
— powerful Slack CLI via pure BASH. -
commit-status
— set commit status link on GitHub.
Deploying
- Upload to AWS S3.
-
gh-pages
— upload a folder to GitHub Pages. - Deploy Docker image to AWS ECS/Fargate.
- Deploy function to AWS Lambda.
- Deploy project to Firebase.
- Deploy Heroku app.
-
scp
examples — copy files over SSH.
Releasing
-
npx semantic-release
— release to NPM and GitHub withsemantic-release
. -
release-it
— release to NPM and GitHub. -
conventional-recommended-bump
— compute recommended semantic bump from semantic commits. -
shipit
— minimalistic SSH deployment. -
auto-release
— generate releases based on semantic version labels on pull requests. -
aws cloudfront update-distribution
— switch AWS CloudFront distribution target key.
Waiting
- See example how to do waiting.
-
wait_for_http_200.sh
— wait until URL responds with 200. -
wait_for_http_json_response.sh
— wait until JSON payload has a key set to some value. -
wait-for-it.sh
— wait until HTTP endpoint reponds. -
wait-for
— fork ofwait-for-it.sh
.
Timeout
- See example how to do a timeout.
- How do I run a command, and have it abort (timeout) after N seconds?
-
timeout.sh
— BASH script that kills a command after a timeout.