Update .gitlab-ci.yml
This commit is contained in:
parent
93ba4b5ac5
commit
e09e514acc
|
@ -9,7 +9,6 @@ before_script:
|
|||
|
||||
variables:
|
||||
VERSIONGO: version.go
|
||||
BUILDDATEGO: builddate.go
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
@ -29,14 +28,10 @@ build:
|
|||
- echo -n " FlokatiBuild = \"" >>$VERSIONGO
|
||||
- echo -n "$REV" >>$VERSIONGO
|
||||
- echo "\"" >>$VERSIONGO
|
||||
- echo -n " FlokatiBuilddate = \"" >>$VERSIONGO
|
||||
- echo -n "$BUILDDATE" >>$VERSIONGO
|
||||
- echo "\"" >>$VERSIONGO
|
||||
- echo ")" >>$VERSIONGO
|
||||
- echo "package main" >$BUILDDATEGO
|
||||
- echo "" >>$BUILDDATEGO
|
||||
- echo "const (" >>$BUILDDATEGO
|
||||
- echo -n " FlokatiBuilddate = \"" >>$BUILDDATEGO
|
||||
- echo -n "$BUILDDATE" >>$BUILDDATEGO
|
||||
- echo "\"" >>$BUILDDATEGO
|
||||
- echo ")" >>$BUILDDATEGO
|
||||
- cat version.go
|
||||
- docker build -t "$IMAGE:$BRANCH-$REV" .
|
||||
- docker push "$IMAGE:$BRANCH-$REV"
|
||||
|
@ -57,7 +52,7 @@ deploy:
|
|||
- chmod 700 .ssh
|
||||
- echo "$K8S_SSH_PRIVATE_KEY" >.ssh/id_rsa
|
||||
- chmod 600 .ssh/id_rsa
|
||||
- echo "$K8S_SSH_PUB₤IC_KEY" >.ssh/id_rsa.pub
|
||||
- echo "$K8S_SSH_PUBLIC_KEY" >.ssh/id_rsa.pub
|
||||
- chmod 600 .ssh/id_rsa.pub
|
||||
- ssh -oStrictHostKeyChecking=no root@node04 "kubectl set image deployment/mmflokati-flokati mmflokati-flokati=dr.dnix.de/mmflokati:$BRANCH-$REV -n northbrigade"
|
||||
- ssh -oStrictHostKeyChecking=no root@node04 "kubectl set image deployment/mmflokati-armleuchter mmflokati-armleuchter=dr.dnix.de/mmflokati:$BRANCH-$REV -n northbrigade"
|
||||
|
|
Loading…
Reference in New Issue