From eb31de4e749e89ad9e2f5154f28fcb2a36bef884 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 14:24:03 -0700 Subject: [PATCH 01/94] updated to version 2.1 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f0298a..8488a11 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -version: 2 +version: 2.1 jobs: build: working_directory: ~/circleci-demo-python-django From b697894d107b08e7140a67f033bf1fd1282583d1 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 14:27:03 -0700 Subject: [PATCH 02/94] this should fail --- manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manage.py b/manage.py index d23ac38..5e9c774 100644 --- a/manage.py +++ b/manage.py @@ -11,7 +11,7 @@ # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: - import django + import django1 except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " From bd391f5b281969c76c80fa7975d6f877b78a87be Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 14:31:30 -0700 Subject: [PATCH 03/94] this should fail --- catalog/tests/test_forms.py | 3 ++- manage.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 52cf8ac..a3065c1 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,7 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() + date = "hello" + # date = datetime.date.today() form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) diff --git a/manage.py b/manage.py index 5e9c774..d23ac38 100644 --- a/manage.py +++ b/manage.py @@ -11,7 +11,7 @@ # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: - import django1 + import django except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " From 79ab15e1ae683d3d6e32606d9ed127f16303fd15 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 15:16:45 -0700 Subject: [PATCH 04/94] fixed broken test --- catalog/tests/test_forms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index a3065c1..52cf8ac 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,7 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = "hello" - # date = datetime.date.today() + date = datetime.date.today() form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 73f1bd302aba66e9f422ebbfc56c66f20d7a0401 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 16:00:06 -0700 Subject: [PATCH 05/94] added slack orb --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8488a11..849feb7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,7 @@ version: 2.1 +orbs: + slack: circleci/slack@4.0.0 + jobs: build: working_directory: ~/circleci-demo-python-django @@ -35,3 +38,14 @@ jobs: - store_artifacts: path: test-results destination: tr1 + - slack/notify: + template: basic_fail_1 + event: always + mentions: '@henna' + +workflows: + my_workflow: + jobs: + - build: + context: + - SLACK_SECRETS From 71b92dbf76e33860f846a40929dde1b040a37be2 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 16:01:42 -0700 Subject: [PATCH 06/94] something --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 849feb7..1c661be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,10 +38,10 @@ jobs: - store_artifacts: path: test-results destination: tr1 - - slack/notify: - template: basic_fail_1 - event: always - mentions: '@henna' + # - slack/notify: + # template: basic_fail_1 + # event: always + # mentions: '@henna' workflows: my_workflow: From 0d111a7921f53923fd7ad5693172815687c93412 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 12 Oct 2020 18:12:05 -0700 Subject: [PATCH 07/94] this build will fail --- .circleci/config.yml | 8 ++++---- catalog/tests/test_forms.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c661be..849feb7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,10 +38,10 @@ jobs: - store_artifacts: path: test-results destination: tr1 - # - slack/notify: - # template: basic_fail_1 - # event: always - # mentions: '@henna' + - slack/notify: + template: basic_fail_1 + event: always + mentions: '@henna' workflows: my_workflow: diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 52cf8ac..98ba402 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,7 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() + # date = datetime.date.today() + date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 3a422ec6d78828dcfbc1c3655d08c2678cc29163 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:11:43 -0800 Subject: [PATCH 08/94] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 849feb7..20f8f69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,3 +49,4 @@ workflows: - build: context: - SLACK_SECRETS + #test From 17c89f39f504c0f802734d133c42b9227f8fd830 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:14:29 -0800 Subject: [PATCH 09/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 20f8f69..0732479 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,4 +49,4 @@ workflows: - build: context: - SLACK_SECRETS - #test + From ed8d6245636fc114de8512b681e2bf7d06a21d23 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:15:30 -0800 Subject: [PATCH 10/94] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0732479..41ef17c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,4 +49,5 @@ workflows: - build: context: - SLACK_SECRETS + #test From 8fa5a3e13267900e0bf98f7bf9ce588f5eb23ac7 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:19:26 -0800 Subject: [PATCH 11/94] Update test_forms.py --- catalog/tests/test_forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 98ba402..e04d54a 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() +# date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) @@ -59,4 +59,4 @@ def test_renew_form_date_field_help_text(self): Test renewal_date help_text is as expected. """ form = RenewBookForm() - self.assertEqual(form.fields['renewal_date'].help_text,'Enter a date between now and 4 weeks (default 3).') \ No newline at end of file + self.assertEqual(form.fields['renewal_date'].help_text,'Enter a date between now and 4 weeks (default 3).') From ba02b1170d48bf46ab29d2ba30d8be3b9f56e4a6 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 10 Nov 2020 16:34:11 -0800 Subject: [PATCH 12/94] fixed test --- .circleci/config.yml | 282 +++++++++++++++++++++++++++++++----- catalog/tests/test_forms.py | 4 +- 2 files changed, 245 insertions(+), 41 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 849feb7..270b0b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,51 +1,255 @@ +# version: 2.1 +# orbs: +# slack: circleci/slack@4.0.0 + +# jobs: +# build: +# working_directory: ~/circleci-demo-python-django +# docker: +# - image: circleci/python:3.6.4 +# environment: +# PIPENV_VENV_IN_PROJECT: true +# DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable +# - image: circleci/postgres:9.6.2 +# environment: +# POSTGRES_USER: root +# POSTGRES_DB: circle_test +# steps: +# - checkout +# - run: sudo chown -R circleci:circleci /usr/local/bin +# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages +# - restore_cache: +# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} +# - run: +# command: | +# sudo pip install pipenv +# pipenv install +# - save_cache: +# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} +# paths: +# - '.venv' +# - '/usr/local/bin' +# - '/usr/local/lib/python3.6/site-packages' +# - run: +# command: | +# pipenv run python manage.py test +# - store_test_results: +# path: test-results +# - store_artifacts: +# path: test-results +# destination: tr1 +# - slack/notify: +# template: basic_fail_1 +# event: always +# mentions: '@henna' + +# workflows: +# my_workflow: +# jobs: +# - build: +# context: +# - SLACK_SECRETS version: 2.1 orbs: - slack: circleci/slack@4.0.0 - -jobs: - build: - working_directory: ~/circleci-demo-python-django + aws-cli: circleci/aws-cli@1.0.0 + aws-ecr: circleci/aws-ecr@6.7.0 + aws-ecs: circleci/aws-ecs@0.0.10 +executors: + python: docker: - - image: circleci/python:3.6.4 - environment: - PIPENV_VENV_IN_PROJECT: true - DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable - - image: circleci/postgres:9.6.2 - environment: - POSTGRES_USER: root - POSTGRES_DB: circle_test + - image: circleci/python:3.6.1 +commands: + ecr_build: + steps: + - setup_remote_docker + - aws-ecr/build-and-push-image: + repo: "nvsapi-${CIRCLE_BRANCH}" + dockerfile: dockerfile + tag: "${CIRCLE_SHA1}" + npm_test: steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - - restore_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - run: + name: install dependencies + command: npm install + - run: + name: set env variables command: | - sudo pip install pipenv - pipenv install + echo 'PORT=3000' >> .env + echo 'MONGOHQ_URL=mongodb://localhost:27017/nvStudentAPI' >> .env + echo 'MONGOHQ_URL_TEST=mongodb://localhost:27017/nvStudentAPI' >> .env + echo 'NV_ENV=circle' >> .env + - run: + name: test + command: npm test + ecs_deploy: + steps: + - setup_remote_docker + - aws-cli/setup: + profile-name: default + - aws-ecs/update-task-definition: + family: 'nvsapi-${CIRCLE_BRANCH}-web-td' + container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-web-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-${CIRCLE_BRANCH}-worker-td' + container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-worker-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-${CIRCLE_BRANCH}-etl-td' + container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-etl-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-${CIRCLE_BRANCH}-adhoc-td' + container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-adhoc-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-service: + cluster-name: 'systemsAPI' + service-name: 'nvsapi-${CIRCLE_BRANCH}-ecs-web-service' + family: 'nvsapi-${CIRCLE_BRANCH}-web-td' + - aws-ecs/update-service: + family: 'nvsapi-${CIRCLE_BRANCH}-worker-td' + cluster-name: 'systemsAPI' + service-name: 'nvsapi-${CIRCLE_BRANCH}-ecs-worker-service' +jobs: + test: # NPM test for other branches + docker: + - image: circleci/node:12.18.2-buster + - image: rabbitmq:3.6.10 + - image: circleci/mongo:4.2 + steps: + - checkout + - run: + name: install npm + command: sudo npm install -g npm@6.14.5 + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - run: + name: install dependencies + command: npm install - save_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + key: dependency-cache-{{ checksum "package.json" }} paths: - - '.venv' - - '/usr/local/bin' - - '/usr/local/lib/python3.6/site-packages' + - node_modules - run: + name: set env variables command: | - pipenv run python manage.py test - - store_test_results: - path: test-results - - store_artifacts: - path: test-results - destination: tr1 - - slack/notify: - template: basic_fail_1 - event: always - mentions: '@henna' - + echo 'PORT=3000' >> .env + echo 'MONGOHQ_URL=mongodb://localhost:27017/nvStudentAPI' >> .env + echo 'MONGOHQ_URL_TEST=mongodb://localhost:27017/nvStudentAPI' >> .env + echo 'NV_ENV=circle' >> .env + - run: + name: test + command: npm test + build_dev: # dev build job + executor: python + steps: + - setup_remote_docker + - aws-ecr/build-and-push-image: + repo: "nvsapi-dev" + dockerfile: dockerfile + tag: "${CIRCLE_SHA1}" + test_dev: # dev test job + docker: + - image: 404704789700.dkr.ecr.us-east-1.amazonaws.com/nvsapi-dev:${CIRCLE_SHA1} + aws_auth: + aws_access_key_id: $AWS_ACCESS_KEY_ID + aws_secret_access_key: $AWS_SECRET_ACCESS_KEY + - image: rabbitmq:3.6.10 + - image: circleci/mongo:4.2 + steps: + - checkout + - npm_test + deploy_dev: # deploy job for dev + executor: python + steps: + - setup_remote_docker + - aws-cli/setup: + profile-name: default + - aws-ecs/update-task-definition: + family: 'nvsapi-dev-web-td' + container-image-name-updates: 'container=nvsapi-dev-web-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-dev-worker-td' + container-image-name-updates: 'container=nvsapi-dev-worker-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-dev-etl-td' + container-image-name-updates: 'container=nvsapi-dev-etl-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-task-definition: + family: 'nvsapi-dev-adhoc-td' + container-image-name-updates: 'container=nvsapi-dev-adhoc-npm,tag=${CIRCLE_SHA1}' + - aws-ecs/update-service: + cluster-name: 'systemsAPI' + skip-task-definition-registration: true + service-name: 'nvsapi-dev-ecs-web-service' + family: 'nvsapi-dev-web-td' + - aws-ecs/update-service: + family: 'nvsapi-dev-worker-td' + skip-task-definition-registration: true + cluster-name: 'systemsAPI' + service-name: 'nvsapi-dev-ecs-worker-service' + + build: + executor: python + steps: + - ecr_build + deploy: # Deploy + executor: python + steps: + - ecs_deploy workflows: - my_workflow: + version: 2 + build-deploy: jobs: - - build: - context: - - SLACK_SECRETS + - build_dev: + filters: + branches: + only: master + - test_dev: + requires: + - build_dev + filters: + branches: + only: master + - deploy_dev: + requires: + - build_dev + - test_dev + filters: + branches: + only: master + - build: + filters: + branches: + only: + - staging + - prod + - dev2 + - qa + - qa2 + - qa3 + - uat + - data + - deploy: + requires: + - build + filters: + branches: + only: + - staging + - prod + - dev2 + - qa + - qa2 + - qa3 + - uat + - data + - test: + filters: + branches: + ignore: + - dev2 + - qa + - qa2 + - qa3 + - data + - uat + - master + - staging + - prod + - data \ No newline at end of file diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 98ba402..e04f173 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() + # date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 9595d55f187320d63b2ce8188683cd8580471794 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 10 Nov 2020 16:37:51 -0800 Subject: [PATCH 13/94] fixed --- catalog/tests/test_forms.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index b8e0dda..446b9e0 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -31,11 +31,7 @@ def test_renew_form_date_today(self): Test form is valid if renewal_date is today """ date = datetime.date.today() -<<<<<<< HEAD # date = "hello" -======= -# date = "hello" ->>>>>>> 8fa5a3e13267900e0bf98f7bf9ce588f5eb23ac7 form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 5d752ddb726eda96cc39f4d957b94a04a7114fa1 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 10 Nov 2020 16:45:04 -0800 Subject: [PATCH 14/94] restored old cnfig --- .circleci/config.yml | 284 ++++++------------------------------------- 1 file changed, 37 insertions(+), 247 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3593a74..d237cc8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,263 +1,53 @@ -# version: 2.1 -# orbs: -# slack: circleci/slack@4.0.0 - -# jobs: -# build: -# working_directory: ~/circleci-demo-python-django -# docker: -# - image: circleci/python:3.6.4 -# environment: -# PIPENV_VENV_IN_PROJECT: true -# DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable -# - image: circleci/postgres:9.6.2 -# environment: -# POSTGRES_USER: root -# POSTGRES_DB: circle_test -# steps: -# - checkout -# - run: sudo chown -R circleci:circleci /usr/local/bin -# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages -# - restore_cache: -# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} -# - run: -# command: | -# sudo pip install pipenv -# pipenv install -# - save_cache: -# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} -# paths: -# - '.venv' -# - '/usr/local/bin' -# - '/usr/local/lib/python3.6/site-packages' -# - run: -# command: | -# pipenv run python manage.py test -# - store_test_results: -# path: test-results -# - store_artifacts: -# path: test-results -# destination: tr1 -# - slack/notify: -# template: basic_fail_1 -# event: always -# mentions: '@henna' - -# workflows: -# my_workflow: -# jobs: -# - build: -# context: -# - SLACK_SECRETS version: 2.1 orbs: - aws-cli: circleci/aws-cli@1.0.0 - aws-ecr: circleci/aws-ecr@6.7.0 - aws-ecs: circleci/aws-ecs@0.0.10 -executors: - python: - docker: - - image: circleci/python:3.6.1 -commands: - ecr_build: - steps: - - setup_remote_docker - - aws-ecr/build-and-push-image: - repo: "nvsapi-${CIRCLE_BRANCH}" - dockerfile: dockerfile - tag: "${CIRCLE_SHA1}" - npm_test: - steps: - - run: - name: install dependencies - command: npm install - - run: - name: set env variables - command: | - echo 'PORT=3000' >> .env - echo 'MONGOHQ_URL=mongodb://localhost:27017/nvStudentAPI' >> .env - echo 'MONGOHQ_URL_TEST=mongodb://localhost:27017/nvStudentAPI' >> .env - echo 'NV_ENV=circle' >> .env - - run: - name: test - command: npm test - ecs_deploy: - steps: - - setup_remote_docker - - aws-cli/setup: - profile-name: default - - aws-ecs/update-task-definition: - family: 'nvsapi-${CIRCLE_BRANCH}-web-td' - container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-web-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-${CIRCLE_BRANCH}-worker-td' - container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-worker-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-${CIRCLE_BRANCH}-etl-td' - container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-etl-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-${CIRCLE_BRANCH}-adhoc-td' - container-image-name-updates: 'container=nvsapi-${CIRCLE_BRANCH}-adhoc-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-service: - cluster-name: 'systemsAPI' - service-name: 'nvsapi-${CIRCLE_BRANCH}-ecs-web-service' - family: 'nvsapi-${CIRCLE_BRANCH}-web-td' - - aws-ecs/update-service: - family: 'nvsapi-${CIRCLE_BRANCH}-worker-td' - cluster-name: 'systemsAPI' - service-name: 'nvsapi-${CIRCLE_BRANCH}-ecs-worker-service' -jobs: - test: # NPM test for other branches + slack: circleci/slack@4.0.0 + +jobs: + build: + working_directory: ~/circleci-demo-python-django docker: - - image: circleci/node:12.18.2-buster - - image: rabbitmq:3.6.10 - - image: circleci/mongo:4.2 + - image: circleci/python:3.6.4 + environment: + PIPENV_VENV_IN_PROJECT: true + DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable + - image: circleci/postgres:9.6.2 + environment: + POSTGRES_USER: root + POSTGRES_DB: circle_test steps: - - checkout - - run: - name: install npm - command: sudo npm install -g npm@6.14.5 + - checkout + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} + key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - run: - name: install dependencies - command: npm install + command: | + sudo pip install pipenv + pipenv install - save_cache: - key: dependency-cache-{{ checksum "package.json" }} + key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} paths: - - node_modules + - '.venv' + - '/usr/local/bin' + - '/usr/local/lib/python3.6/site-packages' - run: - name: set env variables command: | - echo 'PORT=3000' >> .env - echo 'MONGOHQ_URL=mongodb://localhost:27017/nvStudentAPI' >> .env - echo 'MONGOHQ_URL_TEST=mongodb://localhost:27017/nvStudentAPI' >> .env - echo 'NV_ENV=circle' >> .env - - run: - name: test - command: npm test - build_dev: # dev build job - executor: python - steps: - - setup_remote_docker - - aws-ecr/build-and-push-image: - repo: "nvsapi-dev" - dockerfile: dockerfile - tag: "${CIRCLE_SHA1}" - test_dev: # dev test job - docker: - - image: 404704789700.dkr.ecr.us-east-1.amazonaws.com/nvsapi-dev:${CIRCLE_SHA1} - aws_auth: - aws_access_key_id: $AWS_ACCESS_KEY_ID - aws_secret_access_key: $AWS_SECRET_ACCESS_KEY - - image: rabbitmq:3.6.10 - - image: circleci/mongo:4.2 - steps: - - checkout - - npm_test - deploy_dev: # deploy job for dev - executor: python - steps: - - setup_remote_docker - - aws-cli/setup: - profile-name: default - - aws-ecs/update-task-definition: - family: 'nvsapi-dev-web-td' - container-image-name-updates: 'container=nvsapi-dev-web-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-dev-worker-td' - container-image-name-updates: 'container=nvsapi-dev-worker-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-dev-etl-td' - container-image-name-updates: 'container=nvsapi-dev-etl-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-task-definition: - family: 'nvsapi-dev-adhoc-td' - container-image-name-updates: 'container=nvsapi-dev-adhoc-npm,tag=${CIRCLE_SHA1}' - - aws-ecs/update-service: - cluster-name: 'systemsAPI' - skip-task-definition-registration: true - service-name: 'nvsapi-dev-ecs-web-service' - family: 'nvsapi-dev-web-td' - - aws-ecs/update-service: - family: 'nvsapi-dev-worker-td' - skip-task-definition-registration: true - cluster-name: 'systemsAPI' - service-name: 'nvsapi-dev-ecs-worker-service' - - build: - executor: python - steps: - - ecr_build - deploy: # Deploy - executor: python - steps: - - ecs_deploy + pipenv run python manage.py test + - store_test_results: + path: test-results + - store_artifacts: + path: test-results + destination: tr1 + - slack/notify: + template: basic_fail_1 + event: always + mentions: '@henna' + workflows: - version: 2 - build-deploy: + my_workflow: jobs: -<<<<<<< HEAD - - build_dev: - filters: - branches: - only: master - - test_dev: - requires: - - build_dev - filters: - branches: - only: master - - deploy_dev: - requires: - - build_dev - - test_dev - filters: - branches: - only: master - - build: - filters: - branches: - only: - - staging - - prod - - dev2 - - qa - - qa2 - - qa3 - - uat - - data - - deploy: - requires: - - build - filters: - branches: - only: - - staging - - prod - - dev2 - - qa - - qa2 - - qa3 - - uat - - data - - test: - filters: - branches: - ignore: - - dev2 - - qa - - qa2 - - qa3 - - data - - uat - - master - - staging - - prod - - data -======= - build: context: - SLACK_SECRETS - #test ->>>>>>> 8fa5a3e13267900e0bf98f7bf9ce588f5eb23ac7 + From bfcdf5a8895c128ac1ef98bdedb823f85f719bdc Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 10 Nov 2020 16:46:33 -0800 Subject: [PATCH 15/94] fixed --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d237cc8..3dd22b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,3 +51,4 @@ workflows: - SLACK_SECRETS + #test From 87b020974862a6ddde39b85864c720efbff1e336 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 10 Nov 2020 18:15:41 -0800 Subject: [PATCH 16/94] this test will fail --- .circleci/config.yml | 4 +--- catalog/tests/test_forms.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3dd22b0..5a88911 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: destination: tr1 - slack/notify: template: basic_fail_1 - event: always + event: fail mentions: '@henna' workflows: @@ -50,5 +50,3 @@ workflows: context: - SLACK_SECRETS - - #test diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 446b9e0..e8dbd26 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() - # date = "hello" + # date = datetime.date.today() + date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 10c8c7834c3f6585f02a20e957477c4e954bd6ed Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 8 Dec 2020 15:12:30 -1000 Subject: [PATCH 17/94] this is a commit --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index e8dbd26..446b9e0 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() + # date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 10992ed675a8fd527485f5d25d97f4a1f21f07d5 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 8 Dec 2020 15:14:36 -1000 Subject: [PATCH 18/94] this will have a failed test --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 446b9e0..e8dbd26 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() - # date = "hello" + # date = datetime.date.today() + date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From fda1374f61c282bb3a7f4ce10d439ac177c9e33c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:12:49 -1000 Subject: [PATCH 19/94] Update config.yml --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a88911..a6c5af2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,9 @@ jobs: - slack/notify: template: basic_fail_1 event: fail - mentions: '@henna' + mentions: '@henna' + - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests + workflows: my_workflow: From cdbb3c8b98e268937f0c992461eef9d19f3cc94d Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Fri, 11 Dec 2020 08:15:32 -1000 Subject: [PATCH 20/94] fix --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index e8dbd26..446b9e0 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() + # date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 2b582f97cc9ec52afe7e43cdc85a88c46a88091f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:24:29 -1000 Subject: [PATCH 21/94] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a6c5af2..b4f48cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,8 +42,8 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - +# - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests + - run: curl -u ${CIRCLECI_TOKEN}: -X GET --header "Content-Type: application/json" https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests workflows: my_workflow: From 41664f9330400944fc4a36eff86e0b4edcf62bfb Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:34:05 -1000 Subject: [PATCH 22/94] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4f48cc..4e5f13b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,8 @@ jobs: event: fail mentions: '@henna' # - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - - run: curl -u ${CIRCLECI_TOKEN}: -X GET --header "Content-Type: application/json" https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - + - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests \ + -H 'Circle-Token: $CIRCLE_TOKEN' workflows: my_workflow: jobs: From b283c67a895cd55b380159f91afc2e2ccca3f802 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:36:01 -1000 Subject: [PATCH 23/94] Update config.yml --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e5f13b..f545d87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,7 @@ jobs: event: fail mentions: '@henna' # - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests \ - -H 'Circle-Token: $CIRCLE_TOKEN' + - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/$CIRCLE_BUILD_NUM/tests \ -H 'Circle-Token: $CIRCLE_TOKEN' workflows: my_workflow: jobs: From ef2317278e758d0a682d9ef95ceda56a9e2aaa97 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:36:50 -1000 Subject: [PATCH 24/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f545d87..5c0cb22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: event: fail mentions: '@henna' # - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/$CIRCLE_BUILD_NUM/tests \ -H 'Circle-Token: $CIRCLE_TOKEN' + - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' workflows: my_workflow: jobs: From 393e6e3866f045221fe28e3027d9768329793364 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:48:03 -1000 Subject: [PATCH 25/94] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c0cb22..e82fa4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,8 +42,8 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' -# - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' + - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests +# - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' workflows: my_workflow: jobs: From b713ad83f9e34dc0fbf8b0e4a82c430da238ab0e Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:50:28 -1000 Subject: [PATCH 26/94] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e82fa4e..955f173 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,8 +42,8 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests -# - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' + - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests 'Circle-Token: ${CIRCLE_TOKEN}' + # - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' workflows: my_workflow: jobs: From 1b632772ed4a0f2a0d602bc01475d4c50989499d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:52:31 -1000 Subject: [PATCH 27/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 955f173..4681007 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests 'Circle-Token: ${CIRCLE_TOKEN}' + - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests --header 'Circle-Token: a09b8b7f1b3a8fbfc938253c892530208ddb0c39' # - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' workflows: my_workflow: From 29a640ce07cb48aff4bd7dc8c622d949176a871b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:57:52 -1000 Subject: [PATCH 28/94] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4681007..8f2a788 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests --header 'Circle-Token: a09b8b7f1b3a8fbfc938253c892530208ddb0c39' + # - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests --header 'Circle-Token: a09b8b7f1b3a8fbfc938253c892530208ddb0c39' # - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' workflows: my_workflow: From 6b3a8bba230bdd16d8d04b4d15b63d9fe17ad7ce Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Fri, 11 Dec 2020 10:59:29 -1000 Subject: [PATCH 29/94] env var --- .circleci/config.yml | 1 + hello.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 hello.py diff --git a/.circleci/config.yml b/.circleci/config.yml index a6c5af2..74e3d5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,7 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' + - run: MY_VAR=$(python3 hello.py) && echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..ae83d80 --- /dev/null +++ b/hello.py @@ -0,0 +1,4 @@ +# def hello(): +# print("HELLO WORLD") +# return "hello" +print("hello world") \ No newline at end of file From b64b3437372b61567cad153a1b91e02e8d145083 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 11 Dec 2020 11:01:11 -1000 Subject: [PATCH 30/94] Updated config.yml --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2a6bd9..2d8c12d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,15 +42,12 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' -<<<<<<< HEAD + - run: MY_VAR=$(python3 hello.py) && echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests -======= - # - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests --header 'Circle-Token: a09b8b7f1b3a8fbfc938253c892530208ddb0c39' - # - run: curl -X GET https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/${CIRCLE_BUILD_NUM}/tests -H 'Circle-Token: ${CIRCLE_TOKEN}' ->>>>>>> 29a640ce07cb48aff4bd7dc8c622d949176a871b + workflows: my_workflow: jobs: From 9d91027f0c5fdf37a695a98c92a0bddd97660708 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Fri, 11 Dec 2020 11:06:00 -1000 Subject: [PATCH 31/94] echo env var into bash env --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d8c12d..62b8520 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,12 +42,11 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - - run: MY_VAR=$(python3 hello.py) && echo $MY_VAR + - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=/$MY_VAR ' >> $BASH_ENV + - run: echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - workflows: my_workflow: jobs: From 4702954bf14733e1d7f513156791dde1465e6fd8 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Fri, 11 Dec 2020 11:06:58 -1000 Subject: [PATCH 32/94] fixed echo env var into bash env --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62b8520..98b5583 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: template: basic_fail_1 event: fail mentions: '@henna' - - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=/$MY_VAR ' >> $BASH_ENV + - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=$MY_VAR ' >> $BASH_ENV - run: echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests From efd3d4e0f0cfa780de78441393d1d281c2b54442 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 23 Dec 2020 10:51:55 -1000 Subject: [PATCH 33/94] Update config.yml --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98b5583..d60322a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,11 +40,8 @@ jobs: destination: tr1 - slack/notify: template: basic_fail_1 - event: fail mentions: '@henna' - - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=$MY_VAR ' >> $BASH_ENV - - run: echo $MY_VAR - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests + channel: henna-test-channel workflows: From dfae95581c03b20858437ec7639d1be08fcb2dbe Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 23 Dec 2020 10:53:25 -1000 Subject: [PATCH 34/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d60322a..9c76d59 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,7 @@ jobs: - slack/notify: template: basic_fail_1 mentions: '@henna' - channel: henna-test-channel + channel: HENNA-test-channel workflows: From 1f4d00d15b53227017e447f06273664de8594eed Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 4 Jan 2021 13:09:00 -1000 Subject: [PATCH 35/94] Update config.yml --- .circleci/config.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c76d59..c034362 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,41 @@ jobs: template: basic_fail_1 mentions: '@henna' channel: HENNA-test-channel + build_2: + working_directory: ~/circleci-demo-python-django + docker: + - image: circleci/python:3.6.4 + environment: + PIPENV_VENV_IN_PROJECT: true + DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable + - image: circleci/postgres:9.6.2 + environment: + POSTGRES_USER: root + POSTGRES_DB: circle_test + steps: + - checkout + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages + - restore_cache: + key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + - run: + command: | + sudo pip install pipenv + pipenv install + - save_cache: + key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + paths: + - '.venv' + - '/usr/local/bin' + - '/usr/local/lib/python3.6/site-packages' + - run: + command: | + pipenv run python manage.py test + - store_test_results: + path: test-results + - store_artifacts: + path: test-results + destination: tr2 workflows: From d654167c0034e60065dcd7d6b2e84b75c451a8a4 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 4 Jan 2021 13:10:04 -1000 Subject: [PATCH 36/94] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c034362..9d56f76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,5 +84,6 @@ workflows: jobs: - build: context: - - SLACK_SECRETS + - SLACK_SECRETS + - build_2 From 8ffe492dd76fa9e362945b1e7d4567c52b0c092d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 5 Jan 2021 16:31:58 -1000 Subject: [PATCH 37/94] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d56f76..04fa783 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,7 @@ jobs: command: | pipenv run python manage.py test - store_test_results: + name: renamed test result step path: test-results - store_artifacts: path: test-results From 98888f5eee97faf8094f3b2c0ad9de0e0539a715 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:12:59 -1000 Subject: [PATCH 38/94] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98b5583..b0bb9a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,8 @@ jobs: - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=$MY_VAR ' >> $BASH_ENV - run: echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests + + #test workflows: From cbfe03a46ad2d2116923faf58ffae26d7655de85 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:13:10 -1000 Subject: [PATCH 39/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0bb9a8..a82b44e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: echo $MY_VAR - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests - #test + workflows: From 7edd99cb7f2f75a75d22c5b623163125e464de0c Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:08:27 -1000 Subject: [PATCH 40/94] commit --- .circleci/config.yml | 137 ++++++++++++++++++++++++++++--------------- hello.py | 19 ++++-- 2 files changed, 104 insertions(+), 52 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98b5583..823aacf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,56 +1,97 @@ version: 2.1 -orbs: - slack: circleci/slack@4.0.0 +workflows: + my-workflow: + jobs: + - run-tests + - second_job + + jobs: - build: - working_directory: ~/circleci-demo-python-django + run-tests: + macos: + xcode: 11.3.0 + steps: +# - checkout + - run: echo "hello world" + - when: + condition: + equal: [ hourly-test, $CIRCLE_BRANCH ] + steps: + - run: echo "running conditional step" + + +# - checkout +# - run: +# name: "echo environment variables from org-global context" +# command: echo "hello world job 1 " +# - run: +# name: "Setup custom environment variables" +# command: echo 'export MY_ENV_VAR="FOO"' >> $BASH_ENV + + + second_job: docker: - - image: circleci/python:3.6.4 - environment: - PIPENV_VENV_IN_PROJECT: true - DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable - - image: circleci/postgres:9.6.2 - environment: - POSTGRES_USER: root - POSTGRES_DB: circle_test + - image: cimg/base:2020.01 steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - - restore_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - - run: - command: | - sudo pip install pipenv - pipenv install - - save_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - paths: - - '.venv' - - '/usr/local/bin' - - '/usr/local/lib/python3.6/site-packages' - - run: - command: | - pipenv run python manage.py test - - store_test_results: - path: test-results - - store_artifacts: - path: test-results - destination: tr1 - - slack/notify: - template: basic_fail_1 - event: fail - mentions: '@henna' - - run: MY_VAR=$(python3 hello.py) && echo 'export MY_VAR=$MY_VAR ' >> $BASH_ENV - - run: echo $MY_VAR - - run: curl --request GET --url https://circleci.com/api/v2/project/gh/HennaAbbas/circleci-demo-python-django/5/tests + - run: echo "bye world. This is a scheduled workflow/job" + +# version: 2.1 -workflows: - my_workflow: - jobs: - - build: - context: - - SLACK_SECRETS +# workflows: +# my-workflow: +# jobs: +# - run-tests + + + + + + +# jobs: +# run-tests: +# docker: +# - image: circleci/ruby:2.5.5-stretch-node-browsers +# steps: +# - checkout +# - run: echo "hello world" +# - run: echo "$CIRCLE_COMPARE_URL" +# - run: echo "$CI_PULL_REQUEST" +# - run: +# name: Gorelease (with new version or snapshot) +# command: | +# export VER=$( svu n ) +# echo $VER +# git tag $VER +# git add --all +# git push origin --tags +# - save_cache: +# key: deps/cache_v2 +# paths: +# - yocto/poky/build-microchip +version: 2.1 + +orbs: + cloudwheel-lowell: greenbird/cloudwheel-common@1.0.14 + cloudwheel: greenbird/cloudwheel@1.0.25 +# workflows: +# release-build: +# jobs: +# - cloudwheel-lowell/maven-build-release: +# # context: cloudwheel-common +# executor: cloudwheel-lowell/linux +# filters: +# branches: +# only: +# - master +# - cloudwheel-lowell/maven-nexus-deploy: +# image: cloudwheel-lowell/linux +# # context: cloudwheel-common +# filters: +# branches: +# only: +# - master +# requires: +# - cloudwheel-lowell/maven-build-release \ No newline at end of file diff --git a/hello.py b/hello.py index ae83d80..b8d9b2f 100644 --- a/hello.py +++ b/hello.py @@ -1,4 +1,15 @@ -# def hello(): -# print("HELLO WORLD") -# return "hello" -print("hello world") \ No newline at end of file +import requests + +payload = {'term': 'honeydew'} + +res = requests.get('https://itunes.apple.com/search', + params=payload) + +melon_songs = res.json() + +num_results = melon_songs['resultCount'] + +for i in range(num_results): + trackName = melon_songs['results'][i].get('trackName') + artistName = melon_songs['results'][i].get('artistName') + print({trackName}) \ No newline at end of file From a8c62a440788a892e9cefa32af86944e9e958119 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:11:21 -1000 Subject: [PATCH 41/94] fixed config --- .circleci/config.yml | 62 ++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c815901..5aac948 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,42 +1,20 @@ version: 2.1 +orbs: + slack: circleci/slack@4.0.0 -workflows: - my-workflow: - jobs: - - run-tests - - second_job - - jobs: - run-tests: - macos: - xcode: 11.3.0 - steps: -# - checkout - - run: echo "hello world" - - when: - condition: - equal: [ hourly-test, $CIRCLE_BRANCH ] - steps: - - run: echo "running conditional step" - - -# - checkout -# - run: -# name: "echo environment variables from org-global context" -# command: echo "hello world job 1 " -# - run: -# name: "Setup custom environment variables" -# command: echo 'export MY_ENV_VAR="FOO"' >> $BASH_ENV - - - second_job: + build: + working_directory: ~/circleci-demo-python-django docker: - - image: cimg/base:2020.01 + - image: circleci/python:3.6.4 + environment: + PIPENV_VENV_IN_PROJECT: true + DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable + - image: circleci/postgres:9.6.2 + environment: + POSTGRES_USER: root + POSTGRES_DB: circle_test steps: -<<<<<<< HEAD - - run: echo "bye world. This is a scheduled workflow/job" -======= - checkout - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages @@ -100,17 +78,15 @@ jobs: - store_artifacts: path: test-results destination: tr2 ->>>>>>> 8ffe492dd76fa9e362945b1e7d4567c52b0c092d - - -# version: 2.1 -<<<<<<< HEAD -# workflows: -# my-workflow: -# jobs: -# - run-tests +workflows: + my_workflow: + jobs: + - build: + context: + - SLACK_SECRETS + - build_2 From 1647c9bf227dc7c79c14db312cee4950da97cf0c Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:13:10 -1000 Subject: [PATCH 42/94] fixed config --- .circleci/config.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5aac948..1eefd34 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,20 +113,7 @@ workflows: # key: deps/cache_v2 # paths: # - yocto/poky/build-microchip -version: 2.1 -orbs: - cloudwheel-lowell: greenbird/cloudwheel-common@1.0.14 - cloudwheel: greenbird/cloudwheel@1.0.25 -======= -workflows: - my_workflow: - jobs: - - build: - context: - - SLACK_SECRETS - - build_2 ->>>>>>> 8ffe492dd76fa9e362945b1e7d4567c52b0c092d # workflows: # release-build: From d54830161145ca7f1faf20738ac559c041abc8fb Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:16:50 -1000 Subject: [PATCH 43/94] added tag filters --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1eefd34..774c23c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,13 @@ workflows: - build: context: - SLACK_SECRETS + filters: # required since `test` has tag filters AND requires `build` + tags: + only: /^config-test.*/ - build_2 + filters: # required since `test` has tag filters AND requires `build` + tags: + only: /^config-test.*/ From c0405b93c245b8cf46de61f20dd379719092b197 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:17:46 -1000 Subject: [PATCH 44/94] fixed typo in tag filter --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 774c23c..a521431 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -89,7 +89,7 @@ workflows: filters: # required since `test` has tag filters AND requires `build` tags: only: /^config-test.*/ - - build_2 + - build_2: filters: # required since `test` has tag filters AND requires `build` tags: only: /^config-test.*/ From e01e2a6ea2071f442a95a7f46d8731bc3070b7c9 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 25 Jan 2021 12:20:24 -1000 Subject: [PATCH 45/94] builds for all tags --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a521431..3f35fef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,11 +88,11 @@ workflows: - SLACK_SECRETS filters: # required since `test` has tag filters AND requires `build` tags: - only: /^config-test.*/ + only: /.*/ - build_2: filters: # required since `test` has tag filters AND requires `build` tags: - only: /^config-test.*/ + only: /.*/ From 62783a08cca13d9560b947910b5075466abcf690 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Wed, 27 Jan 2021 13:08:17 -1000 Subject: [PATCH 46/94] added mongo container --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f35fef..9fba7a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,8 +14,10 @@ jobs: environment: POSTGRES_USER: root POSTGRES_DB: circle_test + - image: circleci/mongo:3.5.6 steps: - checkout + - run: mongo --version - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From ed73918b8cba62e4b06606272b1f8833a1bd5336 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Wed, 27 Jan 2021 13:10:55 -1000 Subject: [PATCH 47/94] commit --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fba7a3..8044656 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,11 +13,10 @@ jobs: - image: circleci/postgres:9.6.2 environment: POSTGRES_USER: root - POSTGRES_DB: circle_test - - image: circleci/mongo:3.5.6 + POSTGRES_DB: circle_test steps: - checkout - - run: mongo --version + - run: postgres -V - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From fe85ac1f3749a43b004cdf0166c97f41efbe55e2 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 5 Feb 2021 15:09:55 -1000 Subject: [PATCH 48/94] Update config.yml --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8044656..0ddd5ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,6 +43,14 @@ jobs: template: basic_fail_1 mentions: '@henna' channel: HENNA-test-channel + + - run: pwd + + - persist_to_workspace: + root: ~/ + paths: + - test-results + build_2: working_directory: ~/circleci-demo-python-django docker: @@ -140,4 +148,4 @@ workflows: # only: # - master # requires: -# - cloudwheel-lowell/maven-build-release \ No newline at end of file +# - cloudwheel-lowell/maven-build-release From 6ee611907c6cd174e30278060a255a508b89047c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 5 Feb 2021 15:12:50 -1000 Subject: [PATCH 49/94] Update config.yml --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ddd5ab..9314b1b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,6 @@ jobs: POSTGRES_DB: circle_test steps: - checkout - - run: postgres -V - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: @@ -102,7 +101,7 @@ workflows: filters: # required since `test` has tag filters AND requires `build` tags: only: /.*/ - +# From f47f77452b87d02f37a00b0f1a302e1f6a92987c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 5 Feb 2021 15:24:29 -1000 Subject: [PATCH 50/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9314b1b..8bdc622 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: pwd - persist_to_workspace: - root: ~/ + root: ./ paths: - test-results From 10d867fa43741ff7797cd1142eebb0557e31d62c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 9 Feb 2021 13:56:27 -1000 Subject: [PATCH 51/94] Update config.yml --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bdc622..a45137d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,9 +46,12 @@ jobs: - run: pwd - persist_to_workspace: - root: ./ +# root: ./ +# paths: +# - test-results + root: / paths: - - test-results + - tmp build_2: working_directory: ~/circleci-demo-python-django From af3411a41998ad66134f5b13b994ef945fdf32b4 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 9 Feb 2021 13:59:27 -1000 Subject: [PATCH 52/94] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a45137d..9feb6c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,7 +51,8 @@ jobs: # - test-results root: / paths: - - tmp + - home/circleci/circleci-demo-python-django + build_2: working_directory: ~/circleci-demo-python-django From ec39e76bcbd167da816e2a4b060dd501eeb95fd9 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Wed, 10 Feb 2021 07:43:00 -1000 Subject: [PATCH 53/94] commit --- .circleci/config.yml | 100 ++----------------------------------------- 1 file changed, 4 insertions(+), 96 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8044656..9daae3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,10 +13,9 @@ jobs: - image: circleci/postgres:9.6.2 environment: POSTGRES_USER: root - POSTGRES_DB: circle_test + POSTGRES_DB: circle_test steps: - checkout - - run: postgres -V - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: @@ -41,103 +40,12 @@ jobs: destination: tr1 - slack/notify: template: basic_fail_1 - mentions: '@henna' - channel: HENNA-test-channel - build_2: - working_directory: ~/circleci-demo-python-django - docker: - - image: circleci/python:3.6.4 - environment: - PIPENV_VENV_IN_PROJECT: true - DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable - - image: circleci/postgres:9.6.2 - environment: - POSTGRES_USER: root - POSTGRES_DB: circle_test - steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - - restore_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - - run: - command: | - sudo pip install pipenv - pipenv install - - save_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - paths: - - '.venv' - - '/usr/local/bin' - - '/usr/local/lib/python3.6/site-packages' - - run: - command: | - pipenv run python manage.py test - - store_test_results: - name: renamed test result step - path: test-results - - store_artifacts: - path: test-results - destination: tr2 - + event: always + mentions: '@henna' workflows: my_workflow: jobs: - build: context: - - SLACK_SECRETS - filters: # required since `test` has tag filters AND requires `build` - tags: - only: /.*/ - - build_2: - filters: # required since `test` has tag filters AND requires `build` - tags: - only: /.*/ - - - - - -# jobs: -# run-tests: -# docker: -# - image: circleci/ruby:2.5.5-stretch-node-browsers -# steps: -# - checkout -# - run: echo "hello world" -# - run: echo "$CIRCLE_COMPARE_URL" -# - run: echo "$CI_PULL_REQUEST" -# - run: -# name: Gorelease (with new version or snapshot) -# command: | -# export VER=$( svu n ) -# echo $VER -# git tag $VER -# git add --all -# git push origin --tags -# - save_cache: -# key: deps/cache_v2 -# paths: -# - yocto/poky/build-microchip - - -# workflows: -# release-build: -# jobs: -# - cloudwheel-lowell/maven-build-release: -# # context: cloudwheel-common -# executor: cloudwheel-lowell/linux -# filters: -# branches: -# only: -# - master -# - cloudwheel-lowell/maven-nexus-deploy: -# image: cloudwheel-lowell/linux -# # context: cloudwheel-common -# filters: -# branches: -# only: -# - master -# requires: -# - cloudwheel-lowell/maven-build-release \ No newline at end of file + - SLACK_SECRETS \ No newline at end of file From 229a37de00749bfe65136ab2a9ddd2785dfea7ad Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Wed, 10 Feb 2021 08:16:29 -1000 Subject: [PATCH 54/94] this test should fail --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 446b9e0..e8dbd26 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() - # date = "hello" + # date = datetime.date.today() + date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 91ca4db360910dea97e3f33c2449ecaee2fb501c Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Wed, 10 Feb 2021 08:18:38 -1000 Subject: [PATCH 55/94] fixed failing code --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index e8dbd26..446b9e0 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() + # date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 88b0f3c331cab1ae62d99d914f4e3390d9653780 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 14:21:33 -1000 Subject: [PATCH 56/94] testing --- .circleci/config.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9daae3b..4f08fbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,20 @@ jobs: - slack/notify: template: basic_fail_1 event: always - mentions: '@henna' + mentions: '@henna' + test: + working_directory: ~/circleci-demo-python-django + docker: + - image: circleci/python:3.6.4 + steps: + - run: | + mkdir test_folder && touch test_folder/test_file.txt && echo "this is a test" > test_folder/test_file.txt + - persist_to_workspace: + root: ./test_folder + paths: + - test_file.txt + + workflows: my_workflow: From 7079c83c03899786f55b857bb70934c851563aaa Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 14:27:58 -1000 Subject: [PATCH 57/94] workspaces --- .circleci/config.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f08fbd..b767c83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: template: basic_fail_1 event: always mentions: '@henna' - test: + test_persist_to_workspace: working_directory: ~/circleci-demo-python-django docker: - image: circleci/python:3.6.4 @@ -53,12 +53,22 @@ jobs: root: ./test_folder paths: - test_file.txt + - + test_attatch_workspace: + working_directory: ~/circleci-demo-python-django + docker: + - image: circleci/python:3.6.4 + steps: + - attach_workspace: + at: /tmp/workspace workflows: my_workflow: jobs: - build: context: - - SLACK_SECRETS \ No newline at end of file + - SLACK_SECRETS + - test_persist_to_workspace + - test_attatch_workspace + \ No newline at end of file From a8352c8e200dc3f27ed0c572a02ffc820461e047 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 15:11:04 -1000 Subject: [PATCH 58/94] our first build --- .circleci/config.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b767c83..79bcc33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,26 +42,7 @@ jobs: template: basic_fail_1 event: always mentions: '@henna' - test_persist_to_workspace: - working_directory: ~/circleci-demo-python-django - docker: - - image: circleci/python:3.6.4 - steps: - - run: | - mkdir test_folder && touch test_folder/test_file.txt && echo "this is a test" > test_folder/test_file.txt - - persist_to_workspace: - root: ./test_folder - paths: - - test_file.txt - - - test_attatch_workspace: - working_directory: ~/circleci-demo-python-django - docker: - - image: circleci/python:3.6.4 - steps: - - attach_workspace: - at: /tmp/workspace + workflows: my_workflow: @@ -69,6 +50,4 @@ workflows: - build: context: - SLACK_SECRETS - - test_persist_to_workspace - - test_attatch_workspace - \ No newline at end of file + From 83db540ab59cb74cc2f24cce51cf38505f35064c Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 15:14:06 -1000 Subject: [PATCH 59/94] our test will break --- catalog/tests/test_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index 446b9e0..e8dbd26 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - date = datetime.date.today() - # date = "hello" + # date = datetime.date.today() + date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 7ff34c0a7ee57b3d712bcba24d9f151f87e2429f Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 15:32:26 -1000 Subject: [PATCH 60/94] workspaces --- .circleci/config.yml | 22 +++++++++++++++++++++- catalog/tests/test_forms.py | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79bcc33..9f2d6dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,27 @@ jobs: template: basic_fail_1 event: always mentions: '@henna' - + + test_job_1: + working_directory: ~/circleci-demo-python-django + docker: + - image: circleci/python:3.6.4 + steps: + - run: | + mkdir test_folder && touch test_file.txt && echo "this is a test" > test_folder/test_file.txt + + - persist_to_workspace: + root: ./test_folder + paths: + - test_file.txt + + test_job_2: + working_directory: ~/circleci-demo-python-django + docker: + - image: circleci/python:3.6.4 + steps: + - attach_workspace: + at: /tmp/workspace workflows: my_workflow: diff --git a/catalog/tests/test_forms.py b/catalog/tests/test_forms.py index e8dbd26..446b9e0 100644 --- a/catalog/tests/test_forms.py +++ b/catalog/tests/test_forms.py @@ -30,8 +30,8 @@ def test_renew_form_date_today(self): """ Test form is valid if renewal_date is today """ - # date = datetime.date.today() - date = "hello" + date = datetime.date.today() + # date = "hello" form_data = {'renewal_date': date} form = RenewBookForm(data=form_data) self.assertTrue(form.is_valid()) From 76e2c71a1f2f9b5c5f24498888505e5e85505895 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 15:34:19 -1000 Subject: [PATCH 61/94] called jobs --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f2d6dc..52b7c2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,4 +70,6 @@ workflows: - build: context: - SLACK_SECRETS + - test_job_1 + - test_job_2 From 954c9a7c79f2d3e13b9ea13caff8b68cffdf3a45 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Tue, 16 Feb 2021 15:36:59 -1000 Subject: [PATCH 62/94] running jobs sequentially --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52b7c2f..07d1138 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,5 +71,7 @@ workflows: context: - SLACK_SECRETS - test_job_1 - - test_job_2 + - test_job_2: + requires: + - test_job_1 From 11dba2c5475c1250c6e45c881ffc9e397115a169 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 12:19:19 -1000 Subject: [PATCH 63/94] test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07d1138..3a755df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,7 @@ jobs: POSTGRES_DB: circle_test steps: - checkout + - echo " << pipeline.git.base_revision >> " - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 43c7dbd956cd3315fbf9bd5498c10849c52355a2 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 12:23:50 -1000 Subject: [PATCH 64/94] test branch --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a755df..a5481b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: POSTGRES_DB: circle_test steps: - checkout - - echo " << pipeline.git.base_revision >> " + - run: echo " << pipeline.git.base_revision >> " - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 0fca8d73e97018af4b8ecb57d8c4ea9b1119cff0 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 12:26:08 -1000 Subject: [PATCH 65/94] checking --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a5481b9..e4240d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: POSTGRES_DB: circle_test steps: - checkout - - run: echo " << pipeline.git.base_revision >> " + - run: echo " The basepipline is : << pipeline.git.base_revision >> " - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 647d62a3b45f2defb4bf7be15f41901b78bf82e6 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 13:09:18 -1000 Subject: [PATCH 66/94] fixed typo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e4240d9..74eeb83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: POSTGRES_DB: circle_test steps: - checkout - - run: echo " The basepipline is : << pipeline.git.base_revision >> " + - run: echo "<< pipeline.git.base_revision >> " - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 85b3febb2dccc5b1c9b23872c0ca9096a18d7413 Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 13:16:05 -1000 Subject: [PATCH 67/94] checking SHA --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 74eeb83..7fe03a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,8 @@ jobs: POSTGRES_DB: circle_test steps: - checkout - - run: echo "<< pipeline.git.base_revision >> " + - run: echo "<< pipeline.git.base_revision >> " + - run: echo "$CIRCLE_SHA" - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 0c6c533b4a727b283e4e285ba6c8d7bd68229aeb Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 13:18:35 -1000 Subject: [PATCH 68/94] fixed env var syntax --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fe03a5..f35f5b6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: steps: - checkout - run: echo "<< pipeline.git.base_revision >> " - - run: echo "$CIRCLE_SHA" + - run: echo "CIRCLE_SHA" - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 57ea2f415ac642c6c5a618975366766119c6ce0d Mon Sep 17 00:00:00 2001 From: Henna Abbas Date: Mon, 22 Feb 2021 14:20:02 -1000 Subject: [PATCH 69/94] added a step to check git diff --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f35f5b6..7cb0f2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,7 @@ jobs: - checkout - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" + - run: git diff test..master - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From b7a1b092bb9591d833954ed8db70148747486feb Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 13:34:52 -1000 Subject: [PATCH 70/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cb0f2a..28df555 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - checkout - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" - - run: git diff test..master +# - run: git diff test..master - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 38ec20689a0f64f0ecfb0b67b18ef6fbe7c4fd00 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 13:35:15 -1000 Subject: [PATCH 71/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 28df555..67ff7f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: root: ./test_folder paths: - test_file.txt - +# test_job_2: working_directory: ~/circleci-demo-python-django docker: From 61812f9a9c6ea2cdad17b5f62f0e822ad4702383 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 13:35:57 -1000 Subject: [PATCH 72/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 67ff7f7..f24611f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - checkout - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" -# - run: git diff test..master +# - run: git diff test..master # - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From 8bf56f45e99669309e7277eedc5343f52db4ed81 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 13:36:23 -1000 Subject: [PATCH 73/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f24611f..b0741d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - checkout - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" -# - run: git diff test..master # +# - run: git diff test..master # # - run: sudo chown -R circleci:circleci /usr/local/bin - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - restore_cache: From c4cf630f9fe081ce5d6f73c71a8a052664471042 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 15:26:05 -1000 Subject: [PATCH 74/94] Update config.yml --- .circleci/config.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0741d5..b06d2ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,6 +66,10 @@ jobs: steps: - attach_workspace: at: /tmp/workspace + - slack/notify: + template: basic_fail_1 + event: always + mentions: '@henna' workflows: my_workflow: @@ -74,7 +78,21 @@ workflows: context: - SLACK_SECRETS - test_job_1 - - test_job_2: - requires: - - test_job_1 + my_other_workflow: + jobs: + - test_job_1 + nightly: + triggers: + - schedule: + cron: "* * * * *" + filters: + branches: + only: + - test + + jobs: + - test_job_2: + context: + - SLACK_SECRETS + From d1be7b6f71ff1d533db2751594fe69bda178bd9b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 15:37:09 -1000 Subject: [PATCH 75/94] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b06d2ed..41f13c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,6 +60,7 @@ jobs: - test_file.txt # test_job_2: + circleci_ip_ranges: true working_directory: ~/circleci-demo-python-django docker: - image: circleci/python:3.6.4 From 67c0fb0aa00d8952ddc53b82b5ba570cde09bc29 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 15:40:05 -1000 Subject: [PATCH 76/94] Update config.yml --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41f13c9..ef06e63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,4 +96,7 @@ workflows: - test_job_2: context: - SLACK_SECRETS - + version: 2 + spin-down-review-env: + jobs: + - build From e752d6c01c338cc32a208158da96062345217f5f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 16 Nov 2021 15:42:56 -1000 Subject: [PATCH 77/94] Update config.yml --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef06e63..3528c40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,14 +83,14 @@ workflows: my_other_workflow: jobs: - test_job_1 - nightly: + + routine-flaky-e2e-tests: triggers: - - schedule: - cron: "* * * * *" - filters: - branches: - only: - - test + - schedule: + cron: 0 11,18 * * 1-5 + filters: + branches: + only: [test] jobs: - test_job_2: From 88af251d9b5f70317acc64c34cd0edb1f92fa91d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 9 Dec 2021 08:46:19 -1000 Subject: [PATCH 78/94] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3528c40..98cf4f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: build: working_directory: ~/circleci-demo-python-django docker: - - image: circleci/python:3.6.4 + - image: cimg/python:3.9 environment: PIPENV_VENV_IN_PROJECT: true DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable @@ -16,6 +16,7 @@ jobs: POSTGRES_DB: circle_test steps: - checkout + - run : pip install codecov - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" # - run: git diff test..master # # From d15ddb0b6ac5d7af65492517faae204715897ae3 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 9 Dec 2021 10:21:36 -1000 Subject: [PATCH 79/94] Update config.yml --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98cf4f3..0635062 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,8 +15,11 @@ jobs: POSTGRES_USER: root POSTGRES_DB: circle_test steps: + - add_ssh_keys: + fingerprints: + - "c4:6f:35:b6:b6:fa:17:56:19:eb:ab:6b:86:1e:22:f4" - checkout - - run : pip install codecov + - run: echo "<< pipeline.git.base_revision >> " - run: echo "CIRCLE_SHA" # - run: git diff test..master # # From e592a8e5bf9696eb04cb7b1c57a205bec99c2f2b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 9 Dec 2021 10:26:53 -1000 Subject: [PATCH 80/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0635062..f69b7e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: steps: - add_ssh_keys: fingerprints: - - "c4:6f:35:b6:b6:fa:17:56:19:eb:ab:6b:86:1e:22:f4" + - "83:54:85:e4:8f:45:9f:af:91:92:29:48:51:33:47:cb" - checkout - run: echo "<< pipeline.git.base_revision >> " From f4196e84844215aa1508752b4a4d66221b67a497 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 9 Dec 2021 13:24:40 -1000 Subject: [PATCH 81/94] Update config.yml --- .circleci/config.yml | 176 +++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 89 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f69b7e3..30e699d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,105 +1,103 @@ version: 2.1 -orbs: - slack: circleci/slack@4.0.0 +# orbs: +# slack: circleci/slack@4.0.0 jobs: build: - working_directory: ~/circleci-demo-python-django +# working_directory: ~/circleci-demo-python-django docker: - - image: cimg/python:3.9 - environment: - PIPENV_VENV_IN_PROJECT: true - DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable - - image: circleci/postgres:9.6.2 - environment: - POSTGRES_USER: root - POSTGRES_DB: circle_test + - image: cimg/ruby:2.7.4-browsers +# environment: +# PIPENV_VENV_IN_PROJECT: true +# DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable +# - image: circleci/postgres:9.6.2 +# environment: +# POSTGRES_USER: root +# POSTGRES_DB: circle_test steps: - - add_ssh_keys: - fingerprints: - - "83:54:85:e4:8f:45:9f:af:91:92:29:48:51:33:47:cb" - - checkout + - run: sudo apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 +# - checkout - - run: echo "<< pipeline.git.base_revision >> " - - run: echo "CIRCLE_SHA" -# - run: git diff test..master # # - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages - - restore_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - - run: - command: | - sudo pip install pipenv - pipenv install - - save_cache: - key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - paths: - - '.venv' - - '/usr/local/bin' - - '/usr/local/lib/python3.6/site-packages' - - run: - command: | - pipenv run python manage.py test - - store_test_results: - path: test-results - - store_artifacts: - path: test-results - destination: tr1 - - slack/notify: - template: basic_fail_1 - event: always - mentions: '@henna' +# - run: echo "<< pipeline.git.base_revision >> " +# - run: echo "CIRCLE_SHA" +# # - run: git diff test..master # # +# - run: sudo chown -R circleci:circleci /usr/local/bin +# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages +# - restore_cache: +# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} +# - run: +# command: | +# sudo pip install pipenv +# pipenv install +# - save_cache: +# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} +# paths: +# - '.venv' +# - '/usr/local/bin' +# - '/usr/local/lib/python3.6/site-packages' +# - run: +# command: | +# pipenv run python manage.py test +# - store_test_results: +# path: test-results +# - store_artifacts: +# path: test-results +# destination: tr1 +# - slack/notify: +# template: basic_fail_1 +# event: always +# mentions: '@henna' - test_job_1: - working_directory: ~/circleci-demo-python-django - docker: - - image: circleci/python:3.6.4 - steps: - - run: | - mkdir test_folder && touch test_file.txt && echo "this is a test" > test_folder/test_file.txt +# test_job_1: +# working_directory: ~/circleci-demo-python-django +# docker: +# - image: circleci/python:3.6.4 +# steps: +# - run: | +# mkdir test_folder && touch test_file.txt && echo "this is a test" > test_folder/test_file.txt - - persist_to_workspace: - root: ./test_folder - paths: - - test_file.txt -# - test_job_2: - circleci_ip_ranges: true - working_directory: ~/circleci-demo-python-django - docker: - - image: circleci/python:3.6.4 - steps: - - attach_workspace: - at: /tmp/workspace - - slack/notify: - template: basic_fail_1 - event: always - mentions: '@henna' +# - persist_to_workspace: +# root: ./test_folder +# paths: +# - test_file.txt +# # +# test_job_2: +# circleci_ip_ranges: true +# working_directory: ~/circleci-demo-python-django +# docker: +# - image: circleci/python:3.6.4 +# steps: +# - attach_workspace: +# at: /tmp/workspace +# - slack/notify: +# template: basic_fail_1 +# event: always +# mentions: '@henna' -workflows: - my_workflow: - jobs: - - build: - context: - - SLACK_SECRETS - - test_job_1 +# workflows: +# my_workflow: +# jobs: +# - build: +# context: +# - SLACK_SECRETS +# - test_job_1 - my_other_workflow: - jobs: - - test_job_1 +# my_other_workflow: +# jobs: +# - test_job_1 - routine-flaky-e2e-tests: - triggers: - - schedule: - cron: 0 11,18 * * 1-5 - filters: - branches: - only: [test] +# routine-flaky-e2e-tests: +# triggers: +# - schedule: +# cron: 0 11,18 * * 1-5 +# filters: +# branches: +# only: [test] - jobs: - - test_job_2: - context: - - SLACK_SECRETS +# jobs: +# - test_job_2: +# context: +# - SLACK_SECRETS version: 2 spin-down-review-env: jobs: From 804be9afc19825044c4a79cb5636668ab9cd43c0 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 10 Dec 2021 08:11:56 -1000 Subject: [PATCH 82/94] Update config.yml --- .circleci/config.yml | 101 +++---------------------------------------- 1 file changed, 6 insertions(+), 95 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30e699d..79e3191 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,101 +4,12 @@ version: 2.1 jobs: build: -# working_directory: ~/circleci-demo-python-django docker: - - image: cimg/ruby:2.7.4-browsers -# environment: -# PIPENV_VENV_IN_PROJECT: true -# DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable -# - image: circleci/postgres:9.6.2 -# environment: -# POSTGRES_USER: root -# POSTGRES_DB: circle_test + - image: cimg/python:3.9 steps: - - run: sudo apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 -# - checkout - -# - run: echo "<< pipeline.git.base_revision >> " -# - run: echo "CIRCLE_SHA" -# # - run: git diff test..master # # -# - run: sudo chown -R circleci:circleci /usr/local/bin -# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages -# - restore_cache: -# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} -# - run: -# command: | -# sudo pip install pipenv -# pipenv install -# - save_cache: -# key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }} -# paths: -# - '.venv' -# - '/usr/local/bin' -# - '/usr/local/lib/python3.6/site-packages' -# - run: -# command: | -# pipenv run python manage.py test -# - store_test_results: -# path: test-results -# - store_artifacts: -# path: test-results -# destination: tr1 -# - slack/notify: -# template: basic_fail_1 -# event: always -# mentions: '@henna' - -# test_job_1: -# working_directory: ~/circleci-demo-python-django -# docker: -# - image: circleci/python:3.6.4 -# steps: -# - run: | -# mkdir test_folder && touch test_file.txt && echo "this is a test" > test_folder/test_file.txt - -# - persist_to_workspace: -# root: ./test_folder -# paths: -# - test_file.txt -# # -# test_job_2: -# circleci_ip_ranges: true -# working_directory: ~/circleci-demo-python-django -# docker: -# - image: circleci/python:3.6.4 -# steps: -# - attach_workspace: -# at: /tmp/workspace -# - slack/notify: -# template: basic_fail_1 -# event: always -# mentions: '@henna' - -# workflows: -# my_workflow: -# jobs: -# - build: -# context: -# - SLACK_SECRETS -# - test_job_1 - -# my_other_workflow: -# jobs: -# - test_job_1 - -# routine-flaky-e2e-tests: -# triggers: -# - schedule: -# cron: 0 11,18 * * 1-5 -# filters: -# branches: -# only: [test] - -# jobs: -# - test_job_2: -# context: -# - SLACK_SECRETS - version: 2 - spin-down-review-env: - jobs: + - run: pip install coverage + - run: echo $PATH +version: 2 +spin-down-review-env: + jobs: - build From 2859bf189908a13d0d347e6ad7e3f5550bcf48d5 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:47:37 -1000 Subject: [PATCH 83/94] Update config.yml --- .circleci/config.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79e3191..b21009a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,15 +1,28 @@ version: 2.1 -# orbs: -# slack: circleci/slack@4.0.0 - +orbs: + slack: circleci/slack@4.5.2 + run-with-retry: kimh/run-with-retry@1.0.0 +#test jobs: build: + working_directory: ~/circleci-demo-python-django docker: - - image: cimg/python:3.9 + - image: circleci/python:3.6.4 steps: - - run: pip install coverage - - run: echo $PATH -version: 2 -spin-down-review-env: - jobs: - - build + - slack/notify: + template: basic_success_1 + event: always + mentions: '@henna' + + + + + +workflows: + my_workflow: + jobs: + - build: + context: + - SLACK_SECRETS + + From f79163cb45f03989989f656fd7fa99590f6cace2 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:49:33 -1000 Subject: [PATCH 84/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b21009a..d7092ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build: working_directory: ~/circleci-demo-python-django docker: - - image: circleci/python:3.6.4 + - image: cimg/base:2020.01 steps: - slack/notify: template: basic_success_1 From 1480fd5fdbc58a6016cd2bfde970b881be91a849 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:51:35 -1000 Subject: [PATCH 85/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7092ba..13e87c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - slack: circleci/slack@4.5.2 + slack: circleci/slack@4.6.1 run-with-retry: kimh/run-with-retry@1.0.0 #test jobs: From 1cbb395d56fe1fa84be1f845e0580881131f0a8d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 19 Jan 2022 08:58:17 -1000 Subject: [PATCH 86/94] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13e87c7..8863b92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,8 @@ jobs: docker: - image: cimg/base:2020.01 steps: + - checkout + - run: cat /home/circleci/.ssh/id_rsa - slack/notify: template: basic_success_1 event: always From b572427ab10970985cca55953bc739cbea0806e4 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 19 Jan 2022 08:59:10 -1000 Subject: [PATCH 87/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8863b92..1b50faa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: docker: - image: cimg/base:2020.01 steps: - - checkout + - run: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" --no-tags . - run: cat /home/circleci/.ssh/id_rsa - slack/notify: template: basic_success_1 From 8fc3c7bed74abb5ff1dba061c70d60c9ca148f7d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 19 Jan 2022 09:01:18 -1000 Subject: [PATCH 88/94] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b50faa..d09c8ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: docker: - image: cimg/base:2020.01 steps: - - run: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" --no-tags . +# - run: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" --no-tags . - run: cat /home/circleci/.ssh/id_rsa - slack/notify: template: basic_success_1 From db2ecf732f2cb9f85539e211e0d94c62c15fb17c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 24 Jan 2022 08:27:57 -1000 Subject: [PATCH 89/94] Update config.yml --- .circleci/config.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d09c8ac..094db55 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,12 +9,10 @@ jobs: docker: - image: cimg/base:2020.01 steps: -# - run: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" --no-tags . - - run: cat /home/circleci/.ssh/id_rsa - - slack/notify: - template: basic_success_1 - event: always - mentions: '@henna' + + - add_ssh_keys: + fingerprints: + - "00:00:12:3a:05:f7:87:4b:5a:fe:4c:5c:6d:14:a7:06" @@ -23,8 +21,6 @@ jobs: workflows: my_workflow: jobs: - - build: - context: - - SLACK_SECRETS + - build From cba5021b8ac4fec5b7291609bcbcf5b7bf32e586 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 24 Jan 2022 09:08:00 -1000 Subject: [PATCH 90/94] Update config.yml --- .circleci/config.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 094db55..763198b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,11 +9,31 @@ jobs: docker: - image: cimg/base:2020.01 steps: - - - add_ssh_keys: - fingerprints: - - "00:00:12:3a:05:f7:87:4b:5a:fe:4c:5c:6d:14:a7:06" - + - restore_cache: + keys: + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- + - checkout + - save_cache: + key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + paths: + - .git + test: + working_directory: ~/circleci-demo-python-django + docker: + - image: cimg/base:2020.01 + steps: + - restore_cache: + keys: + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- + - checkout + - save_cache: + key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + paths: + - .git @@ -22,5 +42,6 @@ workflows: my_workflow: jobs: - build + - test From 39999775bdb7d05cde1b41f0c8c06e3ceca17d8d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 24 Jan 2022 09:10:51 -1000 Subject: [PATCH 91/94] Update config.yml --- .circleci/config.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 763198b..4f845f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,31 +9,31 @@ jobs: docker: - image: cimg/base:2020.01 steps: - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- - - checkout - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - paths: - - .git + - restore_cache: + keys: + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- + - checkout + - save_cache: + key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + paths: + - .git test: working_directory: ~/circleci-demo-python-django docker: - image: cimg/base:2020.01 steps: - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- - - checkout - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - paths: - - .git + - restore_cache: + keys: + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- + - checkout + - save_cache: + key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} + paths: + - .git From c9a5f8b45b24747cda5fb93dc351447837662afa Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 26 Jan 2022 08:47:42 -1000 Subject: [PATCH 92/94] Update config.yml --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f845f9..e3c53a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,6 @@ jobs: - restore_cache: keys: - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- - checkout - save_cache: key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} @@ -27,8 +25,6 @@ jobs: - restore_cache: keys: - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}- - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git- - checkout - save_cache: key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} From d7e39b2b32c1d6e265ba764256240c4d86134e78 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 26 Jan 2022 09:07:14 -1000 Subject: [PATCH 93/94] Update config.yml --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e3c53a7..10e20df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,10 +13,10 @@ jobs: keys: - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - checkout - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - paths: - - .git +# - save_cache: +# key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} +# paths: +# - .git test: working_directory: ~/circleci-demo-python-django docker: @@ -26,10 +26,10 @@ jobs: keys: - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - checkout - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - paths: - - .git +# - save_cache: +# key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} +# paths: +# - .git From 6ec4bf6adcfbf388395956758cf0b402d906cba1 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:16:28 -1000 Subject: [PATCH 94/94] Update config.yml --- .circleci/config.yml | 133 +++++++++++++++++++++++++++++++++---------- 1 file changed, 104 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 10e20df..d5b346c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,43 +1,118 @@ version: 2.1 + +test-names: &test-names + - mocha:unit:ci + - mocha:unit:rateplan + - test:billing-service-integration + orbs: - slack: circleci/slack@4.6.1 - run-with-retry: kimh/run-with-retry@1.0.0 -#test + slack: circleci/slack@4.12 + +parameters: + service_name: + default: "my-awesome-service" + type: string + + dev_channels: + default: "slack-notify-test" + type: string + + staging_channels: + default: "slack-notify-test" + type: string + + prodcopy_channels: + default: "slack-notify-test" + type: string + + prod_channels: + default: "slack-notify-test" + type: string + + environment: + default: "prod" + type: string + jobs: - build: - working_directory: ~/circleci-demo-python-django + deploy: docker: - - image: cimg/base:2020.01 + - image: 'cimg/base:stable' + resource_class: hippo/k8s-small + parameters: + test-name: + type: string steps: - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - checkout -# - save_cache: -# key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} -# paths: -# - .git + - run: + name: "Simple echo" + command: | + pwd + echo "Testing Slack notification." + echo "Test name: << parameters.test-name >>" + - slack/notify: + step_name: "Send Slack - Failure" + channel: "slack-notify-test, " + event: fail + template: basic_fail_1 + - slack/notify: + step_name: "Send Slack - Success" + channel: "slack-notify-test, " + custom: | + { + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":white_check_mark: Success to deploy << parameters.test-name >> to << pipeline.parameters.environment >>", + "emoji": true + } + }, + { + "type": "actions", + "elements": [ + { + "type": "button", + "text": { + "text": "View Deployment Job", + "type": "plain_text" + }, + "url": "${CIRCLE_BUILD_URL}" + } + ] + } + ] + } + event: pass test: - working_directory: ~/circleci-demo-python-django docker: - - image: cimg/base:2020.01 + - image: 'cimg/base:stable' steps: - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} - - checkout -# - save_cache: -# key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-git-{{ .Branch }}-{{ .Revision }} -# paths: -# - .git - - - + - run: + command: | + echo "test my app" + echo "export ENV_NAME=staging" >> $BASH_ENV workflows: - my_workflow: + test-and-deploy: jobs: - - build - test + - slack/on-hold: + channel: 'slack-notify-test' + context: slack-secrets + requires: + - test + - pause_workflow: + requires: + - test + - slack/on-hold + type: approval + - deploy: + matrix: + alias: "Test name" + parameters: + test-name: *test-names + context: slack-secrets + requires: + - pause_workflow