Skip to content

Commit 7e4fb63

Browse files
authored
Merge downstream (cloudfoundry#4369)
* src based changes * changes to ./build * ./docs * ./ * Changes following review
1 parent 64b430d commit 7e4fb63

File tree

45 files changed

+5201
-3233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5201
-3233
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<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>
44
<a href="https://goreportcard.com/report/github.com/cloudfoundry/stratos"><img src="https://goreportcard.com/badge/github.com/cloudfoundry-incubator/stratos"/></a>
5-
<a href="https://codecov.io/gh/cloudfoundry/stratos/branch/master"><img src="https://codecov.io/gh/cloudfoundry/stratos/branch/graph/badge.svg"/></a>
5+
<a href="https://codecov.io/gh/cloudfoundry/stratos/branch/master"><img src="https://codecov.io/gh/cloudfoundry/stratos/branch/master/graph/badge.svg"/></a>
66
[![GitHub release](https://img.shields.io/github/release/cloudfoundry/stratos.svg)](https://github.com/cloudfoundry/stratos/releases/latest)
77
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/cloudfoundry/stratos/blob/master/LICENSE)
88
[![slack.cloudfoundry.org](https://slack.cloudfoundry.org/badge.svg)](https://cloudfoundry.slack.com/messages/C80EP4Y57/)
@@ -46,9 +46,9 @@ Get an [Overview](docs/overview.md) of Stratos, its components and the different
4646

4747
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).
4848

49-
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).
49+
Browse through features and issues in the project's [issues](https://github.com/cloudfoundry/stratos/issues) page.
5050

51-
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)
51+
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)
5252

5353
## Contributing
5454

angular.json

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@
3636
},
3737
"configurations": {
3838
"production": {
39-
"budgets": [
40-
{
41-
"type": "anyComponentStyle",
42-
"maximumWarning": "6kb"
43-
}
44-
],
39+
"budgets": [{
40+
"type": "anyComponentStyle",
41+
"maximumWarning": "6kb"
42+
}],
4543
"optimization": true,
4644
"outputHashing": "all",
4745
"sourceMap": false,
@@ -51,12 +49,10 @@
5149
"extractLicenses": true,
5250
"vendorChunk": false,
5351
"buildOptimizer": true,
54-
"fileReplacements": [
55-
{
56-
"replace": "src/frontend/packages/core/src/environments/environment.ts",
57-
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
58-
}
59-
]
52+
"fileReplacements": [{
53+
"replace": "src/frontend/packages/core/src/environments/environment.ts",
54+
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
55+
}]
6056
}
6157
}
6258
},
@@ -132,18 +128,14 @@
132128
},
133129
"configurations": {
134130
"production": {
135-
"budgets": [
136-
{
137-
"type": "anyComponentStyle",
138-
"maximumWarning": "6kb"
139-
}
140-
],
141-
"fileReplacements": [
142-
{
143-
"replace": "src/frontend/packages/core/src/environments/environment.ts",
144-
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
145-
}
146-
],
131+
"budgets": [{
132+
"type": "anyComponentStyle",
133+
"maximumWarning": "6kb"
134+
}],
135+
"fileReplacements": [{
136+
"replace": "src/frontend/packages/core/src/environments/environment.ts",
137+
"with": "src/frontend/packages/core/src/environments/environment.prod.ts"
138+
}],
147139
"optimization": true,
148140
"outputHashing": "all",
149141
"sourceMap": false,
@@ -229,13 +221,13 @@
229221
"options": {
230222
"tsConfig": "src/frontend/packages/store/tsconfig.lib.json",
231223
"project": "src/frontend/packages/store/ng-package.json"
232-
}
233-
, "configurations": {
224+
},
225+
"configurations": {
234226
"production": {
235227
"tsConfig": "src/frontend/packages/store/tsconfig.lib.prod.json"
236228
}
237229
}
238-
},
230+
},
239231
"test": {
240232
"builder": "@angular-devkit/build-angular:karma",
241233
"options": {
@@ -272,13 +264,13 @@
272264
"options": {
273265
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.json",
274266
"project": "src/frontend/packages/cloud-foundry/ng-package.json"
275-
}
276-
, "configurations": {
267+
},
268+
"configurations": {
277269
"production": {
278270
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.prod.json"
279271
}
280272
}
281-
},
273+
},
282274
"test": {
283275
"builder": "@angular-devkit/build-angular:karma",
284276
"options": {
@@ -315,13 +307,13 @@
315307
"options": {
316308
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.json",
317309
"project": "src/frontend/packages/cf-autoscaler/ng-package.json"
318-
}
319-
, "configurations": {
310+
},
311+
"configurations": {
320312
"production": {
321313
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.prod.json"
322314
}
323315
}
324-
},
316+
},
325317
"test": {
326318
"builder": "@angular-devkit/build-angular:karma",
327319
"options": {
@@ -361,4 +353,4 @@
361353
"cli": {
362354
"_defaultCollection": "@nrwl/angular"
363355
}
364-
}
356+
}

