Host snippets with a git backend. Like Gists but OpenSource. https://gist.sigpipe.me/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

130 lines
2.8 KiB

workspace:
base: /srv/app
path: src/dev.sigpipe.me/dashie/git.txt
clone:
git:
image: plugins/git:1
depth: 50
tags: true
pipeline:
test:
image: webhippie/golang:edge
pull: true
environment:
TAGS: sqlite
GOPATH: /srv/app
commands:
- apk -U add libmagic file-dev libgit2 libgit2-dev
- make test
when:
event: [ push, tag, pull_request ]
build:
image: webhippie/golang:edge
pull: true
environment:
TAGS: sqlite
GOPATH: /srv/app
commands:
- apk -U add libmagic file-dev libgit2 libgit2-dev
- make clean
- make vet
- make lint
- make misspell-check
- make build
when:
event: [ push, tag, pull_request ]
static_Linux_x86_64:
image: webhippie/golang:edge
pull: true
environment:
TAGS: sqlite
GOPATH: /srv/app
commands:
- apk update
- apk -U add libmagic file-dev libgit2 libgit2-dev
- make clean
- make build
- make release-lx64
when:
event: [ push, tag ]
release:
image: plugins/s3
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: drone-git.txt
region: us-east-1
endpoint: https://s3.sigpipe.me
path_style: true
strip_prefix: dist/release/
source: dist/release/*.tgz
target: /git.txt/${DRONE_TAG##v}
when:
event: [ tag ]
release:
image: plugins/s3
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: drone-git.txt
region: us-east-1
endpoint: https://s3.sigpipe.me
path_style: true
strip_prefix: dist/release/
source: dist/release/*.tgz
target: /git.txt/master
when:
event: [ push ]
branch: [ master ]
# static:
# image: karalabe/xgo-latest:latest
# pull: true
# environment:
# TAGS: sqlite
# GOPATH: /srv/app
# commands:
# - make clean
# - make release
# when:
# event: [ push, tag ]
#
# release:
# image: plugins/s3:1
# pull: true
# secrets: [ s3_ak, s3_sk ]
# bucket: drone-git.txt
# endpoint: https://s3.sigpipe.me
# path_style: true
# strip_prefix: dist/release/
# source: dist/release/*
# target: /git.txt/${DRONE_TAG##v}
# when:
# event: [ tag ]
#
# release:
# image: plugins/s3:1
# pull: true
# secrets: [ s3_ak, s3_sk ]
# bucket: releases
# endpoint: https://s3.sigpipe.me
# path_style: true
# strip_prefix: dist/release/
# source: dist/release/*
# target: /git.txt/master
# when:
# event: [ push ]
# branch: [ master ]
notify:
image: plugins/slack
channel: gitea
secrets:
- SLACK_WEBHOOK
when:
event: [ push, tag, pull_request ]
status: [ changed, failure, success ]