kind: pipeline name: default steps: - name: pre-build 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 " Version = \"$BRANCH\"" >>$VERSIONGO - echo " Build = \"$REV\"" >>$VERSIONGO - echo " Builddate = \"$BUILDDATE\"" >>$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 - name: trigger image: plugins/downstream settings: server: https://dev.dnix.de token: from_secret: drone_token fork: false reposisitories: - nb/deploy-flokati - nb/deploy-armleuchter # - name: clair # 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