From 47a114c2a259817fb1a923cfca6fd8067b629e9d Mon Sep 17 00:00:00 2001 From: Hesaam Farhang Date: Wed, 27 Feb 2019 15:17:30 -0800 Subject: [PATCH] CircleCI config updates (#5546) - update to new docker - use erlang image - run doc in separate executor - update app circleci config --- .base_branch | 1 + .circleci/config.yml | 89 ++++------- .circleci/sequential.yml | 128 +++++++-------- .circleci/workflows.yml | 89 ++++------- Makefile | 18 ++- applications/acdc/.circleci/config.yml | 146 +++++++++--------- applications/ananke/.circleci/config.yml | 146 +++++++++--------- applications/blackhole/.circleci/config.yml | 146 +++++++++--------- .../call_inspector/.circleci/config.yml | 146 +++++++++--------- applications/callflow/.circleci/config.yml | 146 +++++++++--------- applications/camper/.circleci/config.yml | 146 +++++++++--------- applications/cccp/.circleci/config.yml | 146 +++++++++--------- applications/cdr/.circleci/config.yml | 146 +++++++++--------- applications/conference/.circleci/config.yml | 146 +++++++++--------- applications/crossbar/.circleci/config.yml | 146 +++++++++--------- applications/doodle/.circleci/config.yml | 146 +++++++++--------- applications/dth/.circleci/config.yml | 146 +++++++++--------- applications/ecallmgr/.circleci/config.yml | 146 +++++++++--------- applications/edr/.circleci/config.yml | 146 +++++++++--------- applications/fax/.circleci/config.yml | 146 +++++++++--------- applications/frontier/.circleci/config.yml | 146 +++++++++--------- applications/hangups/.circleci/config.yml | 146 +++++++++--------- applications/hotornot/.circleci/config.yml | 146 +++++++++--------- applications/jonny5/.circleci/config.yml | 146 +++++++++--------- applications/konami/.circleci/config.yml | 146 +++++++++--------- applications/media_mgr/.circleci/config.yml | 146 +++++++++--------- applications/milliwatt/.circleci/config.yml | 146 +++++++++--------- applications/notify/.circleci/config.yml | 146 +++++++++--------- .../omnipresence/.circleci/config.yml | 146 +++++++++--------- applications/pivot/.circleci/config.yml | 146 +++++++++--------- applications/pusher/.circleci/config.yml | 146 +++++++++--------- applications/registrar/.circleci/config.yml | 146 +++++++++--------- applications/reorder/.circleci/config.yml | 146 +++++++++--------- applications/skel/.circleci/config.yml | 146 +++++++++--------- applications/spyvsspy/.circleci/config.yml | 146 +++++++++--------- applications/stats/.circleci/config.yml | 146 +++++++++--------- applications/stepswitch/.circleci/config.yml | 146 +++++++++--------- applications/sysconf/.circleci/config.yml | 146 +++++++++--------- applications/tasks/.circleci/config.yml | 146 +++++++++--------- applications/teletype/.circleci/config.yml | 146 +++++++++--------- applications/trunkstore/.circleci/config.yml | 146 +++++++++--------- applications/webhooks/.circleci/config.yml | 146 +++++++++--------- make/ci.mk | 12 +- scripts/validate-schemas.sh | 5 +- 44 files changed, 2884 insertions(+), 2860 deletions(-) create mode 100644 .base_branch diff --git a/.base_branch b/.base_branch new file mode 100644 index 00000000000..5a7428942aa --- /dev/null +++ b/.base_branch @@ -0,0 +1 @@ +origin/master diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d0877e1936..a70a2741292 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,9 @@ workflows: - checks: requires: - build + - docs: + requires: + - build - analyze: requires: - build @@ -20,8 +23,7 @@ workflows: defaults: &defaults docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init + - image: offical2600hz/circleci:19.3.6.13 working_directory: ~/2600hz/kazoo shell: /bin/bash --login environment: @@ -32,112 +34,83 @@ jobs: <<: *defaults steps: - checkout - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - restore_cache: - keys: - - erlang-v1-{{ checksum "make/erlang_version" }} - - run: echo -e "\n. ~/.kerl/$OTP_VERSION/activate\n" >> $BASH_ENV - - run: - command: bash ./scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - save_cache: - key: erlang-v1-{{ checksum "make/erlang_version" }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\nexport CHANGED=\$(git --no-pager diff --name-only HEAD origin/master -- applications core | xargs readlink -e)\nexport CHANGED_SWAGGER=`[[ ! -z $(git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json) ]] && echo $(readlink -e applications/crossbar/priv/api/swagger.json)`\n" >> $BASH_ENV - - run: echo $CHANGED + - run: make changed - persist_to_workspace: root: . paths: - . - - persist_to_workspace: - root: ~/ - paths: - - .kerl build: <<: *defaults steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - restore_cache: keys: - - deps-v1-{{ checksum "make/deps.mk" }} + - deps-v2-{{ checksum "make/deps.mk" }} - run: make fmt - run: JOBS="2" make - save_cache: - key: deps-v1-{{ checksum "make/deps.mk" }} + key: deps-v2-{{ checksum "make/deps.mk" }} paths: - deps/ - persist_to_workspace: root: . paths: - . - - persist_to_workspace: - root: ~/ - paths: - - .kerl checks: <<: *defaults steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - - run: ./scripts/state-of-docs.sh || true - - run: ./scripts/code_checks.bash $CHANGED - run: make code_checks - - run: ./scripts/validate-js.sh $(find {core,applications}/*/priv/**/* -name *.json) - - run: make apis - run: make app_applications - - run: make docs - - run: make validate-schemas - - run: ./scripts/state-of-edoc.escript - run: make xref - run: make sup_completion - run: make elvis - run: ${PWD}/scripts/check-unstaged.bash - analyze: + + docs: <<: *defaults steps: - attach_workspace: at: . + - run: make apis + - run: make validate-js + - run: make validate-schemas + - run: make docs + - run: ./scripts/state-of-docs.sh || true + - run: ./scripts/state-of-edoc.escript + - run: ${PWD}/scripts/check-unstaged.bash + + analyze: + <<: *defaults + steps: - attach_workspace: - at: ~/ + at: . - restore_cache: keys: - - plt-v1-{{ checksum "make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make build-plt dialyze + - plt-v2-{{ checksum "make/deps.mk" }} + - run: make build-plt dialyze-changed - save_cache: - key: plt-v1-{{ checksum "make/deps.mk" }} + key: plt-v2-{{ checksum "make/deps.mk" }} paths: - .kazoo.plt + release: <<: *defaults + docker: + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts TZ: "/usr/share/zoneinfo/UTC" - docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - run: mkdir -p $CIRCLE_ARTIFACTS - - run: . .kerl/*/activate && make build-ci-release - - run: . .kerl/*/activate && KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release + - run: make build-ci-release + - run: KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release - run: cp ${PWD}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - run: find ${PWD}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - store_artifacts: diff --git a/.circleci/sequential.yml b/.circleci/sequential.yml index e9037c615c2..598ab0adee8 100644 --- a/.circleci/sequential.yml +++ b/.circleci/sequential.yml @@ -8,74 +8,62 @@ jobs: CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - checkout - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: - working_directory: ~/2600hz/kazoo - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - run: echo -e "\n. ~/.kerl/$OTP_VERSION/activate\n" >> $BASH_ENV - - run: - command: bash ./scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\nexport CHANGED=\$(git --no-pager diff --name-only HEAD origin/master -- applications core | xargs readlink -e)\nexport CHANGED_SWAGGER=`[[ ! -z $(git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json) ]] && echo $(readlink -e applications/crossbar/priv/api/swagger.json)`\n" >> $BASH_ENV - - run: echo $CHANGED - - run: ./scripts/state-of-docs.sh || true - - run: ./scripts/code_checks.bash $CHANGED - - restore_cache: - keys: - - deps-v1-{{ checksum "make/deps.mk" }} - - run: make fmt - - run: JOBS="2" make - - save_cache: - key: deps-v1-{{ checksum "make/deps.mk" }} - paths: - - deps/ - - run: make code_checks - - run: make app_applications - - run: ./scripts/validate-js.sh $(find {core,applications}/*/priv/**/* -name *.json) - - run: make apis - - run: make docs - - run: make validate-schemas - - run: ./scripts/state-of-edoc.escript - - run: make xref - - run: make sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "make/deps.mk" }} - paths: - - .kazoo.plt - - run: make elvis - - run: make build-ci-release - - run: ${PWD}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release - - run: cp ${PWD}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${PWD}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - checkout + - run: make changed + - run: mkdir -p $CIRCLE_ARTIFACTS + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: make fmt + - run: JOBS="2" make + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - .deps + + # code check sequence + - run: make code_checks + - run: make app_applications + - run: make sup_completion + - run: make xref + - run: make elvis + + # docs sequence + - run: make apis + - run: make validate-js + - run: make validate-schemas + - run: make docs + - run: ./scripts/state-of-docs.sh || true + - run: ./scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "make/deps.mk" }} + - run: make build-plt dialyze-changed + - save_cache: + key: plt-v2-{{ checksum "make/deps.mk" }} + paths: + - .kazoo.plt + + # release sequence + - run: make build-ci-release + - run: ${PWD}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release + - run: cp ${PWD}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + - run: find ${PWD}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 6d0877e1936..a70a2741292 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -11,6 +11,9 @@ workflows: - checks: requires: - build + - docs: + requires: + - build - analyze: requires: - build @@ -20,8 +23,7 @@ workflows: defaults: &defaults docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init + - image: offical2600hz/circleci:19.3.6.13 working_directory: ~/2600hz/kazoo shell: /bin/bash --login environment: @@ -32,112 +34,83 @@ jobs: <<: *defaults steps: - checkout - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - restore_cache: - keys: - - erlang-v1-{{ checksum "make/erlang_version" }} - - run: echo -e "\n. ~/.kerl/$OTP_VERSION/activate\n" >> $BASH_ENV - - run: - command: bash ./scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - save_cache: - key: erlang-v1-{{ checksum "make/erlang_version" }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\nexport CHANGED=\$(git --no-pager diff --name-only HEAD origin/master -- applications core | xargs readlink -e)\nexport CHANGED_SWAGGER=`[[ ! -z $(git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json) ]] && echo $(readlink -e applications/crossbar/priv/api/swagger.json)`\n" >> $BASH_ENV - - run: echo $CHANGED + - run: make changed - persist_to_workspace: root: . paths: - . - - persist_to_workspace: - root: ~/ - paths: - - .kerl build: <<: *defaults steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - restore_cache: keys: - - deps-v1-{{ checksum "make/deps.mk" }} + - deps-v2-{{ checksum "make/deps.mk" }} - run: make fmt - run: JOBS="2" make - save_cache: - key: deps-v1-{{ checksum "make/deps.mk" }} + key: deps-v2-{{ checksum "make/deps.mk" }} paths: - deps/ - persist_to_workspace: root: . paths: - . - - persist_to_workspace: - root: ~/ - paths: - - .kerl checks: <<: *defaults steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - - run: ./scripts/state-of-docs.sh || true - - run: ./scripts/code_checks.bash $CHANGED - run: make code_checks - - run: ./scripts/validate-js.sh $(find {core,applications}/*/priv/**/* -name *.json) - - run: make apis - run: make app_applications - - run: make docs - - run: make validate-schemas - - run: ./scripts/state-of-edoc.escript - run: make xref - run: make sup_completion - run: make elvis - run: ${PWD}/scripts/check-unstaged.bash - analyze: + + docs: <<: *defaults steps: - attach_workspace: at: . + - run: make apis + - run: make validate-js + - run: make validate-schemas + - run: make docs + - run: ./scripts/state-of-docs.sh || true + - run: ./scripts/state-of-edoc.escript + - run: ${PWD}/scripts/check-unstaged.bash + + analyze: + <<: *defaults + steps: - attach_workspace: - at: ~/ + at: . - restore_cache: keys: - - plt-v1-{{ checksum "make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make build-plt dialyze + - plt-v2-{{ checksum "make/deps.mk" }} + - run: make build-plt dialyze-changed - save_cache: - key: plt-v1-{{ checksum "make/deps.mk" }} + key: plt-v2-{{ checksum "make/deps.mk" }} paths: - .kazoo.plt + release: <<: *defaults + docker: + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts TZ: "/usr/share/zoneinfo/UTC" - docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 steps: - attach_workspace: at: . - - attach_workspace: - at: ~/ - run: mkdir -p $CIRCLE_ARTIFACTS - - run: . .kerl/*/activate && make build-ci-release - - run: . .kerl/*/activate && KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release + - run: make build-ci-release + - run: KAZOO_CONFIG=${PWD}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make release - run: cp ${PWD}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - run: find ${PWD}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - store_artifacts: diff --git a/Makefile b/Makefile index 49682d6a6d8..aa341cb3a45 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ ELVIS = $(ROOT)/deps/elvis TAGS = $(ROOT)/TAGS ERLANG_MK_COMMIT = d30dda39b08e6ed9e12b44533889eaf90aba86de -BASE_BRANCH := origin/master +BASE_BRANCH := $(shell cat $(ROOT)/.base_branch) ## list files changed for more focused checks CHANGED := $(shell git --no-pager diff --name-only HEAD $(BASE_BRANCH) -- applications core scripts) @@ -18,6 +18,7 @@ JOBS ?= 1 apis \ build-release build-ci-release tar-release release read-release-cookie \ bump-copyright \ + changed changed_swagger \ circle \ clean clean-test clean-release clean-kazoo clean-core clean-apps \ code_checks \ @@ -31,12 +32,19 @@ JOBS ?= 1 fs-headers \ install \ sdks \ + validate-js \ validate-schemas \ validate-swagger \ xref xref_release all: compile +changed: + @git --no-pager diff --name-only HEAD $(BASE_BRANCH) -- applications core scripts + +changed_swagger: + @git --no-pager diff --name-only HEAD $(BASE_BRANCH) -- applications/crossbar/priv/api/swagger.json + compile: ACTION = all compile: deps kazoo @@ -216,7 +224,11 @@ dialyze-it-hard: $(PLT) @ERL_LIBS=deps:core:applications $(if $(DEBUG),time -v) $(ROOT)/scripts/check-dialyzer.escript $(ROOT)/.kazoo.plt --hard $(filter %.beam %.erl %/ebin,$(TO_DIALYZE)) dialyze-it-changed: $(PLT) +ifeq ($(strip $(filter %.beam %.erl %/ebin,$(TO_DIALYZE))),) + @echo "no erlang changes to dialyze" +else @ERL_LIBS=deps:core:applications $(if $(DEBUG),time -v) $(ROOT)/scripts/check-dialyzer.escript $(ROOT)/.kazoo.plt --bulk $(filter %.beam %.erl %/ebin,$(TO_DIALYZE)) +endif xref: TO_XREF ?= $(shell find $(ROOT)/applications $(ROOT)/core $(ROOT)/deps -name ebin) xref: @@ -251,6 +263,7 @@ app_applications: ERL_LIBS=deps:core:applications $(ROOT)/scripts/apps_of_app.escript -a $(shell find applications -name *.app.src) code_checks: + @$(ROOT)/scripts/code_checks.bash $(CHANGED) @ERL_LIBS=deps/:core/:applications/ $(ROOT)/scripts/no_raw_json.escript @$(ROOT)/scripts/check-spelling.bash @$(ROOT)/scripts/kz_diaspora.bash @@ -302,6 +315,9 @@ fs-headers: validate-swagger: @$(ROOT)/scripts/validate-swagger.sh +validate-js: + @./scripts/validate-js.sh $(find {core,applications}/*/priv/**/* -name *.json) + sdks: @$(ROOT)/scripts/make-swag.sh diff --git a/applications/acdc/.circleci/config.yml b/applications/acdc/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/acdc/.circleci/config.yml +++ b/applications/acdc/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/ananke/.circleci/config.yml b/applications/ananke/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/ananke/.circleci/config.yml +++ b/applications/ananke/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/blackhole/.circleci/config.yml b/applications/blackhole/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/blackhole/.circleci/config.yml +++ b/applications/blackhole/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/call_inspector/.circleci/config.yml b/applications/call_inspector/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/call_inspector/.circleci/config.yml +++ b/applications/call_inspector/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/callflow/.circleci/config.yml b/applications/callflow/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/callflow/.circleci/config.yml +++ b/applications/callflow/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/camper/.circleci/config.yml b/applications/camper/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/camper/.circleci/config.yml +++ b/applications/camper/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/cccp/.circleci/config.yml b/applications/cccp/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/cccp/.circleci/config.yml +++ b/applications/cccp/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/cdr/.circleci/config.yml b/applications/cdr/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/cdr/.circleci/config.yml +++ b/applications/cdr/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/conference/.circleci/config.yml b/applications/conference/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/conference/.circleci/config.yml +++ b/applications/conference/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/crossbar/.circleci/config.yml b/applications/crossbar/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/crossbar/.circleci/config.yml +++ b/applications/crossbar/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/doodle/.circleci/config.yml b/applications/doodle/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/doodle/.circleci/config.yml +++ b/applications/doodle/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/dth/.circleci/config.yml b/applications/dth/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/dth/.circleci/config.yml +++ b/applications/dth/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/ecallmgr/.circleci/config.yml b/applications/ecallmgr/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/ecallmgr/.circleci/config.yml +++ b/applications/ecallmgr/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/edr/.circleci/config.yml b/applications/edr/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/edr/.circleci/config.yml +++ b/applications/edr/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/fax/.circleci/config.yml b/applications/fax/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/fax/.circleci/config.yml +++ b/applications/fax/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/frontier/.circleci/config.yml b/applications/frontier/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/frontier/.circleci/config.yml +++ b/applications/frontier/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/hangups/.circleci/config.yml b/applications/hangups/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/hangups/.circleci/config.yml +++ b/applications/hangups/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/hotornot/.circleci/config.yml b/applications/hotornot/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/hotornot/.circleci/config.yml +++ b/applications/hotornot/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/jonny5/.circleci/config.yml b/applications/jonny5/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/jonny5/.circleci/config.yml +++ b/applications/jonny5/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/konami/.circleci/config.yml b/applications/konami/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/konami/.circleci/config.yml +++ b/applications/konami/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/media_mgr/.circleci/config.yml b/applications/media_mgr/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/media_mgr/.circleci/config.yml +++ b/applications/media_mgr/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/milliwatt/.circleci/config.yml b/applications/milliwatt/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/milliwatt/.circleci/config.yml +++ b/applications/milliwatt/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/notify/.circleci/config.yml b/applications/notify/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/notify/.circleci/config.yml +++ b/applications/notify/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/omnipresence/.circleci/config.yml b/applications/omnipresence/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/omnipresence/.circleci/config.yml +++ b/applications/omnipresence/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/pivot/.circleci/config.yml b/applications/pivot/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/pivot/.circleci/config.yml +++ b/applications/pivot/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/pusher/.circleci/config.yml b/applications/pusher/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/pusher/.circleci/config.yml +++ b/applications/pusher/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/registrar/.circleci/config.yml b/applications/registrar/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/registrar/.circleci/config.yml +++ b/applications/registrar/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/reorder/.circleci/config.yml b/applications/reorder/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/reorder/.circleci/config.yml +++ b/applications/reorder/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/skel/.circleci/config.yml b/applications/skel/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/skel/.circleci/config.yml +++ b/applications/skel/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/spyvsspy/.circleci/config.yml b/applications/spyvsspy/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/spyvsspy/.circleci/config.yml +++ b/applications/spyvsspy/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/stats/.circleci/config.yml b/applications/stats/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/stats/.circleci/config.yml +++ b/applications/stats/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/stepswitch/.circleci/config.yml b/applications/stepswitch/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/stepswitch/.circleci/config.yml +++ b/applications/stepswitch/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/sysconf/.circleci/config.yml b/applications/sysconf/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/sysconf/.circleci/config.yml +++ b/applications/sysconf/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/tasks/.circleci/config.yml b/applications/tasks/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/tasks/.circleci/config.yml +++ b/applications/tasks/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/teletype/.circleci/config.yml b/applications/teletype/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/teletype/.circleci/config.yml +++ b/applications/teletype/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/trunkstore/.circleci/config.yml b/applications/trunkstore/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/trunkstore/.circleci/config.yml +++ b/applications/trunkstore/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/applications/webhooks/.circleci/config.yml b/applications/webhooks/.circleci/config.yml index f94516db26e..fd379b96563 100644 --- a/applications/webhooks/.circleci/config.yml +++ b/applications/webhooks/.circleci/config.yml @@ -4,78 +4,80 @@ jobs: shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results TZ: "/usr/share/zoneinfo/UTC" docker: - - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init - - image: couchdb:2.1.1 - - image: rabbitmq:3.7 - - image: circleci/python:3.6.1 + - image: offical2600hz/circleci:19.3.6.13 + - image: couchdb:2.1.1 + - image: rabbitmq:3.7 steps: - - run: | - APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} - APP=${APP_DASH/-/_} - echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV - - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV - - restore_cache: - keys: - - v1-dep-{{ .Branch }}- - - v1-dep-master- - - v1-dep- - - checkout - - run: | - if [ ! -d ${KAZOO_ROOT} ]; then - git clone https://github.com/2600hz/kazoo $KAZOO_ROOT - fi - - run: mkdir -p $CIRCLE_ARTIFACTS - - run: ${KAZOO_ROOT}/scripts/circleci.bash - - run: - command: echo -e "export OTP_VERSION=$(<~/2600hz/kazoo/make/erlang_version)\nexport PATH=${HOME}/.kerl/\$OTP_VERSION/bin:${PATH}\n" >> $BASH_ENV - - run: - command: bash ${KAZOO_ROOT}/scripts/circleci-build-erlang.sh - no_output_timeout: 1800s - - run: which ag >/dev/null 2>&1 || sudo apt-get update; sudo apt-get install silversearcher-ag - - run: sudo pip install --upgrade pip - - run: sudo pip install PyYAML mkdocs pyembed-markdown jsonschema - - save_cache: - key: v1-dep-{{ .Branch }}-{{ epoch }} - paths: - - ~/.kerl - - ~/.local/ - - run: echo -e "\n. ~/.kerl/${OTP_VERSION:-19.3}/activate\n" >> $BASH_ENV - - run: echo -e "\nexport CHANGED=\"$(find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl" | xargs echo)\"" >> $BASH_ENV - - run: echo $CHANGED - - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true - - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED - - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt - - run: JOBS="2" make -C ${KAZOO_ROOT} - - run: make -C ${KAZOO_ROOT} code_checks - - run: make -C ${KAZOO_ROOT} app_applications - - run: ${KAZOO_ROOT}/scripts/validate-js.sh $(find -C ${KAZOO_ROOT}/{core,applications}/*/priv/**/* -name *.json) - - run: make -C ${KAZOO_ROOT} apis - - run: make -C ${KAZOO_ROOT} docs || true - - run: make -C ${KAZOO_ROOT} validate-schemas - - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript - - run: make -C ${KAZOO_ROOT} xref - - run: make -C ${KAZOO_ROOT} sup_completion - - restore_cache: - keys: - - plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze - - save_cache: - key: plt-v1-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} - paths: - - ${KAZOO_ROOT}/.kazoo.plt - - run: make -C ${KAZOO_ROOT} elvis - - run: make -C ${KAZOO_ROOT} build-ci-release - - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash - - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release - - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ - - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; - - store_artifacts: - path: /tmp/circleci-artifacts - - run: | - if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then - cat ${CIRCLE_ARTIFACTS}/log/error.log - exit 1 - fi + - run: | + APP_DASH=${CIRCLE_PROJECT_REPONAME#kazoo-} + APP=${APP_DASH/-/_} + echo -e "export KAZOO_APP=${APP}\n" >> $BASH_ENV + - run: echo -e "export KAZOO_ROOT=${HOME}/${CIRCLE_PROJECT_USERNAME}/kazoo\nexport APP_PATH=applications/${KAZOO_APP}\n\n" >> $BASH_ENV + + # setup build environment sequence + - checkout + - run: | + if [ ! -d ${KAZOO_ROOT} ]; then + git clone https://github.com/2600hz/kazoo $KAZOO_ROOT + fi + - run: mkdir -p $CIRCLE_ARTIFACTS + - run: ${KAZOO_ROOT}/scripts/circleci.bash + - run: echo -e 'export CHANGED="$(for file in `find ${KAZOO_ROOT}/applications/${KAZOO_APP} -name "*.[e|h]rl"`; do readlink -e $file; done)"' >> $BASH_ENV + - run: echo $CHANGED + + # build sequence + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + - run: TO_FMT="${CHANGED}" make -C ${KAZOO_ROOT} fmt + - run: JOBS="2" make -C ${KAZOO_ROOT} + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - ${KAZOO_ROOT}/.deps + + # code checks sequence + - run: make -C ${KAZOO_ROOT} code_checks + - run: ${KAZOO_ROOT}/scripts/code_checks.bash $CHANGED + - run: make -C ${KAZOO_ROOT} app_applications + - run: make -C ${KAZOO_ROOT} sup_completion + - run: make -C ${KAZOO_ROOT} xref + - run: make -C ${KAZOO_ROOT} elvis + + # docs sequence + - run: make -C ${KAZOO_ROOT} apis + - run: make -C ${KAZOO_ROOT} validate-js + - run: make -C ${KAZOO_ROOT} validate-schemas + - run: make -C ${KAZOO_ROOT} docs || true + - run: ${KAZOO_ROOT}/scripts/state-of-docs.sh || true + - run: ${KAZOO_ROOT}/scripts/state-of-edoc.escript + + # analyze sequence + - restore_cache: + keys: + - plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + - run: TO_DIALYZE="$(echo $CHANGED)" make -C ${KAZOO_ROOT} build-plt dialyze + - save_cache: + key: plt-v2-{{ checksum "~/2600hz/kazoo/make/deps.mk" }} + paths: + - ${KAZOO_ROOT}/.kazoo.plt + + # release sequence + - run: make -C ${KAZOO_ROOT} build-ci-release + - run: ${KAZOO_ROOT}/scripts/check-unstaged.bash + - run: KAZOO_CONFIG=${KAZOO_ROOT}/rel/ci.config.ini REL="kazoo_apps" ACT="console" NODE_NAME_TYPE="-sname" make -C ${KAZOO_ROOT} release + - run: cp ${KAZOO_ROOT}/rel/ci.relx.config $CIRCLE_ARTIFACTS/ + + - run: find ${KAZOO_ROOT}/_rel/kazoo/releases -name kazoo.rel -exec cp {} $CIRCLE_ARTIFACTS/ \; + - store_artifacts: + path: /tmp/circleci-artifacts + - run: | + if [[ $(grep -c -v -F 'exit with reason shutdown' ${CIRCLE_ARTIFACTS}/log/error.log) -gt 0 ]]; then + cat ${CIRCLE_ARTIFACTS}/log/error.log + exit 1 + fi diff --git a/make/ci.mk b/make/ci.mk index fe4719c0604..cfe35130999 100644 --- a/make/ci.mk +++ b/make/ci.mk @@ -1,6 +1,6 @@ .PHONY: ci ci-config ci-steps ci-pre ci-fmt ci-build ci-codechecks ci-docs ci-schemas ci-dialyze ci-release ci-unstaged -PIP2 := $(shell { command -v pip || command -v pip2; } 2>/dev/null) +PIP := $(shell { command -v pip; } 2>/dev/null) CI_DIR := $(CURDIR)/make CI_VALIDATOR := $(CI_DIR)/circleci CI_CONFIG := $(CURDIR)/.circleci/config.yml @@ -24,13 +24,13 @@ ci-steps: ci-pre ci-fmt ci-build ci-codechecks ci-docs ci-schemas ci-dialyze ci- @$(ROOT)/scripts/check-unstaged.bash ci-pre: -ifneq ($(PIP2),) +ifneq ($(PIP),) ## needs root access @echo $(CHANGED) - @$(PIP2) install --user --upgrade pip - @$(PIP2) install --user PyYAML mkdocs pyembed-markdown jsonschema + @$(PIP) install --user --upgrade pip + @$(PIP) install --user PyYAML mkdocs pyembed-markdown jsonschema else - $(error "pip/pip2 is not available, please install python2-pip package") + $(error "pip is not available, please install python2-pip package") endif ci-docs: @@ -43,7 +43,7 @@ ci-codechecks: @./scripts/code_checks.bash $(CHANGED) @$(MAKE) code_checks @$(MAKE) app_applications - @./scripts/validate-js.sh $(find {core,applications}/*/priv/**/* -name *.json) + @$(MAKE) validate-js ci-fmt: @$(MAKE) fmt diff --git a/scripts/validate-schemas.sh b/scripts/validate-schemas.sh index 88cb67a99ff..2fdfe185e00 100755 --- a/scripts/validate-schemas.sh +++ b/scripts/validate-schemas.sh @@ -1,9 +1,8 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Validate JSON schemas using python2's jsonschema tool -from __future__ import print_function import json import jsonschema import os @@ -64,7 +63,7 @@ def default_matches_type(Default, Type): return True if Type == 'array' and isinstance(Default, list): return True - if Type == 'string' and isinstance(Default, unicode): + if Type == 'string' and isinstance(Default, str): return True if isinstance(Type, list): verifier = lambda t, acc: acc or default_matches_type(Default, t)