Skip to content

Commit

Permalink
Merge pull request #934 from bcgov/release/1.41.0
Browse files Browse the repository at this point in the history
Merged PR-934
  • Loading branch information
bcgov-csnr-cd authored Oct 16, 2018
2 parents 59efda5 + 7877cb6 commit 52e4e98
Show file tree
Hide file tree
Showing 133 changed files with 48,508 additions and 19,095 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ functional-tests/src/test/groovy/testtamplet.txt
#virtual env
/deactivate
.venv
venv
.direnv

# Frontend files
Expand All @@ -156,6 +157,7 @@ sonar-runner/.classpath
# DB
*.dmp
*.pgCustom
.tmp/

# Exceptions
!app/*/fixtures/*.gz
20 changes: 16 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,23 @@ parallel (
executed by itself. */
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
python manage.py migrate; \
python manage.py migrate \
'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
python manage.py loaddata gwells-codetables.json; \
python manage.py loaddata gwells-codetables.json \
'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
python manage.py loaddata wellsearch-codetables.json registries-codetables.json; \
python manage.py loaddata wellsearch-codetables.json registries-codetables.json \
'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
python manage.py loaddata wellsearch.json.gz registries.json; \
python manage.py loaddata wellsearch.json.gz registries.json \
'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
python manage.py loaddata aquifers.json \
'"
sh "oc exec '${podName}' -n '${projectName}' -- bash -c '\
cd /opt/app-root/src/backend; \
Expand Down Expand Up @@ -633,6 +637,14 @@ parallel (
--global-var client_id=\$GWELLS_API_TEST_CLIENT_ID \
--global-var client_secret=\$GWELLS_API_TEST_CLIENT_SECRET \
-r cli,junit,html
newman run ./aquifers_api_tests.json \
--global-var test_user=\$GWELLS_API_TEST_USER \
--global-var test_password=\$GWELLS_API_TEST_PASSWORD \
--global-var base_url=${BASEURL} \
--global-var auth_server=\$GWELLS_API_TEST_AUTH_SERVER \
--global-var client_id=\$GWELLS_API_TEST_CLIENT_ID \
--global-var client_secret=\$GWELLS_API_TEST_CLIENT_SECRET \
-r cli,junit,html
"""
} finally {
junit 'newman/*.xml'
Expand Down
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

################
# General Jobs #
################

default: vue

vue: prep
NPM_CMD=dev docker-compose up; docker-compose down

api: prep
NPM_CMD=build docker-compose up; docker-compose down

django: prep
NPM_CMD=watch docker-compose up; docker-compose down


###################
# Individual jobs #
###################

prep:
@ docker-compose pull
@ docker-compose build

db-clean:
@ docker-compose down || true
@ rm -rf ./.tmp/psql-dev
@ echo
@ echo "Compose is down and the database folder deleted"
@ echo
60 changes: 58 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,68 @@ It uses the Openshift Source-to-Image (S2I) strategy with Python 3.5 on centos7.

## 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).
0. ##### Prerequisites

Install Docker and Git

* [Docker Community Editions (signup required)](https://store.docker.com/search?type=edition&offering=community)

* [Git Downloads](https://git-scm.com/downloads)

OS X alternative: Xcode with Git
```
xcode-select --install
```
Configure Git (user details, push default and line endings)
```
git config --global user.email <GitHub registered email address>
git config --global user.name <GitHub registered firstName LastName>
git config --global push.default simple
git config --global core.autocrlf input
```
1. ##### GWells Repository
Fork our repository into your own GitHub account.
[GWells Repo (fork button in top right)](https://github.com/bcgov/gwells)
Clone and cd.
```
git clone https://github.com/<github-user>/gwells.git
cd gwells
```
Add remote (upstream) origin.
```
git remote add upstream https://github.com/bcgov/gwells.git
```
2. ##### GWells App
Create a development deployment for working with Vue, Django or the API.
```
cd gwells
make [vue|django|api]
```
Visit the following links depending on development target.
* Django Frontend: http://localhost:8000/gwells/
* Node/API: http://localhost:8080/
<br>Changes will update dynamically in their respective environments.
## Contributing
Please see [CONTRIBUTING.md](https://github.com/bcgov/gwells/blob/master/CONTRIBUTING.md)
## Issues
Issues are tracked on the [GWELLS Trello board](https://trello.com/b/2UQZgXHR/wells-project-board).
## License
Code released under the [Apache License, Version 2.0](https://github.com/bcgov/gwells/blob/master/LICENSE).

135 changes: 135 additions & 0 deletions api-tests/aquifers_api_tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"info": {
"_postman_id": "f986d626-d0a1-42fe-b758-762529ccedb1",
"name": "GWELLS Aquifers",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Aquifers List",
"event": [
{
"listen": "test",
"script": {
"id": "85664ee3-92d9-4510-b7d8-6bd6c44ec870",
"type": "text/javascript",
"exec": [
"var jsonData = pm.response.json()",
"",
"pm.test(\"Status code is 200\", function () {",
" pm.expect(pm.response.code).to.equal(200);",
"})",
""
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "{{base_url}}/api/v1/aquifers/",
"host": [
"{{base_url}}"
],
"path": [
"api",
"v1",
"aquifers",
""
]
}
},
"response": []
},
{
"name": "Aquifers Search",
"event": [
{
"listen": "test",
"script": {
"id": "e291aa1f-95f3-4ca8-8e6c-f88b496980ba",
"type": "text/javascript",
"exec": [
"var jsonData = pm.response.json()",
"",
"pm.test(\"Status code is 200\", function () {",
" pm.expect(pm.response.code).to.equal(200);",
"})",
""
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "{{base_url}}/api/v1/aquifers/?aquifer_id=123",
"host": [
"{{base_url}}"
],
"path": [
"api",
"v1",
"aquifers",
""
],
"query": [
{
"key": "aquifer_id",
"value": "123"
}
]
}
},
"response": []
},
{
"name": "Aquifers Filter by aquifer_id",
"event": [
{
"listen": "test",
"script": {
"id": "7ab4ef72-57cb-4c27-8b88-2cb379cab83c",
"type": "text/javascript",
"exec": [
"var jsonData = pm.response.json()",
"",
"pm.test(\"Status code is 200\", function () {",
" pm.expect(pm.response.code).to.equal(200);",
"})",
""
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "{{base_url}}/api/v1/aquifers/?search=asdf",
"host": [
"{{base_url}}"
],
"path": [
"api",
"v1",
"aquifers",
""
],
"query": [
{
"key": "search",
"value": "asdf"
}
]
}
},
"response": []
}
]
}
Loading

0 comments on commit 52e4e98

Please sign in to comment.