{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Organize your Sheepfiles","type":"basic","slug":"organize-your-sheepfiles","excerpt":"Spread your jobs across multiple files","body":"You may declare as many jobs as you want into a single _Sheepfile_. As the number of jobs increase, you may want to spread your jobs across multiple files. You may use `load` into your main _Sheepfile_ to reference other configuration files or even directories:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Reference a single file using a relative path\\nload 'path/to/another/Sheepfile.1'\\n\\n# Reference a single file using an absolute path\\nload '~/backups/config/Sheepfile.2'\\n\\n# Reference all files in a directory using a relative path\\nload 'path/to/directory'\\n\\n# Reference all files in a directory using an absolute path\\nload '~/backups/config'\\n\\n# All statements available in the DSL can still be used\\njob \\\"a-job\\\" do\\n  ...\\nend\",\n      \"language\": \"ruby\",\n      \"name\": \"Sheepfile\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Paths\",\n  \"body\": \"Relative and absolute paths are supported. If you use relative paths, they'll be relative to the top-level configuration file.\"\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5582f41f81672a3900bb4fe9","user":"54bf8cd9dcfc4d0d00a1a19e","githubsync":"","createdAt":"2015-06-18T16:38:55.843Z","category":{"sync":{"isSync":false,"url":""},"pages":["54fda39021538c21006c49b6","54fda39021538c21006c49b7","54fda39021538c21006c49b8","54fda39021538c21006c49b9","54fda39021538c21006c49ba","54fda39021538c21006c49bb","54fda5d10c05ea25004ce0cd","5582f41f81672a3900bb4fe9"],"title":"Documentation","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"54fda38f21538c21006c49a7","createdAt":"2014-11-08T14:11:40.826Z","project":"545e249c7ca5470800b3a1b2","version":"54fda38e21538c21006c49a6","__v":3},"version":{"version":"0.5.0","version_clean":"0.5.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["54fda38f21538c21006c49a7","54fda38f21538c21006c49a8","54fda38f21538c21006c49a9","54fda38f21538c21006c49aa","54fda38f21538c21006c49ab","54fda3d347f93619001d2ae2","54fea8975c4ab10d00ef4279"],"_id":"54fda38e21538c21006c49a6","__v":3,"createdAt":"2015-03-09T13:43:42.927Z","forked_from":"54eb4535615ffc19003059f0","project":"545e249c7ca5470800b3a1b2","releaseDate":"2015-03-09T13:43:42.927Z"},"__v":5,"project":"545e249c7ca5470800b3a1b2"}

Organize your Sheepfiles

Spread your jobs across multiple files

You may declare as many jobs as you want into a single _Sheepfile_. As the number of jobs increase, you may want to spread your jobs across multiple files. You may use `load` into your main _Sheepfile_ to reference other configuration files or even directories: [block:code] { "codes": [ { "code": "# Reference a single file using a relative path\nload 'path/to/another/Sheepfile.1'\n\n# Reference a single file using an absolute path\nload '~/backups/config/Sheepfile.2'\n\n# Reference all files in a directory using a relative path\nload 'path/to/directory'\n\n# Reference all files in a directory using an absolute path\nload '~/backups/config'\n\n# All statements available in the DSL can still be used\njob \"a-job\" do\n ...\nend", "language": "ruby", "name": "Sheepfile" } ] } [/block] [block:callout] { "type": "info", "title": "Paths", "body": "Relative and absolute paths are supported. If you use relative paths, they'll be relative to the top-level configuration file." } [/block]