drone 1 format

This commit is contained in:
Sebastian Frank
2019-02-20 11:58:41 +01:00
parent 2115452e34
commit 93cf5fc0d3

View File

@@ -1,60 +1,59 @@
workspace: kind: pipeline
base: /go name: default
path: src/gitbase.de/apairon/mark2web
steps:
pipeline: - name: build for linux
build_mark2web_linux:
image: golang:latest image: golang:latest
environment: environment:
- CGO_ENABLED=0 CGO_ENABLED: 0
- GOOS=linux GOOS: linux
- GOARCH=amd64 GOARCH: amd64
commands: commands:
- git submodule update --init --recursive
- git fetch --tags - git fetch --tags
- ./build.sh - ./build.sh
test_example: - name: test with example content
image: alpine image: alpine
commands: commands:
- ./dist/mark2web-`cat VERSION`-linux-amd64 -version - ./dist/mark2web-`cat VERSION`-linux-amd64 -version
- ./dist/mark2web-`cat VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug - ./dist/mark2web-`cat VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug
build_mark2web_freebsd: - name: build for freebsd
image: golang:latest image: golang:latest
environment: environment:
- CGO_ENABLED=0 CGO_ENABLED: 0
- GOOS=freebsd GOOS: freebsd
- GOARCH=amd64 GOARCH: amd64
commands: commands:
- ./build.sh - ./build.sh
when: when:
event: [ tag ] event: [ tag ]
build_mark2web_darwin: - name: build for macos
image: golang:latest image: golang:latest
environment: environment:
- CGO_ENABLED=0 CGO_ENABLED: 0
- GOOS=darwin GOOS: darwin
- GOARCH=amd64 GOARCH: amd64
commands: commands:
- ./build.sh - ./build.sh
when: when:
event: [ tag ] event: [ tag ]
build_mark2web_windows: - name: build for windows
image: golang:latest image: golang:latest
environment: environment:
- CGO_ENABLED=0 CGO_ENABLED: 0
- GOOS=windows GOOS: windows
- GOARCH=amd64 GOARCH: amd64
- FILEEXT=.exe FILEEXT: .exe
commands: commands:
- ./build.sh - ./build.sh
when: when:
event: [ tag ] event: [ tag ]
build_docker: - name: build docker image
image: docker image: docker
commands: commands:
- cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web - cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web
@@ -65,7 +64,7 @@ pipeline:
branch: [ master ] branch: [ master ]
event: [ push ] event: [ push ]
deploy_website: - name: deploy website
image: apairon/mark2web:latest image: apairon/mark2web:latest
commands: commands:
- /mark2web -version - /mark2web -version
@@ -74,7 +73,7 @@ pipeline:
branch: [ master ] branch: [ master ]
event: [ push ] event: [ push ]
prepare_release: - name: prepare release
image: apairon/mark2web:latest image: apairon/mark2web:latest
commands: commands:
- gzip dist/* - gzip dist/*
@@ -82,9 +81,11 @@ pipeline:
when: when:
event: [ tag ] event: [ tag ]
gitea_relase: - name: gitea release
image: plugins/gitea-release image: plugins/gitea-release
secrets: [ plugin_api_key ] settings:
api_key:
from_secret: gitea_token
base_url: https://gitbase.de base_url: https://gitbase.de
files: files:
- dist/* - dist/*