Browse Source

Add drone-ci

master
Gisle Aune 5 years ago
parent
commit
3e6936b4d3
  1. 96
      .drone.yml
  2. 6
      .idea/vcs.xml
  3. 56
      .idea/workspace.xml

96
.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

6
.idea/vcs.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

56
.idea/workspace.xml

@ -16,15 +16,6 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="450"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/database/drivers/bolt/period.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8910">
<caret line="172" column="18" selection-start-line="172" selection-start-column="18" selection-end-line="172" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/models/user.go"> <entry file="file://$PROJECT_DIR$/models/user.go">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -34,7 +25,7 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.go"> <entry file="file://$PROJECT_DIR$/main.go">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1386"> <state relative-caret-position="1386">
@ -76,6 +67,15 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/.drone.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="7" column="21" selection-start-line="7" selection-start-column="21" selection-end-line="7" selection-end-column="21" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/database/repositories/period.go"> <entry file="file://$PROJECT_DIR$/database/repositories/period.go">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -138,6 +138,9 @@
</findStrings> </findStrings>
</component> </component>
<component name="GOROOT" path="/usr/lib/go" /> <component name="GOROOT" path="/usr/lib/go" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GoLibraries"> <component name="GoLibraries">
<option name="indexEntireGoPath" value="false" /> <option name="indexEntireGoPath" value="false" />
</component> </component>
@ -186,6 +189,7 @@
<option value="$PROJECT_DIR$/models/period.go" /> <option value="$PROJECT_DIR$/models/period.go" />
<option value="$PROJECT_DIR$/Dockerfile" /> <option value="$PROJECT_DIR$/Dockerfile" />
<option value="$PROJECT_DIR$/main.go" /> <option value="$PROJECT_DIR$/main.go" />
<option value="$PROJECT_DIR$/.drone.yml" />
</list> </list>
</option> </option>
</component> </component>
@ -197,6 +201,9 @@
<option name="width" value="3840" /> <option name="width" value="3840" />
<option name="height" value="2119" /> <option name="height" value="2119" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectView"> <component name="ProjectView">
<navigator proportions="" version="1"> <navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
@ -223,6 +230,7 @@
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="DefaultGoTemplateProperty" value="Go File" /> <property name="DefaultGoTemplateProperty" value="Go File" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="go.gopath.indexing.explicitly.defined" value="true" /> <property name="go.gopath.indexing.explicitly.defined" value="true" />
<property name="go.import.settings.migrated" value="true" /> <property name="go.import.settings.migrated" value="true" />
@ -396,13 +404,6 @@
<SUITE FILE_PATH="coverage/stufflog$go_test_github_com_gisle_stufflog_database_drivers_bolt.out" NAME="go test github.com/gisle/stufflog/database/drivers/bolt Coverage Results" MODIFIED="1569684100617" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="GoCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" /> <SUITE FILE_PATH="coverage/stufflog$go_test_github_com_gisle_stufflog_database_drivers_bolt.out" NAME="go test github.com/gisle/stufflog/database/drivers/bolt Coverage Results" MODIFIED="1569684100617" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="GoCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file:///usr/lib/go/src/strings/builder.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="648">
<caret line="22" column="37" lean-forward="true" selection-start-line="22" selection-start-column="37" selection-end-line="22" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/go.sum"> <entry file="file://$PROJECT_DIR$/go.sum">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
@ -740,13 +741,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1134">
<caret line="21" column="76" selection-start-line="21" selection-start-column="76" selection-end-line="21" selection-end-column="76" />
</state>
</provider>
</entry>
<entry file="file:///usr/lib/go/src/net/http/fs.go"> <entry file="file:///usr/lib/go/src/net/http/fs.go">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="609"> <state relative-caret-position="609">
@ -764,5 +758,19 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1134">
<caret line="21" column="76" selection-start-line="21" selection-start-column="76" selection-end-line="21" selection-end-column="76" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.drone.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="7" column="21" selection-start-line="7" selection-start-column="21" selection-end-line="7" selection-end-column="21" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>
Loading…
Cancel
Save