Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
sutherlanda committed Nov 1, 2019
2 parents 4565237 + edc82a1 commit 1386f87
Show file tree
Hide file tree
Showing 166 changed files with 5,383 additions and 6,970 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ For more information on the web component refer to:
# License

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

# Testing Thanks

Thanks to BrowserStack for Testing Tool support via OpenSource Licensing

[![BrowserStack](browserstack-logo-white-small.png)](http://browserstack.com/)
8 changes: 4 additions & 4 deletions auth-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ venv/bin/activate: requirements/prod.txt requirements/dev.txt
pip freeze | sort > requirements.txt ;\
cat requirements/repo-libraries.txt >> requirements.txt ;\
pip install -Ur requirements/repo-libraries.txt ;\
pip install -Ur requirements/dev.txt
pip install -Ur requirements/dev.txt ;\
touch venv/bin/activate # update so it's as new as requirements/prod.txt

.PHONY: install-dev
Expand All @@ -56,7 +56,7 @@ install-dev: venv/bin/activate

.PHONY: activate
activate: venv/bin/activate
. venv/bin/activate
. venv/bin/activate

.PHONY: local-test
local-test: venv/bin/activate
Expand All @@ -72,10 +72,10 @@ local-coverage: venv/bin/activate
coverage-report: local-coverage
. venv/bin/activate ; \
coverage report ; \
coverage html
coverage html

## Run the coverage report and display in a browser window
mac-cov: install-dev coverage-report
mac-cov: install-dev coverage-report
open -a "Google Chrome" htmlcov/index.html

## run pylint on the package and tests
Expand Down
12 changes: 9 additions & 3 deletions auth-api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,21 @@ class _Config(object): # pylint: disable=too-few-public-methods
# email server
MAIL_SERVER = os.getenv('MAIL_SERVER')
MAIL_PORT = os.getenv('MAIL_PORT')
MAIL_USE_TLS = os.getenv('MAIL_USE_TLS')
MAIL_USE_SSL = os.getenv('MAIL_USE_SSL')
MAIL_USE_TLS = bool(os.getenv('MAIL_USE_TLS') == 'True')
MAIL_USE_SSL = bool(os.getenv('MAIL_USE_SSL') == 'True')
MAIL_USERNAME = os.getenv('MAIL_USERNAME')
MAIL_PASSWORD = os.getenv('MAIL_PASSWORD')
MAIL_FROM_ID = os.getenv('MAIL_FROM_ID')

# mail token configuration
AUTH_WEB_TOKEN_CONFIRM_URL = os.getenv('AUTH_WEB_TOKEN_CONFIRM_URL')
AUTH_WEB_TOKEN_CONFIRM_PATH = os.getenv('AUTH_WEB_TOKEN_CONFIRM_PATH')
EMAIL_SECURITY_PASSWORD_SALT = os.getenv('EMAIL_SECURITY_PASSWORD_SALT')
EMAIL_TOKEN_SECRET_KEY = os.getenv('EMAIL_TOKEN_SECRET_KEY')
TOKEN_EXPIRY_PERIOD = os.getenv('TOKEN_EXPIRY_PERIOD')

# Legal-API URL
LEGAL_API_URL = os.getenv('LEGAL_API_URL')

# Sentry Config
SENTRY_DSN = os.getenv('SENTRY_DSN', None)

Expand Down Expand Up @@ -202,6 +205,9 @@ class TestConfig(_Config): # pylint: disable=too-few-public-methods
4H8UZcVFN95vEKxJiLRjAmj6g273pu9kK4ymXNEjWWJn
-----END RSA PRIVATE KEY-----"""

# Legal-API URL
LEGAL_API_URL = 'https://mock-lear-tools.pathfinder.gov.bc.ca/rest/legal-api/0.82/api/v1'


class ProdConfig(_Config): # pylint: disable=too-few-public-methods
"""Production environment configuration."""
Expand Down
235 changes: 0 additions & 235 deletions auth-api/jenkins/dev-post.groovy

This file was deleted.

20 changes: 19 additions & 1 deletion auth-api/jenkins/dev.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@

import groovy.json.*

// define constants - values sent in as env vars from whatever calls this pipeline
// define constants - values sent in as env vars from whatever calls this pipeline
def APP_NAME = 'auth-api'
def DESTINATION_TAG = 'dev'
def E2E_TAG = 'e2e'
def TOOLS_TAG = 'tools'
def NAMESPACE_APP = '1rdehl'
def NAMESPACE_SHARED = 'd7eovc'
Expand Down Expand Up @@ -155,6 +156,23 @@ if( run_pipeline ) {
}
}
}

stage("Tag ${APP_NAME}:${E2E_TAG}") {
script {
openshift.withCluster() {
openshift.withProject("${NAMESPACE_BUILD}") {
try {
echo "Tagging ${APP_NAME} for deployment to ${E2E_TAG} ..."
openshift.tag("${APP_NAME}:${DESTINATION_TAG}", "${APP_NAME}:${E2E_TAG}")
} catch (Exception e) {
echo e.getMessage()
build_ok = false
}
}
}
}
}

}

if (build_ok) {
Expand Down
7 changes: 6 additions & 1 deletion auth-api/jenkins/prod.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ node {
}
openshift.withCluster() {
openshift.withProject("${NAMESPACE_BUILD}") {
echo "Tagging ${APP_NAME} for deployment to ${DESTINATION_TAG} ..."
// echo "Tagging ${APP_NAME}:${DESTINATION_TAG}-prev ..."
// def IMAGE_HASH = getImageTagHash("${APP_NAME}", "${DESTINATION_TAG}")
// echo "IMAGE_HASH: ${IMAGE_HASH}"
// openshift.tag("${APP_NAME}@${IMAGE_HASH}", "${APP_NAME}:${DESTINATION_TAG}-prev")

echo "Tagging ${APP_NAME} for deployment to ${DESTINATION_TAG} ..."
openshift.tag("${APP_NAME}:${SOURCE_TAG}", "${APP_NAME}:${DESTINATION_TAG}")
}
}
Expand Down
8 changes: 7 additions & 1 deletion auth-api/logging.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[loggers]
keys=root,api
keys=root,api,tracing

[handlers]
keys=console
Expand All @@ -17,6 +17,12 @@ handlers=console
qualname=api
propagate=0

[logger_tracing]
level=ERROR
handlers=console
qualname=jaeger_tracing
propagate=0

[handler_console]
class=StreamHandler
level=DEBUG
Expand Down
Loading

0 comments on commit 1386f87

Please sign in to comment.