From 08a08ab4e4857193e2e0682d7af879d92a946fb3 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Mon, 5 Oct 2020 17:49:10 -0500 Subject: [PATCH] Add drone config for CI --- .drone.yml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6a48a7b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,62 @@ +kind: pipeline +name: default +steps: + - name: build-prod + image: node:14 + commands: + - npm i + - npm install @ionic/cli + - ./node_modules/bin/ionic build --prod + - tar czf build.tar.gz www + - name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_api_key + base_url: https://code.garrettmills.dev + files: build.tar.gz + title: ${DRONE_TAG} + when: + event: tag + - name: send success notifications + image: plugins/webhook + settings: + urls: + from_secret: notify_webhook_url + content_type: application/json + template: | + { + "title": "Drone-CI [noded-frontend]", + "message": "Build ${DRONE_BUILD_NUMBER} completed successfully.", + "priority": 4 + } + when: + status: success + - name: send error notifications + image: plugins/webhook + settings: + urls: + from_secret: notify_webhook_url + content_type: application/json + template: | + { + "title": "Drone-CI [noded-frontend]", + "message": "Build ${DRONE_BUILD_NUMBER} failed!", + "priority": 6 + } + when: + status: failure +# - name: promote Flitter docs +# image: plugins/downstream +# settings: +# server: https://ci.garrettmills.dev +# token: +# from_secret: drone_token +# fork: false +# last_successful: true +# deploy: production +# repositories: +# - flitter/docs@master +# when: +# status: success +# event: tag \ No newline at end of file