build/combine-coverage.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

build/karma.conf.creator.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ module.exports = function (project) {
2727
coverageIstanbulReporter: {
2828
dir: path.join(repoRoot, 'coverage', project),
2929
reports: ['html', 'lcovonly', 'json'],
30-
fixWebpackSourcePaths: true
30+
fixWebpackSourcePaths: true,
31+
'report-config': {
32+
json: {
33+
// Collate all coverage-final files into a single dir for nyc to combine (it can't pick them out from `coverage`)
34+
file: path.join('..', 'nyc', project + '-coverage-final.json')
35+
}
36+
},
3137
},
3238
reporters: ['spec', 'kjhtml', 'stratos'],
3339
specReporter: {

build/karma.test.reporter.js

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
(function () {
32
'use strict';
43

@@ -75,7 +74,7 @@
7574
fs.unlinkSync(this.summaryFile);
7675
}
7776

78-
const all = this.runningTotals;
77+
const all = this.runningTotals;
7978

8079
this.writeSummaryFile(`${this.bold}${this.cyan}================================================================================${this.reset}`);
8180
this.writeSummaryFile(`${this.bold}${this.cyan}Test Summary${this.reset}`);
@@ -106,47 +105,47 @@
106105

107106
try {
108107

109-
this.writeFile(`${this.bold}${this.cyan}Test results for package ${this.bluebg} ${process.env.NG_TEST_SUITE} ${this.reset}`);
110-
this.writeFile(`Total : ${this.bold}${this.cyan}${this.total}${this.reset}`)
111-
this.writeFile(`Passed : ${this.bold}${this.cyan}${passed}${this.reset}`)
112-
this.writeFile(`Failed : ${this.bold}${this.red}${this.failed.length}${this.reset}`)
113-
this.writeFile(`Skipped : ${this.bold}${this.yellow}${this.skipped}${this.reset}`)
114-
115-
if (this.failed.length === 0) {
116-
fs.appendFileSync(this.file, 'All tests passed\n')
117-
} else {
118-
this.writeFile('Test failures:');
119-
this.failed.forEach(f => {
120-
this.writeFile(`${this.red}${this.bold} - ${f.fullName}${this.reset}`);
121-
const logs = f.log || [];
122-
logs.forEach(l => fs.appendFileSync(this.file, `${this.grey} ${l}${this.reset}`));
123-
// Add empty line
124-
this.writeFile('');
125-
});
126-
}
127-
128-
// Update running totals JSON
129-
this.runningTotals.total += this.total;
130-
this.runningTotals.passed += passed;
131-
this.runningTotals.failed += this.failed.length;
132-
this.runningTotals.skipped += this.skipped;
133-
fs.writeFileSync(this.jsonFile, JSON.stringify(this.runningTotals));
134-
135-
this.generateSummary();
136-
137-
// Write exit code
138-
let newExitCode = this.exitCode;
139-
if (result.exitCode > 0) {
140-
newExitCode = result.exitCode
141-
}
142-
143-
fs.writeFileSync(this.exitCodeFile, newExitCode.toString());
144-
145-
// Dump the summary for this test suite
146-
var contents = fs.readFileSync(this.file, 'utf8');
147-
console.log(contents);
148-
149-
} catch(e) {
108+
this.writeFile(`${this.bold}${this.cyan}Test results for package ${this.bluebg} ${process.env.NG_TEST_SUITE} ${this.reset}`);
109+
this.writeFile(`Total : ${this.bold}${this.cyan}${this.total}${this.reset}`)
110+
this.writeFile(`Passed : ${this.bold}${this.cyan}${passed}${this.reset}`)
111+
this.writeFile(`Failed : ${this.bold}${this.red}${this.failed.length}${this.reset}`)
112+
this.writeFile(`Skipped : ${this.bold}${this.yellow}${this.skipped}${this.reset}`)
113+
114+
if (this.failed.length === 0) {
115+
fs.appendFileSync(this.file, 'All tests passed\n')
116+
} else {
117+
this.writeFile('Test failures:');
118+
this.failed.forEach(f => {
119+
this.writeFile(`${this.red}${this.bold} - ${f.fullName}${this.reset}`);
120+
const logs = f.log || [];
121+
logs.forEach(l => fs.appendFileSync(this.file, `${this.grey} ${l}${this.reset}`));
122+
// Add empty line
123+
this.writeFile('');
124+
});
125+
}
126+
127+
// Update running totals JSON
128+
this.runningTotals.total += this.total;
129+
this.runningTotals.passed += passed;
130+
this.runningTotals.failed += this.failed.length;
131+
this.runningTotals.skipped += this.skipped;
132+
fs.writeFileSync(this.jsonFile, JSON.stringify(this.runningTotals));
133+
134+
this.generateSummary();
135+
136+
// Write exit code
137+
let newExitCode = this.exitCode;
138+
if (result.exitCode > 0) {
139+
newExitCode = result.exitCode
140+
}
141+
142+
fs.writeFileSync(this.exitCodeFile, newExitCode.toString());
143+
144+
// Dump the summary for this test suite
145+
var contents = fs.readFileSync(this.file, 'utf8');
146+
console.log(contents);
147+
148+
} catch (e) {
150149
console.log('ERROR while reporting test result');
151150
console.log(e);
152151
}

build/tools/changelog.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,19 @@ function log() {
6767
echo $1 | tee -a ${CHANGELOG}
6868
}
6969

70+
COMPARE_REPO=${REPO}
7071
QUERY="repo:${REPO}+milestone:${MILESTONE}+state:closed"
7172
if [ -n "${FORK}" ]; then
7273
FORK_QUERY="repo:${FORK}+milestone:${MILESTONE}+state:closed"
74+
COMPARE_REPO=${FORK}
7375
fi
7476

7577
BUGS="+label:bug"
7678
NON_BUGS="+-label:bug"
7779

7880
mv ${CHANGELOG} CHANGELOG.old
7981

82+
8083
echo ""
8184
echo -e "${CYAN}${BOLD}Generating Change log - content for version ${MILESTONE} will be shown below"
8285
echo -e "---------------------------------------------------------------------${RESET}"
@@ -85,7 +88,7 @@ echo "# Change Log" > ${CHANGELOG}
8588
log ""
8689
log "## ${MILESTONE}"
8790
log ""
88-
log "[Full Changelog](https://github.com/${REPO}/compare/${CURRENT}...${MILESTONE})"
91+
log "[Full Changelog](https://github.com/${COMPARE_REPO}/compare/${CURRENT}...${MILESTONE})"
8992
log ""
9093
log "This release contains a number of fixes and improvements:"
9194
log ""

deploy/ci/console-dev-releases.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ jobs:
121121
build_args_file: image-tag/build-args
122122
patch_base_reg: ((patch-base-reg))
123123
patch_base_tag: ((patch-base-tag))
124-
- put: config-init-image
124+
- put: mariadb-image
125125
params:
126-
dockerfile: stratos/deploy/Dockerfile.init
127-
build: stratos/
126+
dockerfile: stratos/deploy/db/Dockerfile.mariadb
127+
build: stratos/deploy/db
128128
tag: image-tag/v2-alpha-tag
129129
patch_base_reg: ((patch-base-reg))
130130
patch_base_tag: ((patch-base-tag))
131131
- do:
132-
- put: mariadb-image
132+
- put: config-init-image
133133
params:
134-
dockerfile: stratos/deploy/db/Dockerfile.mariadb
135-
build: stratos/deploy/db
134+
dockerfile: stratos/deploy/Dockerfile.init
135+
build: stratos/
136136
tag: image-tag/v2-alpha-tag
137137
patch_base_reg: ((patch-base-reg))
138138
patch_base_tag: ((patch-base-tag))

docs/planning/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ In the case of Cloud Foundry metrics, the Stratos back-end will check the user's
3232

3333
1. https://prometheus.io/docs/prometheus/latest/querying/basics/
3434
2. https://prometheus.io/docs/prometheus/latest/querying/api/
35-
3. https://github.com/bosh-prometheus/firehose_exporter
35+
3. https://github.com/bosh-prometheus/firehose_exporter

0 commit comments

Comments
 (0)