Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Merge downstream #4369

Merged
merged 6 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 26 additions & 34 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"budgets": [{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand All @@ -51,12 +49,10 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/frontend/packages/core/src/environments/environment.ts",
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
}
]
"fileReplacements": [{
"replace": "src/frontend/packages/core/src/environments/environment.ts",
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
}]
}
}
},
Expand Down Expand Up @@ -132,18 +128,14 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/frontend/packages/core/src/environments/environment.ts",
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
}
],
"budgets": [{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}],
"fileReplacements": [{
"replace": "src/frontend/packages/core/src/environments/environment.ts",
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
}],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down Expand Up @@ -229,13 +221,13 @@
"options": {
"tsConfig": "src/frontend/packages/store/tsconfig.lib.json",
"project": "src/frontend/packages/store/ng-package.json"
}
, "configurations": {
},
"configurations": {
"production": {
"tsConfig": "src/frontend/packages/store/tsconfig.lib.prod.json"
}
}
},
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -272,13 +264,13 @@
"options": {
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.json",
"project": "src/frontend/packages/cloud-foundry/ng-package.json"
}
, "configurations": {
},
"configurations": {
"production": {
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.prod.json"
}
}
},
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -315,13 +307,13 @@
"options": {
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.json",
"project": "src/frontend/packages/cf-autoscaler/ng-package.json"
}
, "configurations": {
},
"configurations": {
"production": {
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.prod.json"
}
}
},
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -361,4 +353,4 @@
"cli": {
"_defaultCollection": "@nrwl/angular"
}
}
}
10 changes: 0 additions & 10 deletions build/combine-coverage.js

This file was deleted.

