diff --git a/.drone.yml b/.drone.yml index ead719fd18d..de87e1023d0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,60 +1,122 @@ --- -pipeline: - build: - # Do things - privileged: true - image: docker:stable-dind - volumes: - - /var/run/docker.sock:/var/run/docker.sock - commands: - - docker build --pull -f Dockerfile.prod . - when: - event: [pull_request] +kind: pipeline +name: pull-request - publish-dev: - group: publish - image: plugins/docker - dockerfile: Dockerfile.dev - repo: rancher/docs +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: plugins/docker + settings: context: . - tag: dev - secrets: [docker_username, docker_password] - when: - branch: master - event: push - - publish-staging: - group: publish - image: plugins/docker - dockerfile: Dockerfile.staging - repo: rancher/docs - context: . - tag: staging - secrets: [docker_username, docker_password] - when: - branch: master - event: push - - publish-latest: - group: publish - image: plugins/docker dockerfile: Dockerfile.prod + dry_run: true repo: rancher/docs - context: . - tag: latest - secrets: [docker_username, docker_password] - when: - branch: master - event: push + when: + event: + - pull_request - publish-latest-algolia: - image: plugins/docker +--- +kind: pipeline +name: dev + +platform: + os: linux + arch: amd64 + +steps: +- name: publish-dev + pull: default + image: plugins/docker + settings: + context: . + dockerfile: Dockerfile.dev + group: publish + repo: rancher/docs + tag: dev + password: + from_secret: docker_password + username: + from_secret: docker_username + when: + branch: + - master + event: + - push + +--- +kind: pipeline +name: staging + +platform: + os: linux + arch: amd64 + +steps: +- name: publish-staging + pull: default + image: plugins/docker + settings: + context: . + dockerfile: Dockerfile.staging + group: publish + repo: rancher/docs + tag: staging + password: + from_secret: docker_password + username: + from_secret: docker_username + when: + branch: + - staging + event: + - push + +--- +kind: pipeline +name: production + +platform: + os: linux + arch: amd64 + +steps: +- name: publish-latest + pull: default + image: plugins/docker + settings: + context: . + dockerfile: Dockerfile.prod + group: publish + repo: rancher/docs + tag: latest + password: + from_secret: docker_password + username: + from_secret: docker_username + when: + branch: + - master + event: + - push + +- name: publish-algolia + pull: default + image: plugins/docker + settings: + context: . dockerfile: Dockerfile.algolia repo: rancher/docs - context: . tag: algolia - secrets: [docker_username, docker_password] - when: - branch: master - event: push - + password: + from_secret: docker_password + username: + from_secret: docker_username + when: + branch: + - master + event: + - push