Skip to content

Commit

Permalink
Merge pull request #739 from bcgov/release/1.33.0
Browse files Browse the repository at this point in the history
Merged PR-739
  • Loading branch information
bcgov-csnr-cd authored Jun 13, 2018
2 parents cb47ec1 + f7bf40b commit 549625a
Show file tree
Hide file tree
Showing 139 changed files with 6,809 additions and 6,756 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ var/
*.egg
webpack-stats.json
api-tests/.envrc
functional-tests/.envrc
app/.env

# PyInstaller and Pip install files
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -118,7 +120,7 @@ gwells.pyproj*
.vscode
*.ipynb

#functional-tests
# functional-tests
functional-tests/.gradle/
functional-tests/build
functional-tests/.project
Expand All @@ -129,6 +131,7 @@ functional-tests/src/test/groovy/testtamplet.txt

# Custom GW
activate
# src <-- this was also blocking functional-tests/src
x.sh

#virtual env
Expand All @@ -140,6 +143,7 @@ x.sh
frontend/node_modules/
frontend/webpack-stats.json
app/gwells/static/vue
api-tests/node_modules/

sonar-runner/.gradle
*.patch
Expand Down
44 changes: 28 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Map context = [
stages:[
'Build': true,
'Unit Test': true,
'Code Quality': false,
'Code Quality': true,
'Readiness - DEV': true,
'Deploy - DEV': true,
'Load Fixtures - DEV': true,
Expand Down Expand Up @@ -293,11 +293,11 @@ for(String envKeyName: context.env.keySet() as String[]){
}
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py flush --no-input'"
// Lookup tables common to all system components (e.g. Django apps)
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata gwells/fixtures/codetables.ProvinceStateCode.json'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata gwells-codetables.json'"
// Lookup tables for the Wellsearch component (not yet a Django app) and Registries app
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata gwells/fixtures/codetables.json registries/fixtures/codetables.json'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata wellsearch-codetables.json registries-codetables.json'"
// Test data for the Wellsearch component (not yet a Django app) and Registries app
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata gwells/fixtures/wellsearch.json.gz registries/fixtures/registries.json'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c 'cd /opt/app-root/src && pwd && python manage.py loaddata wellsearch.json.gz registries.json'"
}
}
}
Expand Down Expand Up @@ -415,12 +415,30 @@ for(String envKeyName: context.env.keySet() as String[]){
// sh 'python manage.py loaddata wells registries'
//}
dir('functional-tests') {
Integer attempts = 0
Integer attemptsMax = 2
try {
//sh './gradlew -q dependencies'
if ("DEV".equalsIgnoreCase(stageDeployName)){
sh './gradlew chromeHeadlessTest'
}else{
sh './gradlew -DchromeHeadlessTest.single=WellDetails chromeHeadlessTest'
waitUntil {
boolean isDone=false
attempts++
try{
if ("DEV".equalsIgnoreCase(stageDeployName)) {
sh './gradlew chromeHeadlessTest'
} else {
sh './gradlew -DchromeHeadlessTest.single=WellDetails chromeHeadlessTest'
}
isDone=true
} catch (ex) {
echo "${stackTraceAsString(ex)}"
if ( attempts < attemptsMax ){
echo "DEV - Functional Tests Failed - Wait one minute and retry once"
sleep 60
} else {
echo "DEV - Functional Tests Failed - Retry Failed"
throw ex
}
}
return isDone
}
} finally {
archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/geb/**/*'
Expand All @@ -444,7 +462,7 @@ for(String envKeyName: context.env.keySet() as String[]){
//todo: install perf report plugin.
//perfReport compareBuildPrevious: true, excludeResponseTime: true, ignoreFailedBuilds: true, ignoreUnstableBuilds: true, modeEvaluation: true, modePerformancePerTestCase: true, percentiles: '0,50,90,100', relativeFailedThresholdNegative: 80.0, relativeFailedThresholdPositive: 20.0, relativeUnstableThresholdNegative: 50.0, relativeUnstableThresholdPositive: 50.0, sourceDataFiles: 'build/test-results/**/*.xml'
}
}
} //end dir
} //end node
} //end podTemplate
} //end stage
Expand Down Expand Up @@ -486,9 +504,3 @@ stage('Cleanup') {
return isDone
}
}






22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,9 @@ This is a [Django](http://www.djangoproject.com) project based on the [Openshift

It uses the Openshift Source-to-Image (S2I) strategy with Python 3.5 on centos7. See requirements.txt for Django and dependency versions.


## Special files in this repository

Apart from the regular files created by Django (`project/*`, `welcome/*`, `manage.py`), this repository contains:

```
database/ - Database-specific files
└── codetables - Static code table sql scripts
└── cron - Shell scripts
└── scripts - PostgrSQL psql scripts
└── sql-developer - SQL Developer Oracle SQL scripts
openshift/ - OpenShift-specific files
├── scripts - helper scripts
└── templates - application templates
requirements.txt - list of dependencies
```

## Development and Deployment

Setup scripts, OpenShift deployment and development details are located in the [setup](./setup/) folder. Please see the relevant [README.md](../setup/README.md).
Setup scripts, OpenShift deployment and development details are located in the [setup](./setup/) folder. Please see the relevant [README.md](./setup/README.md).

## Issues
Issues are tracked on the [GWELLS Trello board](https://trello.com/b/2UQZgXHR/wells-project-board).
Expand Down
Loading

0 comments on commit 549625a

Please sign in to comment.