drone exec

This subcommand executes a local build.


NAME:
   drone exec - execute a local build

USAGE:
   drone exec [command options] [arguments...]

OPTIONS:
   --local                            build from local directory [$DRONE_LOCAL]
   --timeout value                    build timeout (default: 1h0m0s) [$DRONE_TIMEOUT]
   --volumes value                    build volumes [$DRONE_VOLUMES]
   --network value                    external networks [$DRONE_NETWORKS]
   --privileged value                 privileged plugins (default: "plugins/docker", "plugins/gcr", "plugins/ecr")
   --workspace-base value             (default: "/pipeline") [$DRONE_WORKSPACE_BASE]
   --workspace-path value             (default: "src") [$DRONE_WORKSPACE_PATH]
   --netrc-username value              [$DRONE_NETRC_USERNAME]
   --netrc-password value              [$DRONE_NETRC_PASSWORD]
   --netrc-machine value               [$DRONE_NETRC_MACHINE]
   --system-arch value                (default: "linux/amd64") [$DRONE_SYSTEM_ARCH]
   --system-name value                (default: "pipec") [$DRONE_SYSTEM_NAME]
   --system-link value                (default: "https://github.com/cncd/pipec") [$DRONE_SYSTEM_LINK]
   --repo-name value                   [$DRONE_REPO_NAME]
   --repo-link value                   [$DRONE_REPO_LINK]
   --repo-remote-url value             [$DRONE_REPO_REMOTE]
   --repo-private value                [$DRONE_REPO_PRIVATE]
   --build-number value               (default: 0) [$DRONE_BUILD_NUMBER]
   --parent-build-number value        (default: 0) [$DRONE_PARENT_BUILD_NUMBER]
   --build-created value              (default: 0) [$DRONE_BUILD_CREATED]
   --build-started value              (default: 0) [$DRONE_BUILD_STARTED]
   --build-finished value             (default: 0) [$DRONE_BUILD_FINISHED]
   --build-status value                [$DRONE_BUILD_STATUS]
   --build-event value                 [$DRONE_BUILD_EVENT]
   --build-link value                  [$DRONE_BUILD_LINK]
   --build-target value                [$DRONE_BUILD_TARGET]
   --commit-sha value                  [$DRONE_COMMIT_SHA]
   --commit-ref value                  [$DRONE_COMMIT_REF]
   --commit-refspec value              [$DRONE_COMMIT_REFSPEC]
   --commit-branch value               [$DRONE_COMMIT_BRANCH]
   --commit-message value              [$DRONE_COMMIT_MESSAGE]
   --commit-author-name value          [$DRONE_COMMIT_AUTHOR_NAME]
   --commit-author-avatar value        [$DRONE_COMMIT_AUTHOR_AVATAR]
   --commit-author-email value         [$DRONE_COMMIT_AUTHOR_EMAIL]
   --prev-build-number value          (default: 0) [$DRONE_PREV_BUILD_NUMBER]
   --prev-build-created value         (default: 0) [$DRONE_PREV_BUILD_CREATED]
   --prev-build-started value         (default: 0) [$DRONE_PREV_BUILD_STARTED]
   --prev-build-finished value        (default: 0) [$DRONE_PREV_BUILD_FINISHED]
   --prev-build-status value           [$DRONE_PREV_BUILD_STATUS]
   --prev-build-event value            [$DRONE_PREV_BUILD_EVENT]
   --prev-build-link value             [$DRONE_PREV_BUILD_LINK]
   --prev-commit-sha value             [$DRONE_PREV_COMMIT_SHA]
   --prev-commit-ref value             [$DRONE_PREV_COMMIT_REF]
   --prev-commit-refspec value         [$DRONE_PREV_COMMIT_REFSPEC]
   --prev-commit-branch value          [$DRONE_PREV_COMMIT_BRANCH]
   --prev-commit-message value         [$DRONE_PREV_COMMIT_MESSAGE]
   --prev-commit-author-name value     [$DRONE_PREV_COMMIT_AUTHOR_NAME]
   --prev-commit-author-avatar value   [$DRONE_PREV_COMMIT_AUTHOR_AVATAR]
   --prev-commit-author-email value    [$DRONE_PREV_COMMIT_AUTHOR_EMAIL]
   --job-number value                 (default: 0) [$DRONE_JOB_NUMBER]
   


If your pipeline uses secrets, these can be injected locally simply by passing environment variables:

$ MY_SECRET=mybigsecret drone exec

Running a full matrix build is not supported at this time, however you can execute a single matrix axis by passing environment variables to the drone exec command:

$ GO_VERSION=1.4 drone exec

Is there a mistake on this page? Please let us know or edit this page.