nodeshift
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="1.7.0"></a> | ||
# [1.7.0](https://github.com/bucharest-gold/nodeshift/compare/v1.6.0...v1.7.0) (2018-04-02) | ||
### Features | ||
* **build.env:** add a --build.env flag to specify build config environment variables ([0a43536](https://github.com/bucharest-gold/nodeshift/commit/0a43536)), closes [#208](https://github.com/bucharest-gold/nodeshift/issues/208) | ||
<a name="1.6.0"></a> | ||
@@ -7,0 +17,0 @@ # [1.6.0](https://github.com/bucharest-gold/nodeshift/compare/v1.5.1...v1.6.0) (2018-03-22) |
@@ -25,2 +25,3 @@ 'use strict'; | ||
@param {boolean} [options.build.forcePull] - flag to make your BuildConfig always pull a new image from dockerhub or not. Defaults to false | ||
@param {Array} [options.build.env] - an array of objects to pass build config environment variables. [{name: NAME_PROP, value: VALUE}] | ||
@param {array} [options.definedProperties] - Array of objects with the format { key: value }. Used for template substitution | ||
@@ -110,2 +111,3 @@ @returns {Promise} - Returns a JSON Object | ||
@param {boolean} [options.build.forcePull] - flag to make your BuildConfig always pull a new image from dockerhub or not. Defaults to false | ||
@param {Array} [options.build.env] - an array of objects to pass build config environment variables. [{name: NAME_PROP, value: VALUE}] | ||
@param {array} [options.definedProperties] - Array of objects with the format { key: value }. Used for template substitution | ||
@@ -112,0 +114,0 @@ @returns {Promise} - Returns a JSON Object |
@@ -96,3 +96,4 @@ /* | ||
forcePull: config.build.forcePull, | ||
dockerImage: config.dockerImage | ||
dockerImage: config.dockerImage, | ||
buildEnv: config.build.env | ||
}); | ||
@@ -113,3 +114,4 @@ return config.openshiftRestClient.buildconfigs.create(newBuildConfig); | ||
forcePull: config.build.forcePull, | ||
dockerImage: config.dockerImage | ||
dockerImage: config.dockerImage, | ||
buildEnv: config.build.env | ||
}); | ||
@@ -116,0 +118,0 @@ return config.openshiftRestClient.buildconfigs.create(newBuildConfig); |
@@ -34,5 +34,7 @@ /* | ||
const dockerImageName = `${dockerImage}:${dockerTag}`; | ||
const env = options.buildEnv || []; | ||
return { | ||
type: 'Source', | ||
sourceStrategy: { | ||
env: env, | ||
from: { | ||
@@ -39,0 +41,0 @@ kind: 'DockerImage', |
@@ -78,2 +78,14 @@ /* | ||
function parseMultiOption (arr) { | ||
// split on the "=" then convert an array of objects where the name is the 0 index and value is the 1 index | ||
return arr.map((props) => { | ||
return props.split('='); | ||
}).map((v) => { | ||
return { | ||
name: v[0], | ||
value: v[1] | ||
}; | ||
}); | ||
} | ||
module.exports = { | ||
@@ -84,3 +96,4 @@ yamlToJson: yamlToJson, | ||
cleanUp: cleanUp, | ||
listFiles: listFiles | ||
listFiles: listFiles, | ||
parseMultiOption: parseMultiOption | ||
}; |
@@ -111,3 +111,3 @@ /* | ||
const reduced = config.definedProperties.reduce((acc, curr) => { | ||
return acc.split('${' + curr.key + '}').join(curr.value); | ||
return acc.split('${' + curr.name + '}').join(curr.value); | ||
}, stringJSON); | ||
@@ -114,0 +114,0 @@ const backToJSON = JSON.parse(reduced); |
{ | ||
"name": "nodeshift", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Plugin for running openshift deployments", | ||
@@ -44,3 +44,3 @@ "bin": { | ||
"chalk": "^2.0.1", | ||
"git-repo-info": "^1.4.1", | ||
"git-repo-info": "^2.0.0", | ||
"js-yaml": "^3.8.4", | ||
@@ -47,0 +47,0 @@ "lodash": "^4.17.4", |
@@ -174,2 +174,5 @@ # Nodeshift [![Build Status](https://travis-ci.org/bucharest-gold/nodeshift.svg?branch=master)](https://travis-ci.org/bucharest-gold/nodeshift) [![Coverage Status](https://coveralls.io/repos/github/bucharest-gold/nodeshift/badge.svg?branch=master)](https://coveralls.io/github/bucharest-gold/nodeshift?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/bucharest-gold/nodeshift.svg)](https://greenkeeper.io/) | ||
#### build.env | ||
Flag to pass build config environment variables as NAME=Value. Can be used multiple times. ex: `nodeshift --build.env NODE_ENV=development --build.env YARN_ENABLED=true` | ||
#### help | ||
@@ -176,0 +179,0 @@ Shows the below help |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117905
2171
221
+ Addedgit-repo-info@2.1.1(transitive)
- Removedgit-repo-info@1.4.1(transitive)
Updatedgit-repo-info@^2.0.0