8 changes: 7 additions & 1 deletion build/karma.conf.creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ module.exports = function (project) {
coverageIstanbulReporter: {
dir: path.join(repoRoot, 'coverage', project),
reports: ['html', 'lcovonly', 'json'],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
'report-config': {
json: {
// Collate all coverage-final files into a single dir for nyc to combine (it can't pick them out from `coverage`)
file: path.join('..', 'nyc', project + '-coverage-final.json')
}
},
},
reporters: ['spec', 'kjhtml', 'stratos'],
specReporter: {
Expand Down
85 changes: 42 additions & 43 deletions build/karma.test.reporter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

(function () {
'use strict';

Expand Down Expand Up @@ -75,7 +74,7 @@
fs.unlinkSync(this.summaryFile);
}

const all = this.runningTotals;
const all = this.runningTotals;

this.writeSummaryFile(`${this.bold}${this.cyan}================================================================================${this.reset}`);
this.writeSummaryFile(`${this.bold}${this.cyan}Test Summary${this.reset}`);
Expand Down Expand Up @@ -106,47 +105,47 @@

try {

this.writeFile(`${this.bold}${this.cyan}Test results for package ${this.bluebg} ${process.env.NG_TEST_SUITE} ${this.reset}`);
this.writeFile(`Total : ${this.bold}${this.cyan}${this.total}${this.reset}`)
this.writeFile(`Passed : ${this.bold}${this.cyan}${passed}${this.reset}`)
this.writeFile(`Failed : ${this.bold}${this.red}${this.failed.length}${this.reset}`)
this.writeFile(`Skipped : ${this.bold}${this.yellow}${this.skipped}${this.reset}`)

if (this.failed.length === 0) {
fs.appendFileSync(this.file, 'All tests passed\n')
} else {
this.writeFile('Test failures:');
this.failed.forEach(f => {
this.writeFile(`${this.red}${this.bold} - ${f.fullName}${this.reset}`);
const logs = f.log || [];
logs.forEach(l => fs.appendFileSync(this.file, `${this.grey} ${l}${this.reset}`));
// Add empty line
this.writeFile('');
});
}

// Update running totals JSON
this.runningTotals.total += this.total;
this.runningTotals.passed += passed;
this.runningTotals.failed += this.failed.length;
this.runningTotals.skipped += this.skipped;
fs.writeFileSync(this.jsonFile, JSON.stringify(this.runningTotals));

this.generateSummary();

// Write exit code
let newExitCode = this.exitCode;
if (result.exitCode > 0) {
newExitCode = result.exitCode
}

fs.writeFileSync(this.exitCodeFile, newExitCode.toString());

// Dump the summary for this test suite
var contents = fs.readFileSync(this.file, 'utf8');
console.log(contents);

} catch(e) {
this.writeFile(`${this.bold}${this.cyan}Test results for package ${this.bluebg} ${process.env.NG_TEST_SUITE} ${this.reset}`);
this.writeFile(`Total : ${this.bold}${this.cyan}${this.total}${this.reset}`)
this.writeFile(`Passed : ${this.bold}${this.cyan}${passed}${this.reset}`)
this.writeFile(`Failed : ${this.bold}${this.red}${this.failed.length}${this.reset}`)
this.writeFile(`Skipped : ${this.bold}${this.yellow}${this.skipped}${this.reset}`)

if (this.failed.length === 0) {
fs.appendFileSync(this.file, 'All tests passed\n')
} else {
this.writeFile('Test failures:');
this.failed.forEach(f => {
this.writeFile(`${this.red}${this.bold} - ${f.fullName}${this.reset}`);
const logs = f.log || [];
logs.forEach(l => fs.appendFileSync(this.file, `${this.grey} ${l}${this.reset}`));
// Add empty line
this.writeFile('');
});
}

// Update running totals JSON
this.runningTotals.total += this.total;
this.runningTotals.passed += passed;
this.runningTotals.failed += this.failed.length;
this.runningTotals.skipped += this.skipped;
fs.writeFileSync(this.jsonFile, JSON.stringify(this.runningTotals));

this.generateSummary();

// Write exit code
let newExitCode = this.exitCode;
if (result.exitCode > 0) {
newExitCode = result.exitCode
}

fs.writeFileSync(this.exitCodeFile, newExitCode.toString());

// Dump the summary for this test suite
var contents = fs.readFileSync(this.file, 'utf8');
console.log(contents);

} catch (e) {
console.log('ERROR while reporting test result');
console.log(e);
}
Expand Down
5 changes: 4 additions & 1 deletion build/tools/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@ function log() {
echo $1 | tee -a ${CHANGELOG}
}

COMPARE_REPO=${REPO}
QUERY="repo:${REPO}+milestone:${MILESTONE}+state:closed"
if [ -n "${FORK}" ]; then
FORK_QUERY="repo:${FORK}+milestone:${MILESTONE}+state:closed"
COMPARE_REPO=${FORK}
fi

BUGS="+label:bug"
NON_BUGS="+-label:bug"

mv ${CHANGELOG} CHANGELOG.old


echo ""
echo -e "${CYAN}${BOLD}Generating Change log - content for version ${MILESTONE} will be shown below"
echo -e "---------------------------------------------------------------------${RESET}"
Expand All @@ -85,7 +88,7 @@ echo "# Change Log" > ${CHANGELOG}
log ""
log "## ${MILESTONE}"
log ""
log "[Full Changelog](https://github.com/${REPO}/compare/${CURRENT}...${MILESTONE})"
log "[Full Changelog](https://github.com/${COMPARE_REPO}/compare/${CURRENT}...${MILESTONE})"
log ""
log "This release contains a number of fixes and improvements:"
log ""
Expand Down
2 changes: 1 addition & 1 deletion docs/planning/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ In the case of Cloud Foundry metrics, the Stratos back-end will check the user's

1. https://prometheus.io/docs/prometheus/latest/querying/basics/
2. https://prometheus.io/docs/prometheus/latest/querying/api/
3. https://github.com/bosh-prometheus/firehose_exporter
3. https://github.com/bosh-prometheus/firehose_exporter
Loading