From 7d3d06450436314fdaa529bdd34f0e243a3d2267 Mon Sep 17 00:00:00 2001 From: Steve Hillier Date: Wed, 13 Jun 2018 14:11:12 -0700 Subject: [PATCH 1/6] remove NOSE_PROCESSES env variable (disable parallel testing) --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7bb3ae5e84..2358c1705b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -167,7 +167,7 @@ _stage('Unit Test', context) { npm --version (cd /opt/app-root/src && python manage.py migrate) - (cd /opt/app-root/src && export ENABLE_DATA_ENTRY="True" && export NOSE_PROCESSES=4 && python manage.py test -c nose.cfg) + (cd /opt/app-root/src && export ENABLE_DATA_ENTRY="True" && python manage.py test -c nose.cfg) (cd /opt/app-root/src/frontend && npm test) mkdir -p frontend/test/ cp -R /opt/app-root/src/frontend/test/unit ./frontend/test/ From 5bda04d07a8e35d28107017f62c5958860d4ea1b Mon Sep 17 00:00:00 2001 From: Steve Hillier Date: Wed, 13 Jun 2018 14:14:36 -0700 Subject: [PATCH 2/6] add set -e on bash script that runs test --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2358c1705b..9148a41462 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -160,7 +160,7 @@ _stage('Unit Test', context) { try { container('app') { sh script: '''#!/usr/bin/container-entrypoint /bin/sh - set -x + set -euo nounset python --version pip --version node --version From 8ffa7676ada79333be67e1d4939412ad3759b8a2 Mon Sep 17 00:00:00 2001 From: Steve Hillier Date: Wed, 13 Jun 2018 15:08:54 -0700 Subject: [PATCH 3/6] fix set command arguments --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9148a41462..dfc97b26b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -160,7 +160,7 @@ _stage('Unit Test', context) { try { container('app') { sh script: '''#!/usr/bin/container-entrypoint /bin/sh - set -euo nounset + set -eou pipefail python --version pip --version node --version From e51cf78e4c790fd87331dcce4a2a4a28595ec098 Mon Sep 17 00:00:00 2001 From: Derek Roberts <4391600+DerekRoberts@users.noreply.github.com> Date: Wed, 13 Jun 2018 17:26:56 -0700 Subject: [PATCH 4/6] HotFix: disable SonarQube --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index dfc97b26b6..0de8a8338e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -105,7 +105,7 @@ Map context = [ stages:[ 'Build': true, 'Unit Test': true, - 'Code Quality': true, + 'Code Quality': false, 'Readiness - DEV': true, 'Deploy - DEV': true, 'Load Fixtures - DEV': true, From 8532555c338badd49a5639a7b64dc3280c6755b4 Mon Sep 17 00:00:00 2001 From: Sybrand Strauss Date: Wed, 13 Jun 2018 18:19:13 -0700 Subject: [PATCH 5/6] Fix to not import models --- app/registries/migrations/0006_auto_20180608_1934.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/registries/migrations/0006_auto_20180608_1934.py b/app/registries/migrations/0006_auto_20180608_1934.py index 19a6d11538..8b9c675f69 100644 --- a/app/registries/migrations/0006_auto_20180608_1934.py +++ b/app/registries/migrations/0006_auto_20180608_1934.py @@ -4,10 +4,10 @@ from django.db import migrations -from registries.models import RegistriesApplicationStatus, RegistriesApplication - def update_application_status(apps, schema_editor): + RegistriesApplicationStatus = apps.get_model('registries', 'RegistriesApplicationStatus') + RegistriesApplication = apps.get_model('registries', 'RegistriesApplication') for application in RegistriesApplication.objects.all(): pending = RegistriesApplicationStatus\ .objects.filter(application=application, @@ -41,7 +41,7 @@ def update_application_status(apps, schema_editor): def revert(apps, schema_editor): - for application in RegistriesApplication.objects.all(): + RegistriesApplication = apps.get_model('registries', 'RegistriesApplication') application.current_status = None application.application_recieved_date = None application.application_outcome_date = None From fcc886f1a09bf9fa3d1b4f42ed72d6fb601d92ec Mon Sep 17 00:00:00 2001 From: Sybrand Strauss Date: Wed, 13 Jun 2018 18:29:56 -0700 Subject: [PATCH 6/6] Added missing line --- app/registries/migrations/0006_auto_20180608_1934.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/registries/migrations/0006_auto_20180608_1934.py b/app/registries/migrations/0006_auto_20180608_1934.py index 8b9c675f69..2a28b3c2c7 100644 --- a/app/registries/migrations/0006_auto_20180608_1934.py +++ b/app/registries/migrations/0006_auto_20180608_1934.py @@ -42,6 +42,7 @@ def update_application_status(apps, schema_editor): def revert(apps, schema_editor): RegistriesApplication = apps.get_model('registries', 'RegistriesApplication') + for application in RegistriesApplication.objects.all(): application.current_status = None application.application_recieved_date = None application.application_outcome_date = None