github.com/jlmeeker/kismatic@v1.10.1-0.20180612190640-57f9005a1f1a/circle.yml (about) 1 version: 2 2 defaults: &defaults 3 working_directory: /go/src/github.com/apprenda/kismatic 4 docker: 5 - image: circleci/golang:1.9.4 6 7 jobs: 8 build: 9 <<: *defaults 10 steps: 11 - checkout 12 - run: 13 name: Install glide packages 14 command: make vendor && make glide-install-host 15 - run: 16 name: Unit tests 17 command: make TEST_OPTS="-v" test-host 18 - run: 19 name: Verify gofmt 20 command: diff -u <(echo -n) <(gofmt -d ./pkg ./cmd) 21 - run: 22 name: Verify reference documentation is up to date 23 command: diff -u <(cat docs/plan-file-reference.md) <(make docs/generate-plan-file-reference.md) 24 - run: 25 name: Create release directory # Used for releasing to GH 26 command: mkdir release 27 - run: 28 name: Darwin, Linux dists 29 command: make all-host 30 - run: 31 name: Darwin tarball 32 command: GOOS=darwin make tarball 33 - run: 34 name: Linux tarball 35 command: GOOS=linux make tarball 36 - store_artifacts: 37 path: kismatic-darwin.tar.gz 38 destination: kismatic-darwin-amd64.tar.gz 39 - run: 40 name: Copy darwin pkg to release dir 41 command: mv kismatic-darwin.tar.gz release/kismatic-${CIRCLE_TAG}-darwin-amd64.tar.gz 42 - store_artifacts: 43 path: kismatic-linux.tar.gz 44 destination: kismatic-linux-amd64.tar.gz 45 - run: 46 name: Copy linux pkg to release dir # Used for releasing to GH 47 command: cp kismatic-linux.tar.gz release/kismatic-${CIRCLE_TAG}-linux-amd64.tar.gz 48 - run: 49 name: Set integration test SSH Key 50 command: echo "$KISMATIC_INT_TEST_KEY" | base64 -d > ~/.ssh/kismatic-integration-testing.pem 51 - run: 52 name: Set permissions on SSH key 53 command: chmod 0600 ~/.ssh/kismatic-integration-testing.pem 54 - run: 55 name: Focused tests 56 command: | 57 if [[ -n "$FOCUS" ]] 58 then 59 make focus-integration-test-host 60 fi 61 no_output_timeout: 30m 62 environment: 63 GINKGO_OPTS: "-nodes=32 --flakeAttempts=2" 64 ANSIBLE_SSH_CONTROL_PATH: "/tmp/ssh-%%r-%%h-%%p" 65 ANSIBLE_SSH_ARGS: "-o ControlMaster=auto -o ControlPersist=1800s -o ControlPath=/tmp/ssh-%r-%h-%p" 66 - run: 67 name: Integration tests 68 command: | 69 if [[ -z "$FOCUS" ]] 70 then 71 make integration-test-host 72 fi 73 no_output_timeout: 30m 74 environment: 75 GINKGO_OPTS: "-nodes=32 --flakeAttempts=2" 76 ANSIBLE_SSH_CONTROL_PATH: "/tmp/ssh-%%r-%%h-%%p" 77 ANSIBLE_SSH_ARGS: "-o ControlMaster=auto -o ControlPersist=1800s -o ControlPath=/tmp/ssh-%r-%h-%p" 78 - run: 79 name: Slow integration tests 80 command: | 81 if [[ -n "$CIRCLE_TAG" || -n "$RUN_SLOW_TESTS" ]] 82 then 83 make slow-integration-test-host 84 fi 85 no_output_timeout: 90m 86 environment: 87 GINKGO_OPTS: "-nodes=32 --flakeAttempts=2" 88 ANSIBLE_SSH_CONTROL_PATH: "/tmp/ssh-%%r-%%h-%%p" 89 ANSIBLE_SSH_ARGS: "-o ControlMaster=auto -o ControlPersist=1800s -o ControlPath=/tmp/ssh-%r-%h-%p" 90 - store_test_results: 91 path: /tmp/ket-junit-results 92 - run: 93 name: Create draft release on GitHub 94 command: | 95 if [[ -n "$CIRCLE_TAG" ]] 96 then 97 apt-get update && apt-get install -y unzip 98 wget https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip 99 unzip ghr_v0.5.4_linux_amd64.zip 100 ./ghr -draft -u "$CIRCLE_PROJECT_USERNAME" "${CIRCLE_TAG}-draft" release/ 101 fi 102 103 deployment: 104 fake_deploy_for_cci2: 105 tag: /.*/ 106 commands: 107 - echo "make tags run in 2.0"