Migrating from 0.8
The pipeline configuration syntax has changed significantly in Drone 1.0.0. This syntax is inspired by kubernetes and should be familar to a large portion of the Drone community that has already adopted kubernetes.
Example of the legacy configuation:
pipeline: build: image: golang commands: - go build - go test services: redis: image: redis:latest
Example of the latest configuration:
kind: pipeline name: default steps: - name: build image: golang commands: - go build - go test services: - name: redis image: redis:latest
It is important to note that you can use the 0.8 legacy configuration format with 1.0.0. We have tried to make this version backward compatible to minimize distribution to existing teams and projects.
If you want to learn more about the latest syntax, please see the pipeline configuration section of the documentation.
The plugin configuration syntax has chanaged in this latest version. Plugin paramters are now defined in the
settings block of the step. Over time plugin documentation will be adjusted to reflect this change.
steps: - name: publish image: plugins/docker settings: repo: octocat/hello-world username: octocat password: correct-horse-battery-staple
The secret syntax has been improved to be more explicity. Named secrets are passed to pipeline steps as environment variables using the following syntax:
steps: - name: publish image: golang environment: GOOS: linux PASSWORD: from_secret: password
You can also source plugin configuration values from named secrets using similar syntax:
steps: - name: publish image: plugins/docker settings: repo: octocat/hello-world username: octocat password: from_secret: docker_password
This latest version includes a new clone plugin with improved logic for cloning pull requests. To customize or replace the default clone plugin, please see the clone documentation.
kind: pipeline name: default clone: depth: true steps: - name: build image: golang commands: - go build - go test