Skip to content

Instantly share code, notes, and snippets.

@vladfaust
Created January 10, 2019 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladfaust/b70a671075c1e7ce1dc854265db0329e to your computer and use it in GitHub Desktop.
Save vladfaust/b70a671075c1e7ce1dc854265db0329e to your computer and use it in GitHub Desktop.
Buildkite Crystal pipeline
steps:
- command:
- "shards install"
- "tar pczf lib.tar.gz lib/"
label: "Install shards"
artifact_paths: "lib.tar.gz"
plugins:
- docker#v2.1.0:
image: "crystallang/crystal:latest"
always-pull: true
- wait
- command:
- "buildkite-agent artifact download lib.tar.gz ./"
- "tar xzvf lib.tar.gz"
- "crystal spec"
label: "Run specs"
plugins:
- docker#v2.1.0:
image: "crystallang/crystal:latest"
always-pull: true
- command:
- "buildkite-agent artifact download lib.tar.gz ./"
- "tar xzvf lib.tar.gz"
- "crystal docs"
- "tar pczf docs.tar.gz docs/"
label: "Generate API docs"
artifact_paths: "docs.tar.gz"
plugins:
- docker#v2.1.0:
image: "crystallang/crystal:latest"
always-pull: true
- wait
- command:
- "git checkout -B gh-pages"
- "buildkite-agent artifact download docs.tar.gz ./"
- "tar xzvf docs.tar.gz"
- "cd docs && git add ."
- "git commit -m 'Deploy from the Buildkite pipeline' && git push origin api-docs || echo 'Skipping the deploy'"
label: "Deploy API docs"
branches: "master"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment