├── .buildkite ├── hooks │ ├── post-command │ └── pre-command ├── pipeline.yml ├── screenshot.png └── template.yml ├── License.md ├── Readme.md ├── artifacts ├── image.gif └── thumbsup.txt ├── renovate.json └── script.sh /.buildkite/hooks/post-command: -------------------------------------------------------------------------------- 1 | echo "This is an example of a post-command hook from .buildkite/hooks/post-command" 2 | -------------------------------------------------------------------------------- /.buildkite/hooks/pre-command: -------------------------------------------------------------------------------- 1 | echo "This is an example of a pre-command hook from .buildkite/hooks/pre-command" 2 | -------------------------------------------------------------------------------- /.buildkite/pipeline.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - label: ":hammer: Example Script" 3 | command: "script.sh" 4 | artifact_paths: "artifacts/*" 5 | -------------------------------------------------------------------------------- /.buildkite/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buildkite/bash-example/b44cffc23958cfbbc299071176d02b864e04f2a2/.buildkite/screenshot.png -------------------------------------------------------------------------------- /.buildkite/template.yml: -------------------------------------------------------------------------------- 1 | name: "Bash Example" 2 | description: "An example repository you can use as a test project with Buildkite" 3 | emoji: ":bash:" 4 | steps: 5 | - command: "buildkite-agent pipeline upload" 6 | label: ":pipeline:" 7 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Buildkite Pty Ltd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Buildkite Bash Pipeline Example 2 | 3 | [![Build status](https://badge.buildkite.com/aab023f2f33ab06766ed6236bc40caf0df1d9448e4f590d0ee.svg?branch=main)](https://buildkite.com/buildkite/bash-example) 4 | [![Add to Buildkite](https://buildkite.com/button.svg)](https://buildkite.com/new) 5 | 6 | This repository is an example [Buildkite](https://buildkite.com/) pipeline for running a simple bash script, [script.sh](script.sh). 7 | 8 | The script simply prints some debug output with an inline image, some artifacts, and exits with a success code (0). 9 | 10 | See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running, or [Add to Buildkite](https://buildkite.com/new) to try it yourself. 11 | 12 | Screenshot of Buildkite Bash example pipeline 13 | 14 | ## License 15 | 16 | See [License.md](License.md) (MIT) 17 | -------------------------------------------------------------------------------- /artifacts/image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buildkite/bash-example/b44cffc23958cfbbc299071176d02b864e04f2a2/artifacts/image.gif -------------------------------------------------------------------------------- /artifacts/thumbsup.txt: -------------------------------------------------------------------------------- 1 | $$$$ 2 | $$__$ 3 | $___$$ 4 | $___$$ 5 | $$___$$ 6 | $____$$ 7 | $$____$$$ 8 | $$_____$$ 9 | $$______$$ 10 | $_______$$ 11 | $$$$$$$________$$ 12 | $$$_______________$$$$$$ 13 | $$____$$$$____________$$$ 14 | $___$$$__$$$____________$$ 15 | $$________$$$____________$ 16 | $$____$$$$$$____________$ 17 | $$$$$$$____$$___________$ 18 | $$_______$$$$___________$ 19 | $$$$$$$$$__$$_________$$ 20 | $________$$$$_____$$$$ 21 | $$____$$$$$$____$$$$$$ 22 | $$$$$$____$$__$$ 23 | $_____$$$_$$$ 24 | $$$$$$$$$$ -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "minor": { "automerge": true }, 6 | "patch": { "automerge": true }, 7 | "requiredStatusChecks": null, 8 | "prHourlyLimit": 0 9 | } 10 | -------------------------------------------------------------------------------- /script.sh: -------------------------------------------------------------------------------- 1 | set -eo pipefail 2 | 3 | echo "--- :package: Build job checkout directory" 4 | 5 | pwd 6 | ls -la 7 | 8 | 9 | echo "--- :evergreen_tree: Build job environment" 10 | 11 | env 12 | 13 | 14 | echo "+++ :hammer: Example tests" 15 | 16 | echo -e "\033[33mCongratulations!\033[0m You've successfully run your first build on Buildkite! 👍 17 | 18 | \033[33m$(cat artifacts/thumbsup.txt)\033[0m 19 | 20 | If you have any questions or need help email support@buildkite.com, we'd be happy to help! 21 | 22 | \033[31m<3\033[0m Buildkite 23 | " 24 | 25 | 26 | echo "+++ :frame_with_picture: Inline image uploaded as a build artifact" 27 | 28 | function inline_image { 29 | printf '\033]1338;url='"$1"';alt='"$2"'\a\n' 30 | } 31 | 32 | inline_image 'artifact://artifacts/image.gif' 'Rainbows' 33 | --------------------------------------------------------------------------------