GitOps for k8s
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.yml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: 2
  2. jobs:
  3. build:
  4. working_directory: /go/src/github.com/weaveworks/flux
  5. docker:
  6. - image: circleci/golang:1.10
  7. - image: memcached
  8. steps:
  9. - checkout
  10. - setup_remote_docker
  11. - run: go get github.com/golang/dep/cmd/dep
  12. - run: dep ensure -vendor-only
  13. - run: make test TEST_FLAGS="-race -tags integration -timeout 60s"
  14. - run: make all
  15. - deploy:
  16. name: Maybe push master image
  17. command: |
  18. if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then
  19. docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
  20. docker push "quay.io/weaveworks/flux:$(docker/image-tag)"
  21. docker push "quay.io/weaveworks/helm-operator:$(docker/image-tag)"
  22. fi
  23. - deploy:
  24. name: Maybe push release image and upload binaries
  25. command: |
  26. if echo "${CIRCLE_TAG}" | grep -Eq "^[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
  27. go get github.com/weaveworks/github-release
  28. make release-bins
  29. bin/upload-binaries
  30. docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
  31. docker push "quay.io/weaveworks/flux:${CIRCLE_TAG}"
  32. fi
  33. if echo "${CIRCLE_TAG}" | grep -Eq "helm-[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
  34. docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
  35. RELEASE_TAG=$(echo "$CIRCLE_TAG" | cut -c 6-)
  36. docker push "quay.io/weaveworks/helm-operator:${RELEASE_TAG}"
  37. fi
  38. workflows:
  39. version: 2
  40. build-and-push:
  41. jobs:
  42. - build:
  43. filters:
  44. tags:
  45. only: /(helm-)?[0-9]+(\.[0-9]+)*(-[a-z]+)?/