diff --git a/.drone.yml b/.drone.yml index 140eae7..dcfb156 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,11 @@ kind: pipeline type: kubernetes name: back-end +# This pipeline tests the back-end using the integration tests. + +trigger: + event: [ push, pull_request ] + workspace: path: /drone/src @@ -27,6 +32,11 @@ kind: pipeline type: kubernetes name: front-end +# This pipeline tests the front-end by running it through a TypeScript compiler. + +trigger: + event: [ push, pull_request ] + workspace: path: /drone/src @@ -41,3 +51,31 @@ steps: image: node commands: - cd /drone/src/client && ./node_modules/.bin/tsc; cd .. + +--- +kind: pipeline +type: kubernetes +name: dockerhub + +# This pipeline builds the docker container and publishes it +# to DockerHub. The promotion target is "dockerhub". + +trigger: + event: [ promote ] + +steps: +- name: prepare + image: alpine/git + commands: + - "echo \"dev-$(git rev-parse HEAD),latest\" > .tags" + +- name: publish + image: plugins/docker + settings: + repo: sandervocke/mudbase + username: + from_secret: docker_username + password: + from_secret: docker_password + dockerfile: deploy/Dockerfile +