11version : 2
22
33jobs :
4- build_and_test_python27 :
5- docker :
6- - image : circleci/python:2.7
7- - image : rabbitmq:3
8- - image : mongo:3.4
9-
10- working_directory : ~/repo
11-
12- environment :
13- VIRTUALENV_DIR : " ~/virtualenv"
14- # Don't install various StackStorm dependencies which are already
15- # installed by CI again in the various check scripts
16- ST2_INSTALL_DEPS : " 0"
17-
18- steps :
19- - checkout
20- - restore_cache :
21- key : v1-dependency-cache-py27-{{ checksum "requirements.txt" }}
22- - run :
23- name : Download dependencies
24- command : |
25- git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci
26- ~/ci/.circle/dependencies
27- - run :
28- name : Run tests (Python 2.7)
29- command : ~/ci/.circle/test
30- - save_cache :
31- key : v1-dependency-cache-py27-{{ checksum "requirements.txt" }}
32- paths :
33- - ~/.cache/pip
34- - ~/.apt-cache
35- # NOTE: We use virtualenv files from Python 2.7 step in "deploy" job so we
36- # only persist paths from this job
37- - persist_to_workspace :
38- root : /
39- paths :
40- - home/circleci/ci
41- - home/circleci/virtualenv
42- - tmp/st2
43- - home/circleci/repo
44- - home/circleci/.gitconfig
45-
46- # NOTE: Until we add "python_version" metadata attribute to pack.yaml and
47- # explicitly call which packs work with Python 3.x, Python 3.x failures are
48- # not considered fatal
494 build_and_test_python36 :
505 docker :
516 - image : circleci/python:3.6
@@ -87,10 +42,21 @@ jobs:
8742 paths :
8843 - ~/.cache/pip
8944 - ~/.apt-cache
45+ # NOTE: We use virtualenv files from Python 3.6 step in "deploy" job so we
46+ # only persist paths from this job
47+ - persist_to_workspace :
48+ root : /
49+ paths :
50+ - home/circleci/ci
51+ - home/circleci/virtualenv
52+ - tmp/st2
53+ - home/circleci/repo
54+ - home/circleci/.gitconfig
55+
9056
9157 deploy :
9258 docker :
93- - image : circleci/python:2.7
59+ - image : circleci/python:3.6
9460
9561 working_directory : ~/repo
9662
10066 steps :
10167 - checkout
10268 - restore_cache :
103- key : v1-dependency-cache-py27 -{{ checksum "requirements.txt" }}
69+ key : v1-dependency-cache-py36 -{{ checksum "requirements.txt" }}
10470 - attach_workspace :
10571 at : /
10672 - run :
@@ -109,26 +75,26 @@ jobs:
10975 sudo apt-get update
11076 sudo apt -y install gmic optipng
11177 - run :
78+ # NOTE: We try to retry the script up to 5 times if it fails. The command could fail due
79+ # to the race (e.g. we try to push changes to index, but index has been updated by some
80+ # other pack in the mean time)
11281 name : Update exchange.stackstorm.org
113- command : ~/ci/.circle/deployment
82+ command : ~/ci/.circle/retry_on_failure.sh ~/ci/.circle/deployment
11483
11584workflows :
11685 version : 2
11786 # Workflow which runs on each push
11887 build_test_deploy_on_push :
11988 jobs :
120- - build_and_test_python27
12189 - build_and_test_python36
12290 - deploy :
12391 requires :
124- - build_and_test_python27
12592 - build_and_test_python36
12693 filters :
12794 branches :
12895 only : master
12996 build_test_weekly :
13097 jobs :
131- - build_and_test_python27
13298 - build_and_test_python36
13399 # Workflow which runs nightly - note we don't perform deploy job on nightly
134100 # build
0 commit comments