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 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  12. - run: dep ensure -vendor-only
  13. - run: make check-generated
  14. - run: make test TEST_FLAGS="-race -tags integration -timeout 60s"
  15. - run: make all
  16. - deploy:
  17. name: Maybe push master image
  18. command: |
  19. if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then
  20. echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin
  21. docker push "docker.io/weaveworks/flux:$(docker/image-tag)"
  22. docker push "docker.io/weaveworks/helm-operator:$(docker/image-tag)"
  23. fi
  24. - deploy:
  25. name: Maybe push release image and upload binaries
  26. command: |
  27. if echo "${CIRCLE_TAG}" | grep -Eq "^[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
  28. go get github.com/weaveworks/github-release
  29. make release-bins
  30. bin/upload-binaries
  31. echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin
  32. docker push "docker.io/weaveworks/flux:${CIRCLE_TAG}"
  33. fi
  34. if echo "${CIRCLE_TAG}" | grep -Eq "helm-[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
  35. echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin
  36. RELEASE_TAG=$(echo "$CIRCLE_TAG" | cut -c 6-)
  37. docker push "docker.io/weaveworks/helm-operator:${RELEASE_TAG}"
  38. fi
  39. e2e-testing:
  40. machine: true
  41. working_directory: ~/go/src/github.com/weaveworks/flux
  42. steps:
  43. - checkout
  44. - run: test/e2e/e2e-golang.sh
  45. - run: test/e2e/e2e-flux-build.sh
  46. - run: test/e2e/e2e-kind.sh
  47. - run: test/e2e/e2e-helm.sh
  48. - run: test/e2e/e2e-git.sh
  49. - run: test/e2e/e2e-flux-chart.sh
  50. workflows:
  51. version: 2
  52. build-and-push:
  53. jobs:
  54. - build:
  55. filters:
  56. tags:
  57. only: /(helm-)?[0-9]+(\.[0-9]+)*(-[a-z]+)?/
  58. - e2e-testing:
  59. requires:
  60. - build