From 9d9a068db823a2b7d6c2e9eb1d54aba8793b7a71 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 8 Jul 2015 00:06:19 -0700 Subject: [PATCH] moved setup docs to setup dir --- doc/build/README.md | 4 +-- doc/build/badges.md | 0 doc/build/deploy.md | 36 ++++++++++--------- doc/build/env.md | 8 ++--- doc/build/overview.md | 2 +- doc/build/services.md | 18 ---------- doc/setup/README.md | 9 +++++ .../bitbucket.md} | 0 doc/{setup-docker.md => setup/docker.md} | 0 doc/{setup-github.md => setup/github.md} | 0 doc/{setup-gitlab.md => setup/gitlab.md} | 0 doc/{install-docker.md => setup/install.md} | 0 doc/{ => setup}/plugins.md | 0 doc/{setup-postgres.md => setup/postgres.md} | 0 doc/{ => setup}/setup-agents.md | 0 doc/{setup-sqlite.md => setup/sqlite.md} | 0 16 files changed, 33 insertions(+), 44 deletions(-) create mode 100644 doc/build/badges.md create mode 100644 doc/setup/README.md rename doc/{setup-bitbucket.md => setup/bitbucket.md} (100%) rename doc/{setup-docker.md => setup/docker.md} (100%) rename doc/{setup-github.md => setup/github.md} (100%) rename doc/{setup-gitlab.md => setup/gitlab.md} (100%) rename doc/{install-docker.md => setup/install.md} (100%) rename doc/{ => setup}/plugins.md (100%) rename doc/{setup-postgres.md => setup/postgres.md} (100%) rename doc/{ => setup}/setup-agents.md (100%) rename doc/{setup-sqlite.md => setup/sqlite.md} (100%) diff --git a/doc/build/README.md b/doc/build/README.md index 805427795..72b8210fc 100644 --- a/doc/build/README.md +++ b/doc/build/README.md @@ -1,9 +1,9 @@ * [Overview](overview.md) -* [Environment](environment.md) +* [Variables](env.md) * [Clone](clone.md) * [Build](build.md) * [Services](services.md) * [Publish](publish.md) * [Deploy](deploy.md) * [Notify](notify.md) -* [Matrix](martrix.md) +* [Matrix](matrix.md) diff --git a/doc/build/badges.md b/doc/build/badges.md new file mode 100644 index 000000000..e69de29bb diff --git a/doc/build/deploy.md b/doc/build/deploy.md index 052e227fb..ec237ecad 100644 --- a/doc/build/deploy.md +++ b/doc/build/deploy.md @@ -11,6 +11,24 @@ deploy: token: f10e2821bbbea5 ``` +## Deploy conditions + +Use the `when` attribute to limit deployments to a specific branch: + +```yaml +deploy: + heroku: + when: + branch: master + + # you can also do simple matching + + google_appengine: + when: + branch: feature/* +``` + + diff --git a/doc/build/env.md b/doc/build/env.md index d1dd1dcc2..018ee1d99 100644 --- a/doc/build/env.md +++ b/doc/build/env.md @@ -1,8 +1,4 @@ -# Environment - -The build environment is largely defined by the Docker image you specify in the `.drone.yml`. In addition, Drone will inject default environment variable and private variables. - -## Environment Variables +# Variables The build environment has access to the following environment variables: @@ -17,7 +13,7 @@ The build environment has access to the following environment variables: ## Private Variables -Drone allows you to store sensitive data external to the `.drone.yml` and inject at runtime. You can declare private variables in the repository settings screen. These variables are injected into the `.drone.yml` at runtime using the `$$` notation. +Drone also lets you to store sensitive data external to the `.drone.yml` and inject at runtime. You can declare private variables in the repository settings screen. These variables are injected into the `.drone.yml` at runtime using the `$$` notation. An example `.drone.yml` expecting the `HEROKU_TOKEN` private variable: diff --git a/doc/build/overview.md b/doc/build/overview.md index c57ac2f51..13f798416 100644 --- a/doc/build/overview.md +++ b/doc/build/overview.md @@ -2,7 +2,7 @@ In order to configure your build, you must include a `.drone.yml` file in the root of your repository. This documentation describes the `.drone.yml` configuration file format. -Example `.drone.yml` file for a Go repository: +Example `.drone.yml` for a Go repository: ```yaml build: diff --git a/doc/build/services.md b/doc/build/services.md index 655416b5a..746b79a04 100644 --- a/doc/build/services.md +++ b/doc/build/services.md @@ -38,21 +38,3 @@ The service container configuration options: * `net` - sets the container [network mode](https://docs.docker.com/articles/networking/#container-networking) [1] [1] Some build options are disabled for security reasons, including `volumes`, `privileged` and `net`. To enable these options, a system administrator must white-list your repository as trusted. This can be done via the repository settings screen. - -## Service images - -The `image` attribute supports any valid Docker image name: - -```yaml -# Docker library image -image: postgres - -# Docker library image, with tag -image: postgres:9.2 - -# Docker image, full name, with tag -image: library/postgres:9.2 - -# fully qualified Docker image URI, with tag -image: index.docker.io/library/postgres:9.2 -``` diff --git a/doc/setup/README.md b/doc/setup/README.md new file mode 100644 index 000000000..33e5991bd --- /dev/null +++ b/doc/setup/README.md @@ -0,0 +1,9 @@ +* [Install](#) + * [Docker](install.md) +* [Remotes](#) + * [GitHub](github.md) + * [GitLab](gitlab.md) + * [Bitbucket](bitbucket.md) +* [Database](#) + * [SQLite](sqlite.md) + * [Postgres](postgres.md) diff --git a/doc/setup-bitbucket.md b/doc/setup/bitbucket.md similarity index 100% rename from doc/setup-bitbucket.md rename to doc/setup/bitbucket.md diff --git a/doc/setup-docker.md b/doc/setup/docker.md similarity index 100% rename from doc/setup-docker.md rename to doc/setup/docker.md diff --git a/doc/setup-github.md b/doc/setup/github.md similarity index 100% rename from doc/setup-github.md rename to doc/setup/github.md diff --git a/doc/setup-gitlab.md b/doc/setup/gitlab.md similarity index 100% rename from doc/setup-gitlab.md rename to doc/setup/gitlab.md diff --git a/doc/install-docker.md b/doc/setup/install.md similarity index 100% rename from doc/install-docker.md rename to doc/setup/install.md diff --git a/doc/plugins.md b/doc/setup/plugins.md similarity index 100% rename from doc/plugins.md rename to doc/setup/plugins.md diff --git a/doc/setup-postgres.md b/doc/setup/postgres.md similarity index 100% rename from doc/setup-postgres.md rename to doc/setup/postgres.md diff --git a/doc/setup-agents.md b/doc/setup/setup-agents.md similarity index 100% rename from doc/setup-agents.md rename to doc/setup/setup-agents.md diff --git a/doc/setup-sqlite.md b/doc/setup/sqlite.md similarity index 100% rename from doc/setup-sqlite.md rename to doc/setup/sqlite.md