Skip to content

Commit

Permalink
Add deploy step to circleci. Remove tag filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
sechmann committed Nov 4, 2018
1 parent ee73eba commit fa668fa
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,42 @@ jobs:
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push desp/glickorater:${VERSION}
deploy:
docker:
- image: desp/kubectl:1.12.2

steps:
- checkout

- run:
name: Deploy to k8s
command: |
VERSION=$(git describe --tags)
mkdir -p ~/.kube/
echo ${KUBECONFIG_AS_BASE64} | base64 -d > ~/.kube/config
kubectl set -n ratings deployment/glickorater image=desp/glickorater:${VERSION}
workflows:
version: 2
main:
jobs:
- build:
filters:
tags:
only: /.*/
- build
- publish-to-github:
requires:
- build
filters:
branches:
only: master
tags:
only: /.*/
- publish-to-docker-hub:
requires:
- build
filters:
branches:
only: master
tags:
only: /.*/
- deploy:
requires:
- publish-to-docker-hub
filters:
branches:
only: master

0 comments on commit fa668fa

Please sign in to comment.