added .drone.yml
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
5c7ab05b46
commit
76da8820dc
|
@ -0,0 +1,37 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: prebuild
|
||||||
|
image: golang:latest
|
||||||
|
commands:
|
||||||
|
- IMAGE=dr.dnix.de/$DRONE_REPO_NAME
|
||||||
|
- REV=$(git rev-list HEAD --count)
|
||||||
|
- BUILDDATE=$(date)
|
||||||
|
- BRANCH=$DRONE_COMMIT_BRANCH
|
||||||
|
- VERSIONGO=version.go
|
||||||
|
- TAGS=.tags
|
||||||
|
- echo "Building image $IMAGE:$BRANCH-$REV"
|
||||||
|
- echo "package main" >$VERSIONGO
|
||||||
|
- echo "" >>$VERSIONGO
|
||||||
|
- echo "const (" >>$VERSIONGO
|
||||||
|
- echo -n " Version = \"" >>$VERSIONGO
|
||||||
|
- echo -n "$BRANCH" >>$VERSIONGO
|
||||||
|
- echo "\"" >>$VERSIONGO
|
||||||
|
- echo -n " Build = \"" >>$VERSIONGO
|
||||||
|
- echo -n "$REV" >>$VERSIONGO
|
||||||
|
- echo "\"" >>$VERSIONGO
|
||||||
|
- echo -n " Builddate = \"" >>$VERSIONGO
|
||||||
|
- echo -n "$BUILDDATE" >>$VERSIONGO
|
||||||
|
- echo "\"" >>$VERSIONGO
|
||||||
|
- echo ")" >>$VERSIONGO
|
||||||
|
- cat $VERSIONGO
|
||||||
|
- echo -n "$BRANCH-$REV" >$TAGS
|
||||||
|
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: dr.dnix.de/flokati
|
||||||
|
registry: dr.dnix.de
|
||||||
|
auto_tag: true
|
||||||
|
tags: latest
|
Loading…
Reference in New Issue