Job Type: Git

October 12, 2018 ยท View on GitHub

It's not necessary to have all your job definitions in your own project. With the git job type you can include job definitions for any accessible git repository.

An example git job definition:

{
    "version": 1,
    "jobs": [{
        "type": "git",
        "name": "some-external-jobs",
        "clone_url": "https://github.com/SAP/infrabox-examples.git",
        "commit": "master",
        "depends_on": [ ... ],
        "environment": { ... },
        "infrabox_file": "infrabox.json"
    }]
}
NameRequiredTypeDefaultDescription
typetruestringHas to be "git" to include a workflow from a repository
nametruestringName of the job
clone_urltruestringUrl to clone the git repository
branchfalsestringmasterbranch to clone initially
committruestringbranch name or commit sha
depends_onfalseDependency Configuration[]Jobs may have dependencies. You can list all jobs which should finish before the current job may be executed.
environmentfalseEnvironment Variables{}Can be used to set environment variables for the job.
infrabox_filefalsestringinfrabox.jsonPath to an infrabox.json file in the repo to be used as sub-workflow