From 1376773a3a8d1a5a0bd2477219959af1c86488b1 Mon Sep 17 00:00:00 2001 From: Long Nguyen Date: Wed, 22 Mar 2017 16:50:45 -0400 Subject: [PATCH] added git docs to artifacts --- .../docs/job-specification/artifact.html.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/website/source/docs/job-specification/artifact.html.md b/website/source/docs/job-specification/artifact.html.md index 3bc170477..89d5e2c20 100644 --- a/website/source/docs/job-specification/artifact.html.md +++ b/website/source/docs/job-specification/artifact.html.md @@ -88,6 +88,31 @@ artifact { } ``` +### Download using git + +This example downloads the artifact from the provided github url and places it at +`local/repo`, as specified by the optional `destination` parameter. + +```hcl +artifact { + source = "git::https://github.com/example/nomad-examples" + destination = "local/repo" +} +``` + +To download from private repo, sshkeys need to be set. The key must be +base64-encoded string. Run `base64 -w0 ` + +```hcl +artifact { + source = "git@github.com:example/nomad-examples" + destination = "local/repo" + options { + sshkeys = "" + } +} +``` + ### Download and Unarchive This example downloads and unarchives the result in `local/file`. Because the