From 3e6936b4d3576dc4b42377102e275c6e27e1285b Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Tue, 4 Feb 2020 18:58:01 +0100 Subject: [PATCH] Add drone-ci --- .drone.yml | 96 +++++++++++++++++++++++++++++++++++++++++++++ .idea/vcs.xml | 6 +++ .idea/workspace.xml | 56 ++++++++++++++------------ 3 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 .drone.yml create mode 100644 .idea/vcs.xml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..87ae303 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,96 @@ +name: stufflog + +kind: pipeline +type: docker + +steps: + - name: go-build-1.11 + image: golang:1.11 + commands: + - go mod download + - CGO_ENABLED=0 go build -ldflags "-w -s" -o /build/lektura main.go + when: + event: + exclude: + - tag + + - name: go-build-1.12 + image: golang:1.12 + commands: + - go mod download + - CGO_ENABLED=0 go build -ldflags "-w -s" -o /build/lektura main.go + when: + event: + exclude: + - tag + + - name: go-build-1.13 + image: golang:1.13 + commands: + - go mod download + - CGO_ENABLED=0 go build -ldflags "-w -s" -o /build/lektura main.go + when: + event: + exclude: + - tag + + - name: go-test + image: golang:1.13 + commands: + - go test -v ./... + when: + event: + exclude: + - tag + + - name: js-build + image: node:10.16.1 + commands: + - cd svelte-ui + - npm install + - npm run build + when: + event: + exclude: + - tag + + - name: docker-test + image: plugins/docker + settings: + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: vmaple/stufflog + dry_run: true + when: + event: + exclude: + - tag + + - name: docker-release-tag + image: plugins/docker + settings: + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: vmaple/stufflog + when: + event: + - tag + + - name: docker-release-latest + image: plugins/docker + settings: + auto_tag: false + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: vmaple/stufflog + when: + event: + - tag \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 290e987..561ccc5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -16,15 +16,6 @@ - - - - - - - - - @@ -34,7 +25,7 @@ - + @@ -76,6 +67,15 @@ + + + + + + + + + @@ -138,6 +138,9 @@ + + @@ -186,6 +189,7 @@ @@ -197,6 +201,9 @@