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 all 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<a href="https://travis-ci.com/cloudfoundry/stratos/branches"><img src="https://travis-ci.com/cloudfoundry/stratos.svg?branch=master"></a>&nbsp;<a style="padding-left: 4px" href="https://codeclimate.com/github/cloudfoundry/stratos/maintainability"><img src="https://api.codeclimate.com/v1/badges/61af8b605f385e894632/maintainability" /></a>
<a href="https://goreportcard.com/report/github.com/cloudfoundry/stratos"><img src="https://goreportcard.com/badge/github.com/cloudfoundry-incubator/stratos"/></a>
<a href="https://codecov.io/gh/cloudfoundry/stratos/branch/master"><img src="https://codecov.io/gh/cloudfoundry/stratos/branch/graph/badge.svg"/></a>
<a href="https://codecov.io/gh/cloudfoundry/stratos/branch/master"><img src="https://codecov.io/gh/cloudfoundry/stratos/branch/master/graph/badge.svg"/></a>
[![GitHub release](https://img.shields.io/github/release/cloudfoundry/stratos.svg)](https://github.com/cloudfoundry/stratos/releases/latest)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/cloudfoundry/stratos/blob/master/LICENSE)
[![slack.cloudfoundry.org](https://slack.cloudfoundry.org/badge.svg)](https://cloudfoundry.slack.com/messages/C80EP4Y57/)
Expand Down Expand Up @@ -46,9 +46,9 @@ Get an [Overview](docs/overview.md) of Stratos, its components and the different

Take a look at the [Development Roadmap](docs/roadmap.md) to see where we are heading. We update our status page each week to summarize what we are working on - see the [Status Page](docs/status_updates.md).

Browse through features and issues in the project's [issues](https://github.com/cloudfoundry/stratos/issues) page or [Zenhub Board](https://github.com/cloudfoundry-incubator/stratos#boards).
Browse through features and issues in the project's [issues](https://github.com/cloudfoundry/stratos/issues) page.

What kind of code is in Stratos? We've integrated [Code Climate](https://codeclimate.com) for some code quality and maintainability metrics. Take a stroll around the [project page](https://codeclimate.com/github/cloudfoundry-incubator/stratos)
What kind of code is in Stratos? We've integrated [Code Climate](https://codeclimate.com) for some code quality and maintainability metrics. Take a stroll around the [project page](https://codeclimate.com/github/cloudfoundry/stratos)

## Contributing

Expand Down
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
12 changes: 6 additions & 6 deletions deploy/ci/console-dev-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ jobs:
build_args_file: image-tag/build-args
patch_base_reg: ((patch-base-reg))
patch_base_tag: ((patch-base-tag))
- put: config-init-image
- put: mariadb-image
params:
dockerfile: stratos/deploy/Dockerfile.init
build: stratos/
dockerfile: stratos/deploy/db/Dockerfile.mariadb
build: stratos/deploy/db
tag: image-tag/v2-alpha-tag
patch_base_reg: ((patch-base-reg))
patch_base_tag: ((patch-base-tag))
- do:
- put: mariadb-image
- put: config-init-image
params:
dockerfile: stratos/deploy/db/Dockerfile.mariadb
build: stratos/deploy/db
dockerfile: stratos/deploy/Dockerfile.init
build: stratos/
tag: image-tag/v2-alpha-tag
patch_base_reg: ((patch-base-reg))
patch_base_tag: ((patch-base-tag))
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