Compare commits

...

24 commits

Author SHA1 Message Date
an
f3a7c36067 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-23 10:23:42 +00:00
an
c59ad92bc7 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-23 06:23:04 +00:00
an
69724b91a2 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-23 06:16:49 +00:00
an
a1ceee57fa '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 23:01:47 +00:00
an
d7e0d38903 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:54:57 +00:00
an
37ffdd18aa '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:50:18 +00:00
an
886c840001 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:45:25 +00:00
an
97bce1d56e '.drone.yml' ändern
All checks were successful
the build was successful
2018-02-22 22:35:24 +00:00
an
a9b045acef '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:24:57 +00:00
an
aedec72936 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:20:33 +00:00
an
9271eebb0d '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:19:43 +00:00
an
3a9e863ec7 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:04:03 +00:00
an
40a7a49e4b '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 22:03:11 +00:00
an
191d94385b '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 21:52:52 +00:00
an
386629664d '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 21:47:19 +00:00
an
772f9cae2c '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 21:43:27 +00:00
an
c2cf539acc '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 21:37:56 +00:00
an
1d875511cf '.drone.yml' ändern
All checks were successful
the build was successful
2018-02-22 21:25:40 +00:00
an
066adec21d '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 21:20:04 +00:00
an
767cd51025 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 18:49:15 +00:00
an
1394e59741 '.drone.yml' ändern
Some checks are pending
the build is pending
2018-02-22 18:29:28 +00:00
an
9619e760af '.drone.yml' ändern
All checks were successful
the build was successful
2018-02-22 18:01:39 +00:00
an
53af23162e '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 17:59:56 +00:00
an
9d05b8f300 '.drone.yml' ändern
Some checks failed
the build failed
2018-02-22 17:49:11 +00:00

View file

@ -1,14 +1,13 @@
pipeline:
build:
prebuild:
image: golang:1.9
environment:
- FOO=1
commands:
- export REV=$(git rev-list HEAD --count)
- export BUILDDATE=$(date)
- export BRANCH=$DRONE_COMMIT_BRANCH
- export IMAGE=dr.dnix.de/$DRONE_REPO_NAME
- export VERSIONGO=version.go
- 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
@ -23,7 +22,33 @@ pipeline:
- echo -n "$BUILDDATE" >>$VERSIONGO
- echo "\"" >>$VERSIONGO
- echo ")" >>$VERSIONGO
- #cat version.go
- go get -d ./...
- go build
- cat $VERSIONGO
- echo -n "$BRANCH-$REV" >$TAGS
- cat $TAGS
build_docker:
image: plugins/docker
repo: dr.dnix.de/${DRONE_REPO_NAME}
tags:
- latest
deploy:
image: ubuntu:16.04
commands:
- apt update
- apt -y upgrade
- apt install -y git
- IMAGE=dr.dnix.de/$DRONE_REPO_NAME
- BRANCH=$DRONE_COMMIT_BRANCH
- REV=$(git rev-list HEAD --count)
- echo "Deploying image $IMAGE:$BRANCH-$REV"
- cd ~
- mkdir .ssh
- chmod 700 .ssh
- echo K8S_SSH_PRIVATE_KEY >.ssh/id_rsa
- chmod 600 .ssh/id_rsa
- echo K8S_SSH_PUBLIC_KEY >.ssh/id_rsa.pub
- chmod 600 .ssh/id_rsa.pub
- ssh -oStrictHostKeyChecking=no root@master01 "kubectl set image deployment/mmflokati-flokati mmflokati-flokati=dr.dnix.de/mmflokati:$BRANCH-$REV -n northbrigade"
- ssh -oStrictHostKeyChecking=no root@master01 "kubectl set image deployment/mmflokati-armleuchter mmflokati-armleuchter=dr.dnix.de/mmflokati:$BRANCH-$REV -n northbrigade"
- ssh -oStrictHostKeyChecking=no root@master01 "kubectl rollout status deployment/mmflokati-flokati -n northbrigade"
- ssh -oStrictHostKeyChecking=no root@master01 "kubectl rollout status deployment/mmflokati-armleuchter -n northbrigade"