parent
b38ba11b6b
commit
97432a5daf
49
.drone.yml
49
.drone.yml
@ -12,12 +12,37 @@ pipeline:
|
||||
commands:
|
||||
- ./build.sh
|
||||
|
||||
build_website:
|
||||
test_example:
|
||||
image: alpine
|
||||
commands:
|
||||
- ls -la
|
||||
- ./dist/mark2web-linux-amd64 -version
|
||||
- ./dist/mark2web-linux-amd64 -in website -out html -create -logLevel debug
|
||||
- ./dist/mark2web-linux-amd64 -in example -out example_out -create -logLevel debug
|
||||
|
||||
build_mark2web_freebsd:
|
||||
image: golang:latest
|
||||
environment:
|
||||
- CGO_ENABLED=0
|
||||
- GOOS=freebsd
|
||||
- GOARCH=amd64
|
||||
commands:
|
||||
- ./build.sh
|
||||
when:
|
||||
branch: master
|
||||
event: push
|
||||
|
||||
build_mark2web_windows:
|
||||
image: golang:latest
|
||||
environment:
|
||||
- CGO_ENABLED=0
|
||||
- GOOS=windows
|
||||
- GOARCH=amd64
|
||||
- FILEEXT=.exe
|
||||
commands:
|
||||
- ./build.sh
|
||||
when:
|
||||
branch: master
|
||||
event: push
|
||||
|
||||
build_docker:
|
||||
image: docker
|
||||
@ -27,4 +52,22 @@ pipeline:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
when:
|
||||
branch: master
|
||||
event: push
|
||||
event: push
|
||||
|
||||
deploy_website:
|
||||
image: apairon/mark2web:latest
|
||||
commands:
|
||||
- ls -la
|
||||
- /mark2web -version
|
||||
- /mark2web -in website -out html -create -logLevel debug
|
||||
when:
|
||||
branch: master
|
||||
event: push
|
||||
|
||||
prepare_release:
|
||||
image: apairon/mark2web:latest
|
||||
commands:
|
||||
- ls -la dist/
|
||||
- gzip dist/*
|
||||
- ls -la dist/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM alpine
|
||||
RUN apk update && apk add openssh-client sshpass rsync && rm -r /var/cache/
|
||||
RUN apk update && apk add openssh-client sshpass rsync gzip && rm -r /var/cache/
|
||||
ADD dist/mark2web-linux-amd64 /mark2web
|
||||
CMD ["/mark2web"]
|
||||
|
2
build.sh
2
build.sh
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p dist
|
||||
go build -v -ldflags "-X main.Version=`cat VERSION` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o dist/mark2web-${GOOS}-${GOARCH}${ext}
|
||||
go build -v -ldflags "-X main.Version=`cat VERSION` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o dist/mark2web-${GOOS}-${GOARCH}${FILEEXT}
|
||||
|
Loading…
Reference in New Issue
Block a user