mmflokati/.drone.yml

30 lines
998 B
YAML
Raw Normal View History

2018-02-20 22:59:52 +00:00
pipeline:
2018-02-22 21:52:52 +00:00
build:
image: plugins/docker
2018-02-20 22:59:52 +00:00
commands:
2018-02-22 18:01:39 +00:00
- REV=$(git rev-list HEAD --count)
- BUILDDATE=$(date)
- BRANCH=$DRONE_COMMIT_BRANCH
- VERSIONGO=version.go
2018-02-22 17:15:55 +00:00
- echo "Building image $IMAGE:$BRANCH-$REV"
- echo "package main" >$VERSIONGO
- echo "" >>$VERSIONGO
- echo "const (" >>$VERSIONGO
- echo -n " FlokatiVersion = \"" >>$VERSIONGO
- echo -n "$BRANCH" >>$VERSIONGO
- echo "\"" >>$VERSIONGO
- echo -n " FlokatiBuild = \"" >>$VERSIONGO
- echo -n "$REV" >>$VERSIONGO
- echo "\"" >>$VERSIONGO
- echo -n " FlokatiBuilddate = \"" >>$VERSIONGO
- echo -n "$BUILDDATE" >>$VERSIONGO
- echo "\"" >>$VERSIONGO
- echo ")" >>$VERSIONGO
2018-02-22 17:49:11 +00:00
- cat version.go
2018-02-22 21:52:52 +00:00
- docker build -t dr.dnix.de/mmflokati:${DRONE_COMMIT_BRANCH}-${REV} .
2018-02-22 21:47:19 +00:00
- docker push dr.dnix.de/mmflokati:${DRONE_COMMIT_BRANCH}-${REV}
2018-02-22 18:49:15 +00:00
deploy:
image: ubuntu:16.04
commands:
- echo "foo"
2018-02-22 17:15:55 +00:00