Run a Bash script
Execute a custom bash script
Use template →1steps:
2 - label: ":hammer: Example script"
3 command: |
4 echo -e "\033[33mCongratulations!\033[0m You've successfully run your first build on Buildkite! 👍
5
6 \033[33m$(cat artifacts/thumbsup.txt)\033[0m
7 If you have any questions or need help email support@buildkite.com, we'd be happy to help!
8 \033[31m<3\033[0m Buildkite
9 "
10
11 echo "+++ :frame_with_picture: Inline image uploaded as a build artifact"
12 function inline_image {
13 printf '\033]1338;url='"$1"';alt='"$2"'\a\n'
14 }
15
16 inline_image 'artifact://artifacts/image.gif' 'Rainbows'
- Languages
- Bash
- Use cases
- Continuous integration
Run a Bash script
This template gives you a continuous integration (CI) pipeline that runs a Bash script to print a message in the build logs.
At a glance:
- Uses Bash
- Defines the script inline
How it works
This template:
- Prints a message in the build log.
- Uploads an artifact.
Next steps
After you select Use template, you’ll:
- Connect the Git repository with your code.
- Configure the compute—run locally, on-premises, or in the cloud.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue , or reach out to support.