diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 90b21fcc..6f1dcb72 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -1,4 +1,5 @@ #!groovy +import uk.gov.hmcts.contino.GithubAPI @Library("Infrastructure") @@ -14,5 +15,14 @@ withPipeline(type, product, component) { afterAlways('build') { yarnBuilder.yarn('build') } + + onPR() { + env.ENV = 'preview' + // enableCleanupOfHelmReleaseOnSuccess() + def githubApi = new GithubAPI(this) + if (!githubApi.getLabelsbyPattern(env.BRANCH_NAME, "keep-helm")) { + enableCleanupOfHelmReleaseOnSuccess() + } + } } \ No newline at end of file diff --git a/config/default.yaml b/config/default.yaml index 4ac7883a..8f0b6708 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -16,7 +16,7 @@ session: host: key: api: - cos: 'https://fis-cos-api-pr-161.service.core-compute-preview.internal' + cos: 'https://fis-cos-api-pr-165.service.core-compute-preview.internal' serviceAuth: 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal' uploadPolicy: documentSize: 20 diff --git a/config/development.yaml b/config/development.yaml index 5b125824..36e0c00f 100644 --- a/config/development.yaml +++ b/config/development.yaml @@ -16,7 +16,7 @@ session: host: key: api: - cos: 'https://fis-cos-api-pr-161.service.core-compute-preview.internal' + cos: 'https://fis-cos-api-pr-165.service.core-compute-preview.internal' serviceAuth: 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal' uploadPolicy: documentSize: 20 diff --git a/src/main/server.ts b/src/main/server.ts index 97ca7ac6..3f14dae9 100755 --- a/src/main/server.ts +++ b/src/main/server.ts @@ -16,6 +16,7 @@ import { Helmet } from './modules/helmet'; import { LanguageToggle } from './modules/i18n'; import { Nunjucks } from './modules/nunjucks'; import { PropertiesVolume } from './modules/properties-volume'; +import { Webpack } from './modules/webpack'; import { Routes } from './routes'; import { SessionStorage } from './settings/redis/redis'; @@ -39,6 +40,7 @@ new HealthCheck().enableFor(app); new ErrorHandler().enableFor(app, logger); new ErrorHandler().handleNextErrorsFor(app); new Nunjucks().enableFor(app); +new Webpack().enableFor(app); app.locals.developmentMode = process.env.NODE_ENV !== 'production'; app.use(favicon(path.join(__dirname, '/public/assets/images/favicon.ico'))); app.use(bodyParser.json() as RequestHandler); diff --git a/src/main/steps/common/webpack/js-template.njk b/src/main/steps/common/webpack/js-template.njk index 06319b06..67d2eaed 100644 --- a/src/main/steps/common/webpack/js-template.njk +++ b/src/main/steps/common/webpack/js-template.njk @@ -1,2 +1,2 @@ - + diff --git a/src/main/steps/common/webpack/js.njk b/src/main/steps/common/webpack/js.njk index 33aed8e5..cfce81fa 100644 --- a/src/main/steps/common/webpack/js.njk +++ b/src/main/steps/common/webpack/js.njk @@ -1,2 +1,2 @@ - + diff --git a/src/main/steps/cookie-banner/template.njk b/src/main/steps/cookie-banner/template.njk index 12a29f8b..13b19870 100644 --- a/src/main/steps/cookie-banner/template.njk +++ b/src/main/steps/cookie-banner/template.njk @@ -5,7 +5,7 @@

{{ cookiesLine2 }}

{% endset %} -