Skip to content

Commit

Permalink
Merge branch 'release/6.2.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
olliefreeman committed Jun 18, 2021
2 parents 02c253d + c4e0fef commit 1cfb4c9
Show file tree
Hide file tree
Showing 811 changed files with 14,202 additions and 13,866 deletions.
16 changes: 16 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright 2020-2021 University of Oxford
# and Health and Social Care Information Centre, also known as NHS Digital
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# don't lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,5 @@ $RECYCLE.BIN/
junit.xml
yarn.lock
eslint_report.json
.scannerwork
.scannerwork
releases
18 changes: 18 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
/*
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

SPDX-License-Identifier: Apache-2.0
*/
registry=https://registry.npmjs.org
@maurodatamapper:registry=https://npm.pkg.github.com
189 changes: 104 additions & 85 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,95 +1,114 @@
pipeline {
agent any
options {
timestamps()
skipStagesAfterUnstable()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
/*
nvm wrapper has to wrap all steps, interestingly its not supposed to work with the .nvmrc file however if you exclude the version as a blank string
then it passes the blank string as the version and therefore nvm just does its job and uses the .nvmrc file.
*/
stages {
stage('Tool Versions') {
steps {
nvm('') {
// Currently npm v6 is packaged with node and we need v7+
sh 'npm install -g npm@^7.10.0'
sh 'node --version'
sh 'npm --version'
}
}
agent any
options {
timestamps()
skipStagesAfterUnstable()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
/*
nvm wrapper has to wrap all steps, interestingly its not supposed to work with the .nvmrc file however if you exclude the version as a blank
string
then it passes the blank string as the version and therefore nvm just does its job and uses the .nvmrc file.
*/
stages {
stage('Tool Versions') {
steps {
nvm('') {
// Currently npm v6 is packaged with node and we need v7+
sh 'npm install -g npm@^7.10.0'
sh 'node --version'
sh 'npm --version'
}
}
stage('Jenkins Clean') {
steps {
sh 'rm -f junit.xml'
sh 'rm -rf test-report'
sh 'rm -rf coverage'
sh 'rm -f eslint_report.json'
}
}
stage('Jenkins Clean') {
steps {
sh 'rm -f junit.xml'
sh 'rm -rf test-report'
sh 'rm -rf coverage'
sh 'rm -f eslint_report.json'
}
stage('Install') {
steps {
nvm('') {
sh 'npm install -g npm-check'
sh 'npm install -g @angular/cli'
sh 'npm ci'
}
}
}

stage('Install') {
steps {
nvm('') {
sh 'npm install -g npm-check'
sh 'npm install -g @angular/cli'
sh 'npm ci'
}
}
stage('Test') {
steps {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run test-with-coverage'
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'junit.xml'
}
}
}

stage('License Header Check') {
steps {
warnError('Missing License Headers') {
nvm('') {
sh 'npm run license-check check'
}
}
}
stage('Lint') {
steps {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run eslint-report'
}
}
}
}

stage('Test') {
steps {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run test-with-coverage'
sh 'npm run test-clean'
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'junit.xml'
}
}
}
stage('Lint') {
steps {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run eslint-report'
}
}
}
post{
always{
recordIssues tools: [esLint(pattern: '**/eslint_report.xml')]
}
}
}

stage('Sonarqube') {
when {
branch 'develop'
}
steps {
withSonarQubeEnv('JenkinsQube') {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run sonar'
}
}
}
}
stage('Sonarqube') {
when {
branch 'develop'
}
}
post {
always {
publishHTML([
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : false,
reportDir : 'test-report',
reportFiles : 'index.html',
reportName : 'Test Report',
reportTitles : 'Test'
])
outputTestResults()
slackNotification()
zulipNotification(topic: 'mdm-ui')
steps {
withSonarQubeEnv('JenkinsQube') {
nvm('') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run sonar'
}
}
}
}
}
}
}
post {
always {
publishHTML([
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : false,
reportDir : 'test-report',
reportFiles : 'index.html',
reportName : 'Test Report',
reportTitles : 'Test'
])
outputTestResults()
slackNotification()
zulipNotification(topic: 'mdm-ui')
}
}
}
3 changes: 2 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright 2020 University of Oxford
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"stylePreprocessorOptions": {
"includePaths": [
"src/styles",
"src/style",
"src/app"
]
}
Expand Down
7 changes: 5 additions & 2 deletions custom-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2020 University of Oxford
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,7 +23,9 @@ module.exports = {
new webpack.DefinePlugin({
$ENV: {
themeName: JSON.stringify(process.env['MDM_UI_THEME_NAME']),
useFeaureSubscribedCatalogues: Boolean(JSON.stringify(process.env['MDM_UI_FEATURE_SUBSCRIBED_CATALOGUES']))
useFeaureSubscribedCatalogues: Boolean(JSON.stringify(process.env['MDM_UI_FEATURE_SUBSCRIBED_CATALOGUES'])),
useVersionedFolders: Boolean(JSON.stringify(process.env['MDM_UI_FEATURE_VERSIONED_FOLDERS'])),
useMergeUiV2: Boolean(JSON.stringify(process.env['MDM_UI_MERGE_UI_V2'])),
}
})
]
Expand Down
3 changes: 2 additions & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2020 University of Oxford
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2020 University of Oxford
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2020 University of Oxford
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
18 changes: 18 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2020-2021 University of Oxford
and Health and Social Care Information Centre, also known as NHS Digital
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0
*/
module.exports = {
preset: 'jest-preset-angular',
testEnvironment: 'jsdom',
Expand Down
18 changes: 15 additions & 3 deletions license-check-and-add-config.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
{
"ignore": [
"*.csv",
"*.yml",
".git",
".github",
"coverage",
"releases",
".idea",
"test-report.xml",
"test-report",
"browserslist",
".scannerwork",
".DS_Store",
".editorconfig",
".gitattributes",
".gitignore",
".nvmrc",
"NOTICE",
"Jenkinsfile",
"*.md"],
"**/*.xml",
"**/*.csv",
"**/*.yml",
"**/*.md",
"**/*.eot",
"**/*.svg",
"**/*.ttf",
"**/*.woff",
"**/*.woff2"
],
"license": "NOTICE",

"licenseFormats": {
Expand Down
Loading

0 comments on commit 1cfb4c9

Please sign in to comment.