From 1cfc39bc6bce55120c70cb825d8087629d52a403 Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 15:14:30 -0700 Subject: [PATCH 01/34] Add pytests to circle.yml --- circle.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 5d39f62d13..77e955abe9 100644 --- a/circle.yml +++ b/circle.yml @@ -8,10 +8,10 @@ # DOCKER_PASSWORD general: # Don't run CI for PR, only for major branches - branches: - only: - - master - - /v[0-9]+\.[0-9]+/ + # branches: + # only: + # - master + # - /v[0-9]+\.[0-9]+/ build_dir: st2-packages artifacts: - ~/packages @@ -68,6 +68,8 @@ dependencies: test: override: + - make pytests: + parallel: true - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 From 790c6d8c8b1e9b35b41ca9fb8598eeab0f9535eb Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 15:26:12 -0700 Subject: [PATCH 02/34] Change CWD --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 77e955abe9..60b3c07897 100644 --- a/circle.yml +++ b/circle.yml @@ -68,7 +68,7 @@ dependencies: test: override: - - make pytests: + - cd /home/ubuntu/st2 && make pytests: parallel: true - .circle/docker-compose.sh test ${DISTRO}: parallel: true From 402e865833a28576195e2ab327bee7102fad132e Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 15:37:02 -0700 Subject: [PATCH 03/34] Try with sudo --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 60b3c07897..c1acf8a8c6 100644 --- a/circle.yml +++ b/circle.yml @@ -68,7 +68,7 @@ dependencies: test: override: - - cd /home/ubuntu/st2 && make pytests: + - cd /home/ubuntu/st2 && sudo make pytests: parallel: true - .circle/docker-compose.sh test ${DISTRO}: parallel: true From 86e462b55360da64f2bf07fc0077b810d4e96bc3 Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 17:08:41 -0700 Subject: [PATCH 04/34] reset cache permissions back to ubuntu user --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circle.yml b/circle.yml index c1acf8a8c6..84a46f1e77 100644 --- a/circle.yml +++ b/circle.yml @@ -67,6 +67,9 @@ dependencies: - .circle/docker-compose.sh build ${DISTRO} test: + pre: + - sudo chown -R ubuntu:ubuntu ~/.cache/pip + - sudo chown -R ubuntu:ubuntu ~/wheelhouse override: - cd /home/ubuntu/st2 && sudo make pytests: parallel: true From d0a26a94e644868c7e9cf6b83f7116e9f30e936e Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 17:23:23 -0700 Subject: [PATCH 05/34] drop sudo --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 84a46f1e77..1f0fdf5299 100644 --- a/circle.yml +++ b/circle.yml @@ -71,7 +71,7 @@ test: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse override: - - cd /home/ubuntu/st2 && sudo make pytests: + - cd /home/ubuntu/st2 && make pytests: parallel: true - .circle/docker-compose.sh test ${DISTRO}: parallel: true From 45ba25455019ba41183f308e4867f16ff8da20af Mon Sep 17 00:00:00 2001 From: manasdk Date: Wed, 23 Mar 2016 17:46:11 -0700 Subject: [PATCH 06/34] Clean-up st2-packages since those need not be tested --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index 1f0fdf5299..fa799aeb66 100644 --- a/circle.yml +++ b/circle.yml @@ -70,6 +70,7 @@ test: pre: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse + - cd /home/ubuntu/st2 && rm -rf st2-packages override: - cd /home/ubuntu/st2 && make pytests: parallel: true From 284a3163375b4c23ffdc1088cd31c09f5aca7c7c Mon Sep 17 00:00:00 2001 From: manasdk Date: Thu, 24 Mar 2016 12:04:51 -0700 Subject: [PATCH 07/34] Fix rabbitmq config and restart --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index fa799aeb66..ebe84b180e 100644 --- a/circle.yml +++ b/circle.yml @@ -71,6 +71,7 @@ test: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - cd /home/ubuntu/st2 && rm -rf st2-packages + - sudo sh -c 'echo "[{rabbit, [{disk_free_limit, 10}, {loopback_users, []}, {tcp_listeners, [{\"0.0.0.0\", 5672}]}]}]." > /etc/rabbitmq/rabbitmq.config' && sudo service rabbitmq-server restart override: - cd /home/ubuntu/st2 && make pytests: parallel: true From eece3cc02d10c8c05fa91a29861af96bc20b0ca1 Mon Sep 17 00:00:00 2001 From: manasdk Date: Thu, 24 Mar 2016 14:49:55 -0700 Subject: [PATCH 08/34] Update test environment for circleci * add stanley user so itest runs * setup rabbitmq --- circle.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index ebe84b180e..b3e67fc470 100644 --- a/circle.yml +++ b/circle.yml @@ -27,6 +27,7 @@ machine: ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages ST2_DOCKERFILES_REPO: https://github.com/StackStorm/st2-dockerfiles ST2_PACKAGES: "st2" + ST2_PACKAGES_BRANCH: "test_updates" BUILD_DOCKER: 0 DEPLOY_DOCKER: 0 DEPLOY_PACKAGES: 1 @@ -47,7 +48,7 @@ checkout: - | git clone --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages cd /home/ubuntu/st2/st2-packages - git checkout ${CIRCLE_BRANCH} || true + git checkout ${ST2_PACKAGES_BRANCH} || true - .circle/buildenv_st2.sh dependencies: @@ -70,10 +71,11 @@ test: pre: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - - cd /home/ubuntu/st2 && rm -rf st2-packages - - sudo sh -c 'echo "[{rabbit, [{disk_free_limit, 10}, {loopback_users, []}, {tcp_listeners, [{\"0.0.0.0\", 5672}]}]}]." > /etc/rabbitmq/rabbitmq.config' && sudo service rabbitmq-server restart + - mv st2-packages .st2-packages + - .circle/configure-test-rabbitmq.sh + - .circle/add-itest-user.sh override: - - cd /home/ubuntu/st2 && make pytests: + - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages: parallel: true - .circle/docker-compose.sh test ${DISTRO}: parallel: true From 23758daa49d50d1b9bd4142a9f86f67f4c7c8a92 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 07:51:09 -0700 Subject: [PATCH 09/34] Use definite paths --- circle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/circle.yml b/circle.yml index b3e67fc470..ff7a861568 100644 --- a/circle.yml +++ b/circle.yml @@ -71,9 +71,9 @@ test: pre: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - - mv st2-packages .st2-packages - - .circle/configure-test-rabbitmq.sh - - .circle/add-itest-user.sh + - mv /home/ubuntu/st2/st2-packages /home/ubuntu/st2/.st2-packages + - /home/ubuntu/st2/.st2-packages/.circle/configure-test-rabbitmq.sh + - /home/ubuntu/st2/.st2-packages/.circle/add-itest-user.sh override: - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages: parallel: true From b7b4beeef1d15df48c0d9b7012e60b2ea592b5e9 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 08:07:08 -0700 Subject: [PATCH 10/34] reorder command list --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index ff7a861568..1ac6ede0fd 100644 --- a/circle.yml +++ b/circle.yml @@ -71,9 +71,9 @@ test: pre: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse + - /home/ubuntu/st2/st2-packages/.circle/configure-test-rabbitmq.sh + - /home/ubuntu/st2/st2-packages/.circle/add-itest-user.sh - mv /home/ubuntu/st2/st2-packages /home/ubuntu/st2/.st2-packages - - /home/ubuntu/st2/.st2-packages/.circle/configure-test-rabbitmq.sh - - /home/ubuntu/st2/.st2-packages/.circle/add-itest-user.sh override: - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages: parallel: true From 0f9ca702c2a12a65bc8489786178fe0505df8ce7 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 11:47:08 -0700 Subject: [PATCH 11/34] Try to see if checkout.post is not run --- circle.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 1ac6ede0fd..6d51cfb9c4 100644 --- a/circle.yml +++ b/circle.yml @@ -45,10 +45,9 @@ machine: checkout: post: - - | - git clone --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages - cd /home/ubuntu/st2/st2-packages - git checkout ${ST2_PACKAGES_BRANCH} || true + - git clone --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages + - cd /home/ubuntu/st2/st2-packages + - git checkout ${ST2_PACKAGES_BRANCH} || true - .circle/buildenv_st2.sh dependencies: From e4106c43307347a483a78555e4ffe1e14a285759 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 11:51:49 -0700 Subject: [PATCH 12/34] prepend origin for branch to resolve correctly --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 6d51cfb9c4..1c7b8bdb68 100644 --- a/circle.yml +++ b/circle.yml @@ -47,7 +47,7 @@ checkout: post: - git clone --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages - cd /home/ubuntu/st2/st2-packages - - git checkout ${ST2_PACKAGES_BRANCH} || true + - git checkout origin/${ST2_PACKAGES_BRANCH} || true - .circle/buildenv_st2.sh dependencies: From a68c6ce434814a306ed2f46e91181dac90ebb3e2 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 11:55:57 -0700 Subject: [PATCH 13/34] Fix branch fetching logic for st2-packages --- circle.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 1c7b8bdb68..ceb49fa0d6 100644 --- a/circle.yml +++ b/circle.yml @@ -45,10 +45,8 @@ machine: checkout: post: - - git clone --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages - - cd /home/ubuntu/st2/st2-packages - - git checkout origin/${ST2_PACKAGES_BRANCH} || true - - .circle/buildenv_st2.sh + - git clone -b origin/${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages + - /home/ubuntu/st2/st2-packages && .circle/buildenv_st2.sh dependencies: cache_directories: From 4948184e23c0802c22a7a6cb920266de5c4a78b7 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 12:23:11 -0700 Subject: [PATCH 14/34] Fix git clone command --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index ceb49fa0d6..511105e555 100644 --- a/circle.yml +++ b/circle.yml @@ -45,8 +45,8 @@ machine: checkout: post: - - git clone -b origin/${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} /home/ubuntu/st2/st2-packages - - /home/ubuntu/st2/st2-packages && .circle/buildenv_st2.sh + - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 https://github.com/StackStorm/st2-packages /home/ubuntu/st2/st2-packages + - /home/ubuntu/st2/st2-packages/.circle/buildenv_st2.sh dependencies: cache_directories: From 46a0422cfa92423d8ff7df513edde2f52b452e2f Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 12:33:20 -0700 Subject: [PATCH 15/34] use environment vars --- circle.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/circle.yml b/circle.yml index 511105e555..29ccc3bf7b 100644 --- a/circle.yml +++ b/circle.yml @@ -28,6 +28,7 @@ machine: ST2_DOCKERFILES_REPO: https://github.com/StackStorm/st2-dockerfiles ST2_PACKAGES: "st2" ST2_PACKAGES_BRANCH: "test_updates" + ST2_REPO_ROOT_DIR: ${HOME}/${CIRCLE_PROJECT_REPONAME} BUILD_DOCKER: 0 DEPLOY_DOCKER: 0 DEPLOY_PACKAGES: 1 @@ -45,8 +46,8 @@ machine: checkout: post: - - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 https://github.com/StackStorm/st2-packages /home/ubuntu/st2/st2-packages - - /home/ubuntu/st2/st2-packages/.circle/buildenv_st2.sh + - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} ${ST2_REPO_ROOT_DIR}/st2-packages + - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/buildenv_st2.sh dependencies: cache_directories: @@ -68,9 +69,9 @@ test: pre: - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - - /home/ubuntu/st2/st2-packages/.circle/configure-test-rabbitmq.sh - - /home/ubuntu/st2/st2-packages/.circle/add-itest-user.sh - - mv /home/ubuntu/st2/st2-packages /home/ubuntu/st2/.st2-packages + - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/configure-test-rabbitmq.sh + - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/add-itest-user.sh + - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages override: - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages: parallel: true From 85591c44612ac5e52f64e006f179361c47763afc Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 13:31:33 -0700 Subject: [PATCH 16/34] Tests don't need to run in parallel --- circle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 29ccc3bf7b..0afd0de49c 100644 --- a/circle.yml +++ b/circle.yml @@ -73,8 +73,7 @@ test: - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/add-itest-user.sh - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages override: - - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages: - parallel: true + - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 From 82def74401aba3a76ef6eb1858f778a4d5af22d0 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 14:46:10 -0700 Subject: [PATCH 17/34] some cleanup as circleci and st2-package understanding improves --- circle.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/circle.yml b/circle.yml index 0afd0de49c..822c8f7da9 100644 --- a/circle.yml +++ b/circle.yml @@ -7,11 +7,6 @@ # DOCKER_EMAIL # DOCKER_PASSWORD general: - # Don't run CI for PR, only for major branches - # branches: - # only: - # - master - # - /v[0-9]+\.[0-9]+/ build_dir: st2-packages artifacts: - ~/packages @@ -47,7 +42,7 @@ machine: checkout: post: - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} ${ST2_REPO_ROOT_DIR}/st2-packages - - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/buildenv_st2.sh + - .circle/buildenv_st2.sh dependencies: cache_directories: @@ -55,6 +50,7 @@ dependencies: pre: - sudo .circle/configure-services.sh - sudo .circle/fix-cache-permissions.sh + - sudo .circle/add-itest-user.sh - sudo apt-get -y install parallel jq - gem install package_cloud - sudo pip install docker-compose @@ -67,13 +63,15 @@ dependencies: test: pre: + # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. + # tests cannot be run as root since github user keys are not configured for root. - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/configure-test-rabbitmq.sh - - ${ST2_REPO_ROOT_DIR}/st2-packages/.circle/add-itest-user.sh + # This ensures that st2-packages is not accidentally picked up while running tests. - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages override: - - cd /home/ubuntu/st2 && make pytests && mv .st2-packages st2-packages + # Rename .st2-packages back to original so subsequent steps still work. + - cd ${ST2_REPO_ROOT_DIR} && make pytests && mv .st2-packages st2-packages - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 From a58e5ac7a15fc740b035b5d4cc9cbf20d5c790a1 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 14:57:30 -0700 Subject: [PATCH 18/34] Use parallel in circleci better * split up make statement to do large steps in separate containers --- circle.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circle.yml b/circle.yml index 822c8f7da9..b6b75dfd7c 100644 --- a/circle.yml +++ b/circle.yml @@ -69,9 +69,13 @@ test: - sudo chown -R ubuntu:ubuntu ~/wheelhouse # This ensures that st2-packages is not accidentally picked up while running tests. - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages + - cd ${ST2_REPO_ROOT_DIR} && make compile requirements override: + - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: + parallel: true # Rename .st2-packages back to original so subsequent steps still work. - cd ${ST2_REPO_ROOT_DIR} && make pytests && mv .st2-packages st2-packages + - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 From 69706f452dc1f3f520b5d57f50c1166e2190c0c2 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 15:12:58 -0700 Subject: [PATCH 19/34] Drop call to make pytests entirely --- circle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index b6b75dfd7c..694395f453 100644 --- a/circle.yml +++ b/circle.yml @@ -74,8 +74,7 @@ test: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: parallel: true # Rename .st2-packages back to original so subsequent steps still work. - - cd ${ST2_REPO_ROOT_DIR} && make pytests && mv .st2-packages st2-packages - + - cd ${ST2_REPO_ROOT_DIR} && mv .st2-packages st2-packages - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 From 8be75b7964678d4d0564d3dd826b6798d0c94ede Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 17:11:34 -0700 Subject: [PATCH 20/34] split the clean portion --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 694395f453..21ea6248d2 100644 --- a/circle.yml +++ b/circle.yml @@ -71,7 +71,7 @@ test: - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages - cd ${ST2_REPO_ROOT_DIR} && make compile requirements override: - - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: + - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html && make clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html && make clean ;; esac: parallel: true # Rename .st2-packages back to original so subsequent steps still work. - cd ${ST2_REPO_ROOT_DIR} && mv .st2-packages st2-packages From 07758e01d3066767eb7ac9576a3c1dfbdb7be0dc Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 17:41:40 -0700 Subject: [PATCH 21/34] temporarily disable few steps to help debug --- circle.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/circle.yml b/circle.yml index 21ea6248d2..9d872f2cf6 100644 --- a/circle.yml +++ b/circle.yml @@ -74,12 +74,12 @@ test: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html && make clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html && make clean ;; esac: parallel: true # Rename .st2-packages back to original so subsequent steps still work. - - cd ${ST2_REPO_ROOT_DIR} && mv .st2-packages st2-packages - - .circle/docker-compose.sh test ${DISTRO}: - parallel: true + # - mv ${ST2_REPO_ROOT_DIR}/.st2-packages ${ST2_REPO_ROOT_DIR}/st2-packages + # - .circle/docker-compose.sh test ${DISTRO}: + # parallel: true # Copy all Packages to node0 - - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: - parallel: true + # - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: + # parallel: true post: - .circle/docker.sh build st2 - .circle/docker.sh build st2actionrunner st2api st2auth st2exporter st2notifier st2resultstracker st2rulesengine st2sensorcontainer From c8fddc5574a1121f0d0eb6596bb7d4f5ac7c847a Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 18:23:10 -0700 Subject: [PATCH 22/34] skip a few more steps and sprinkle hostname --- circle.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 9d872f2cf6..c8a3daf530 100644 --- a/circle.yml +++ b/circle.yml @@ -57,10 +57,11 @@ dependencies: - docker-compose version - docker version override: - - .circle/docker-compose.sh pull ${DISTRO} + #- .circle/docker-compose.sh pull ${DISTRO} + - echo "skipping pull" && hostname post: - - .circle/docker-compose.sh build ${DISTRO} - + # - .circle/docker-compose.sh build ${DISTRO} + - echo "skipping build" && hostname test: pre: # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. @@ -69,7 +70,7 @@ test: - sudo chown -R ubuntu:ubuntu ~/wheelhouse # This ensures that st2-packages is not accidentally picked up while running tests. - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages - - cd ${ST2_REPO_ROOT_DIR} && make compile requirements + - cd ${ST2_REPO_ROOT_DIR} && hostname && make compile requirements override: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html && make clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html && make clean ;; esac: parallel: true From d74893756f888d47c47250e01fc358fceffb731a Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 18:35:23 -0700 Subject: [PATCH 23/34] Learned the hard way that test.pre is not run on every box --- circle.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index c8a3daf530..2928410323 100644 --- a/circle.yml +++ b/circle.yml @@ -62,15 +62,14 @@ dependencies: post: # - .circle/docker-compose.sh build ${DISTRO} - echo "skipping build" && hostname -test: - pre: + # This ensures that st2-packages is not accidentally picked up while running tests. + - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. # tests cannot be run as root since github user keys are not configured for root. - sudo chown -R ubuntu:ubuntu ~/.cache/pip - sudo chown -R ubuntu:ubuntu ~/wheelhouse - # This ensures that st2-packages is not accidentally picked up while running tests. - - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages - cd ${ST2_REPO_ROOT_DIR} && hostname && make compile requirements +test: override: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html && make clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html && make clean ;; esac: parallel: true From 9c06987d244488cb338ca9f99f61e623f2530a4f Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 18:51:16 -0700 Subject: [PATCH 24/34] Bring all steps back to life and incorporate new learnings --- circle.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/circle.yml b/circle.yml index 2928410323..e9b9d0465a 100644 --- a/circle.yml +++ b/circle.yml @@ -57,11 +57,12 @@ dependencies: - docker-compose version - docker version override: - #- .circle/docker-compose.sh pull ${DISTRO} - - echo "skipping pull" && hostname + - .circle/docker-compose.sh pull ${DISTRO} post: - # - .circle/docker-compose.sh build ${DISTRO} - - echo "skipping build" && hostname + - .circle/docker-compose.sh build ${DISTRO} + # All the steps that follow in this section should've been in test.pre. However, + # circleci behavior for test.pre is to run on only 1 box. Therefore this is moved + # into dependencies. # This ensures that st2-packages is not accidentally picked up while running tests. - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. @@ -71,15 +72,14 @@ dependencies: - cd ${ST2_REPO_ROOT_DIR} && hostname && make compile requirements test: override: - - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html && make clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html && make clean ;; esac: + - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: parallel: true # Rename .st2-packages back to original so subsequent steps still work. - # - mv ${ST2_REPO_ROOT_DIR}/.st2-packages ${ST2_REPO_ROOT_DIR}/st2-packages - # - .circle/docker-compose.sh test ${DISTRO}: - # parallel: true + - mv ${ST2_REPO_ROOT_DIR}/.st2-packages ${ST2_REPO_ROOT_DIR}/st2-packages && .circle/docker-compose.sh test ${DISTRO}: + parallel: true # Copy all Packages to node0 - # - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: - # parallel: true + - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: + parallel: true post: - .circle/docker.sh build st2 - .circle/docker.sh build st2actionrunner st2api st2auth st2exporter st2notifier st2resultstracker st2rulesengine st2sensorcontainer From e1e8787f1d43bc8dbe7fd742b066f14e49df3032 Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 19:06:17 -0700 Subject: [PATCH 25/34] rename build-dir to .st2-packages --- circle.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index e9b9d0465a..33780c8ae6 100644 --- a/circle.yml +++ b/circle.yml @@ -7,7 +7,7 @@ # DOCKER_EMAIL # DOCKER_PASSWORD general: - build_dir: st2-packages + build_dir: .st2-packages artifacts: - ~/packages @@ -41,7 +41,7 @@ machine: checkout: post: - - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} ${ST2_REPO_ROOT_DIR}/st2-packages + - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} ${ST2_REPO_ROOT_DIR}/.st2-packages - .circle/buildenv_st2.sh dependencies: @@ -63,8 +63,6 @@ dependencies: # All the steps that follow in this section should've been in test.pre. However, # circleci behavior for test.pre is to run on only 1 box. Therefore this is moved # into dependencies. - # This ensures that st2-packages is not accidentally picked up while running tests. - - mv ${ST2_REPO_ROOT_DIR}/st2-packages ${ST2_REPO_ROOT_DIR}/.st2-packages # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. # tests cannot be run as root since github user keys are not configured for root. - sudo chown -R ubuntu:ubuntu ~/.cache/pip @@ -74,8 +72,7 @@ test: override: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: parallel: true - # Rename .st2-packages back to original so subsequent steps still work. - - mv ${ST2_REPO_ROOT_DIR}/.st2-packages ${ST2_REPO_ROOT_DIR}/st2-packages && .circle/docker-compose.sh test ${DISTRO}: + - .circle/docker-compose.sh test ${DISTRO}: parallel: true # Copy all Packages to node0 - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: From b1734df4e9e4cc190ec6b5532480c68d425a650f Mon Sep 17 00:00:00 2001 From: manasdk Date: Fri, 25 Mar 2016 19:32:45 -0700 Subject: [PATCH 26/34] switch branch to master --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 33780c8ae6..5e32ac7768 100644 --- a/circle.yml +++ b/circle.yml @@ -22,7 +22,7 @@ machine: ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages ST2_DOCKERFILES_REPO: https://github.com/StackStorm/st2-dockerfiles ST2_PACKAGES: "st2" - ST2_PACKAGES_BRANCH: "test_updates" + ST2_PACKAGES_BRANCH: "master" ST2_REPO_ROOT_DIR: ${HOME}/${CIRCLE_PROJECT_REPONAME} BUILD_DOCKER: 0 DEPLOY_DOCKER: 0 From d00230529c534444efae803c36643ed19bc2fdc9 Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 12:40:58 -0700 Subject: [PATCH 27/34] Move scripts over from st2-packages needed for building in st2 --- .circle/add-itest-user.sh | 22 ++++++++++++++ .circle/buildenv_st2.sh | 57 +++++++++++++++++++++++++++++++++++ .circle/configure-services.sh | 9 ++++++ 3 files changed, 88 insertions(+) create mode 100755 .circle/add-itest-user.sh create mode 100755 .circle/buildenv_st2.sh create mode 100755 .circle/configure-services.sh diff --git a/.circle/add-itest-user.sh b/.circle/add-itest-user.sh new file mode 100755 index 0000000000..2b6f087efc --- /dev/null +++ b/.circle/add-itest-user.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +# Create an SSH system user (default `stanley` user may be already created) +if (! id stanley 2>/dev/null); then + useradd stanley +fi + +mkdir -p /home/stanley/.ssh + +# Generate ssh keys on StackStorm box and copy over public key into remote box. +ssh-keygen -f /home/stanley/.ssh/stanley_rsa -P "" + +# Authorize key-base acces +sh -c 'cat /home/stanley/.ssh/stanley_rsa.pub >> /home/stanley/.ssh/authorized_keys' +chmod 0600 /home/stanley/.ssh/authorized_keys +chmod 0700 /home/stanley/.ssh +chown -R stanley:stanley /home/stanley + +# Enable passwordless sudo +sh -c 'echo "stanley ALL=(ALL) NOPASSWD: SETENV: ALL" >> /etc/sudoers.d/st2' +chmod 0440 /etc/sudoers.d/st2 diff --git a/.circle/buildenv_st2.sh b/.circle/buildenv_st2.sh new file mode 100755 index 0000000000..da259724fd --- /dev/null +++ b/.circle/buildenv_st2.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -e + +my_dir="$(dirname "$0")" +source "$my_dir/buildenv_common.sh" + +distros=($DISTROS) +DISTRO=${distros[$CIRCLE_NODE_INDEX]} + +fetch_version() { + if [ -f ../st2common/st2common/__init__.py ]; then + # Get st2 version based on hardcoded string in st2common + # build takes place in `st2` repo + python -c 'execfile("../st2common/st2common/__init__.py"); print __version__' + else + # build takes place in `st2-packages` repo + curl -sSL -o /tmp/st2_version.py ${ST2_GITURL}/raw/${ST2_GITREV}/st2common/st2common/__init__.py + python -c 'execfile("/tmp/st2_version.py"); print __version__' + fi +} + +# Needs explantion??? +st2_giturl() { + # Handle pull requests properly + if [ -z "$CIRCLE_PR_REPONAME" ]; then + echo "https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" + else + echo "https://github.com/${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}" + fi +} + +# --- +# ST2_GITURL - st2 GitHub repository (ex: https://github.com/StackStorm/st2) +# ST2_GITREV - st2 branch name (ex: master, v1.2.1). This will be used to determine correct Docker Tag: `latest`, `1.2.1` +# ST2PKG_VERSION - st2 version, will be reused in Docker image metadata (ex: 1.2dev) +# ST2PKG_RELEASE - Release number aka revision number for `st2` package, will be reused in Docker metadata (ex: 4) +# ST2_WAITFORSTART - Delay between st2 start and service checks + +ST2_GITURL=${ST2_GITURL:-$(st2_giturl)} +ST2_GITREV=${ST2_GITREV:-$CIRCLE_BRANCH} +ST2PKG_VERSION=$(fetch_version) +# for Bintray +#ST2PKG_RELEASE=$(.circle/bintray.sh next-revision ${DISTRO}_staging ${ST2PKG_VERSION} st2) +# for PackageCloud +if [ -z "$CIRCLE_PR_REPONAME" ]; then + ST2PKG_RELEASE=$(.circle/packagecloud.sh next-revision ${DISTRO} ${ST2PKG_VERSION} st2) +else + # is fork + ST2PKG_RELEASE=1 +fi + +re="\\b$DISTRO\\b" +[[ "$NOTESTS" =~ $re ]] && TESTING=0 + +write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE ST2_WAITFORSTART DISTRO TESTING + +cat ~/.buildenv diff --git a/.circle/configure-services.sh b/.circle/configure-services.sh new file mode 100755 index 0000000000..b257d3693a --- /dev/null +++ b/.circle/configure-services.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +# change into script directory +cd $(dirname `readlink -f $0`) + +set -x +sudo ./configure-rabbitmq.sh +sudo ./configure-postgres.sh From 35c2380158a96da43c6bad524bf557ee9519bbab Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 12:41:51 -0700 Subject: [PATCH 28/34] Remove all package building from st2 * package building will be done only through st2-packages * firing off a package will be orchestrated from st2build002 --- circle.yml | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/circle.yml b/circle.yml index 5e32ac7768..9ecc740b8d 100644 --- a/circle.yml +++ b/circle.yml @@ -6,33 +6,14 @@ # DOCKER_USER # DOCKER_EMAIL # DOCKER_PASSWORD -general: - build_dir: .st2-packages - artifacts: - - ~/packages - notify: webhooks: - url: https://webhooks.stackstorm.net:8531/webhooks/build/events machine: environment: - DISTROS: "wheezy jessie trusty el6 el7" - NOTESTS: "el7" - ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages - ST2_DOCKERFILES_REPO: https://github.com/StackStorm/st2-dockerfiles - ST2_PACKAGES: "st2" - ST2_PACKAGES_BRANCH: "master" ST2_REPO_ROOT_DIR: ${HOME}/${CIRCLE_PROJECT_REPONAME} BUILD_DOCKER: 0 - DEPLOY_DOCKER: 0 - DEPLOY_PACKAGES: 1 - pre: - - mkdir -p ~/packages - # Need latest Docker version for some features to work (CircleCI by default works with outdated version) - - | - sudo curl -L -o /usr/bin/docker 'http://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci' - sudo chmod 0755 /usr/bin/docker services: - docker - mongodb @@ -41,7 +22,6 @@ machine: checkout: post: - - git clone -b ${ST2_PACKAGES_BRANCH} --single-branch --depth 1 ${ST2_PACKAGES_REPO} ${ST2_REPO_ROOT_DIR}/.st2-packages - .circle/buildenv_st2.sh dependencies: @@ -49,17 +29,9 @@ dependencies: - ~/.cache/pip pre: - sudo .circle/configure-services.sh - - sudo .circle/fix-cache-permissions.sh - sudo .circle/add-itest-user.sh - sudo apt-get -y install parallel jq - - gem install package_cloud - - sudo pip install docker-compose - - docker-compose version - - docker version - override: - - .circle/docker-compose.sh pull ${DISTRO} post: - - .circle/docker-compose.sh build ${DISTRO} # All the steps that follow in this section should've been in test.pre. However, # circleci behavior for test.pre is to run on only 1 box. Therefore this is moved # into dependencies. @@ -72,30 +44,6 @@ test: override: - case $CIRCLE_NODE_INDEX in 0) cd ${ST2_REPO_ROOT_DIR} && make .flake8 .pylint ;; 1) cd ${ST2_REPO_ROOT_DIR} && make .unit-tests-coverage-html clean ;; 2) cd ${ST2_REPO_ROOT_DIR} && make .itests-coverage-html clean ;; esac: parallel: true - - .circle/docker-compose.sh test ${DISTRO}: - parallel: true - # Copy all Packages to node0 - - rsync -rv /tmp/st2-packages/ node0:~/packages/${DISTRO}: - parallel: true - post: - - .circle/docker.sh build st2 - - .circle/docker.sh build st2actionrunner st2api st2auth st2exporter st2notifier st2resultstracker st2rulesengine st2sensorcontainer - - .circle/docker.sh run st2api - - .circle/docker.sh test st2api 'st2 --version' - -deployment: - publish: - owner: StackStorm - branch: - - master - - /v[0-9]+\.[0-9]+/ - commands: - # Deploy to PackageCloud all artifacts for respective distros in parallel - - | - DISTROS=($DISTROS) - parallel -v -j0 --line-buffer .circle/packagecloud.sh deploy {} ~/packages/{} ::: ${DISTROS[@]::$CIRCLE_NODE_TOTAL} - - .circle/docker.sh deploy st2actionrunner st2api st2auth st2exporter st2notifier st2resultstracker st2rulesengine st2sensorcontainer - - .circle/save_payload.py ~/packages experimental: notify: From c93be79e3d4e6dfcb8f24471b03a1ddb05e1273e Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 13:42:05 -0700 Subject: [PATCH 29/34] Include missing file --- .circle/buildenv_common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 .circle/buildenv_common.sh diff --git a/.circle/buildenv_common.sh b/.circle/buildenv_common.sh new file mode 100755 index 0000000000..66df1b75be --- /dev/null +++ b/.circle/buildenv_common.sh @@ -0,0 +1,8 @@ +# Write export lines into ~/.buildenv and also source it in ~/.circlerc +write_env() { + for e in $*; do + eval "value=\$$e" + [ -z "$value" ] || echo "export $e=$value" >> ~/.buildenv + done + echo ". ~/.buildenv" >> ~/.circlerc +} From 955b95fbb3c62dca4496dd5c54c53c14d57aeb6e Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 13:49:13 -0700 Subject: [PATCH 30/34] remove build_env from circle.ml --- circle.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/circle.yml b/circle.yml index 9ecc740b8d..5e8a38f5fe 100644 --- a/circle.yml +++ b/circle.yml @@ -20,10 +20,6 @@ machine: - postgresql - rabbitmq-server -checkout: - post: - - .circle/buildenv_st2.sh - dependencies: cache_directories: - ~/.cache/pip From c736007cd51c9fb3326de023a70742121fb973a5 Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 13:52:28 -0700 Subject: [PATCH 31/34] add configure-rabbitmq --- .circle/configure-rabbitmq.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .circle/configure-rabbitmq.sh diff --git a/.circle/configure-rabbitmq.sh b/.circle/configure-rabbitmq.sh new file mode 100755 index 0000000000..5cb6ca581b --- /dev/null +++ b/.circle/configure-rabbitmq.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Enable remote guest access +CONFIG=$(cat < /etc/rabbitmq/rabbitmq.config +service rabbitmq-server start From f5f041ba4995779a63553b43177d462d66d55c2e Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Mon, 11 Apr 2016 13:55:55 -0700 Subject: [PATCH 32/34] add configure-postgres.sh --- .circle/configure-postgres.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .circle/configure-postgres.sh diff --git a/.circle/configure-postgres.sh b/.circle/configure-postgres.sh new file mode 100755 index 0000000000..ce76a517fc --- /dev/null +++ b/.circle/configure-postgres.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +CONFIG=$(cat < Date: Mon, 11 Apr 2016 13:58:32 -0700 Subject: [PATCH 33/34] wheelhouse and pip cache are no longer setup --- circle.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/circle.yml b/circle.yml index 5e8a38f5fe..eb13dab692 100644 --- a/circle.yml +++ b/circle.yml @@ -28,13 +28,6 @@ dependencies: - sudo .circle/add-itest-user.sh - sudo apt-get -y install parallel jq post: - # All the steps that follow in this section should've been in test.pre. However, - # circleci behavior for test.pre is to run on only 1 box. Therefore this is moved - # into dependencies. - # ~/.cache/pip and ~/wheelhouse need to be owned by local user to run tests. - # tests cannot be run as root since github user keys are not configured for root. - - sudo chown -R ubuntu:ubuntu ~/.cache/pip - - sudo chown -R ubuntu:ubuntu ~/wheelhouse - cd ${ST2_REPO_ROOT_DIR} && hostname && make compile requirements test: override: From 3fd64f74b31d82ae8c78ba21cdb401252e8d7c5f Mon Sep 17 00:00:00 2001 From: Manas Kelshikar Date: Wed, 13 Apr 2016 22:46:45 -0700 Subject: [PATCH 34/34] Enable circle_ci build only for master and release branches. * Test will be run on circle_ci only on master and release branches. Tests on PR will be done later alongwith travis removal. --- circle.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/circle.yml b/circle.yml index eb13dab692..fb879972fe 100644 --- a/circle.yml +++ b/circle.yml @@ -6,6 +6,15 @@ # DOCKER_USER # DOCKER_EMAIL # DOCKER_PASSWORD + +general: + # Don't run CI for PR, only for major branches. + # Remove travis and enable per PR at the same time. + branches: + only: + - master + - /v[0-9]+\.[0-9]+/ + notify: webhooks: - url: https://webhooks.stackstorm.net:8531/webhooks/build/events