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

hooks: handles skip_checkout configuration #1

Merged
merged 9 commits into from Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
@@ -1,2 +1,13 @@
# Smooth Git
Set up Git projects smoothly on Buildkite :butter: :kite:
# Smooth Checkout
All the things you need during a Buildkite checkout :butter: :kite:

# Usage

## Repository-less builds
```yml
steps:
- command: echo "Skips checking out Git project in checkout"
plugins:
- hasura/smooth-checkout#main:
skip_checkout: true
```
6 changes: 5 additions & 1 deletion hooks/checkout
Expand Up @@ -2,4 +2,8 @@

set -euo pipefail

echo "BUILDKITE_PLUGIN_SMOOTH_GIT_MODE is $BUILDKITE_PLUGIN_SMOOTH_GIT_MODE"
if [[ "$BUILDKITE_PLUGIN_SMOOTH_CHECKOUT_SKIP_CHECKOUT" == "true" ]]; then
echo "--- :fast_forward: skipping checkout"
echo "Because 'skip_checkout' configuration was set as true in pipeline YAML"
exit 0
fi
8 changes: 4 additions & 4 deletions plugin.yml
@@ -1,9 +1,9 @@
name: Smooth Git
description: Set up Git projects smoothly on Buildkite
name: Smooth Checkout
description: All the things you need during a Buildkite checkout
author: https://github.com/hasura
requirements: []
configuration:
properties:
mode:
type: string
skip_checkout:
type: boolean
additionalProperties: false