Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
feat: kubernetes helm support
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Compton committed Aug 21, 2017
1 parent 601ead1 commit 692ed5f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"generator"
],
"dependencies": {
"@arf/generator-cloud-enablement": "0.0.25",
"@arf/generator-cloud-enablement": "0.0.32",
"bluebird": "^3.5.0",
"chalk": "^1.1.0",
"debug": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion refresh/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ module.exports = Generator.extend({
writeKubernetesFiles: function () {
if (!this.docker) return

var server = (this.bluemix.domain && this.bluemix.namespace) ? {domain: this.bluemix.domain, namespace: this.bluemix.namespace } : undefined;
var server = (this.bluemix && this.bluemix.domain && this.bluemix.namespace) ? {domain: this.bluemix.domain, namespace: this.bluemix.namespace } : undefined;
this.composeWith(require.resolve('@arf/generator-cloud-enablement/generators/kubernetes'), {force: this.force, bluemix: { backendPlatform: "SWIFT", name: this.cleanAppName, server: server }} )

},
Expand Down
18 changes: 18 additions & 0 deletions test/integration/app/prompted_nobuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,24 @@ describe('Prompt and no build integration tests for app generator', function ()
})
})

describe('Kubernetes files', function () {
it('created helm chart file', function () {
assert.file('chart/notes/Chart.yaml')
})

it('created helm deployment file', function () {
assert.file('chart/notes/templates/deployment.yaml')
})

it('created helm service file', function () {
assert.file('chart/notes/templates/service.yaml')
})

it('created helm values file', function () {
assert.file('chart/notes/values.yaml')
})
})

describe('Bluemix cloud deployment', function () {
it('created CloudFoundry manifest file', function () {
assert.file('manifest.yml')
Expand Down
3 changes: 1 addition & 2 deletions test/unit/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1552,8 +1552,7 @@ describe('swiftserver:refresh', function () {
})

it('populates the correct values in values.yaml', function () {
assert.fileContent('chart/test/values.yaml', 'name: test')
assert.fileContent('chart/test/values.yaml', 'repository: registry.mydomain.net/mynamespace/')
assert.fileContent('chart/test/values.yaml', 'repository: registry.mydomain.net/mynamespace/test')
})

})
Expand Down

0 comments on commit 692ed5f

Please sign in to comment.