flokati/.drone.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2019-08-01 08:50:53 +00:00
kind: pipeline
name: default
steps:
2019-08-02 09:16:10 +00:00
- name: pre-build
2019-08-01 08:50:53 +00:00
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
2020-01-21 14:39:16 +00:00
- echo " Version = \"$BRANCH\"" >>$VERSIONGO
- echo " Build = \"$REV\"" >>$VERSIONGO
- echo " Builddate = \"$BUILDDATE\"" >>$VERSIONGO
2019-08-01 08:50:53 +00:00
- 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
2019-08-02 17:27:52 +00:00
2020-05-15 11:51:16 +00:00
- name: trigger
image: plugins/downstream
settings:
server: https://dev.dnix.de
token: GswRtnNQ0to1HjH7PPIEX-pDNr5EKDErzPjHy59t7JM=
fork: true
reposositories:
- nb/deploy-flokati
- nb/deploy-armleuchter
2020-03-06 21:27:16 +00:00
# - name: clair
2019-08-02 21:21:08 +00:00
# image: ubuntu:18.04
# #environment:
# #CLAIR_ADDR: http://dev01.dnix.org:6060
# #CLAIR_OUTPUT: High
# #CLAIR_THRESHOLD: 10
# #REGISTRY_INSECURE: true
# commands:
# - apt -y update
# - apt -y install curl
# - curl -Lo /usr/local/bin/klar https://github.com/optiopay/klar/releases/download/v2.4.0/klar-2.4.0-linux-amd64
# - chmod 755 /usr/local/bin/klar
# - CLAIR_ADDR=http://192.168.1.119:6060 CLAIR_OUTPUT=High CLAIR_THRESHOLD=1 REGISTRY_INSECURE=true klar dr.dnix.de/flokati