Install Yeoman
npm install -g yo
bash npm install -g generator-ibm-service-enablement
Following command line arguments are supported
--bluemix {stringified-json}
- used by Scaffolder to supply project information frompman
. For an example of a bluemix.json look at the fallback_bluemix.js file.
Clone this repository and link it via npm
git clone https://github.com/ibm-developer/generator-ibm-service-enablement
cd generator-ibm-service-enablement
npm link
In a separate directory invoke the generator via
yo ibm-service-enablement --bluemix "{\"name\": \"projectName\", \"backendPlatform\": \"PYTHON\"}"
To run the unit tests
npm test
To run integration tests
npm run integration
Note You will need to mock the credentials by adding a bluemix.int.json
file. The file content should look something like the following:
{
"cloudant": [
{
"url": "XXXX",
"username": "XXXXX",
"password": "XXXX",
"serviceInfo": {
"label": "cloudant-label",
"name": "cloudant-name",
"plan": "cloudant-plan"
}
}
],
"objectStorage": [
{
"auth_url": "XXXX",
"domainId": "XXXXX",
"domainName": "XXXX",
"password": "XXXX",
"project": "XXXXX",
"projectId": "XXXX",
"region": "dallas",
"role": "admin",
"userId": "XXXX",
"username": "XXXX",
"serviceInfo": {
"label": "object-storage-label",
"name": "object-storage-name",
"plan": "object-storage-plan"
}
}
]
}
In order to publish changes, you will need to fork the repository or ask to join the ibm-developer
org and branch off the development branch.
Make sure to follow the conventional commit specification before contributing. To help you with commit a commit template is provide.
Run config.sh
to initialize the commit template to your .git/config
.
Once you are finished with your changes, run npm test
to make sure all tests pass.
Do a pull request against development
, make sure the build passes. A team member will review and merge your pull request.
Once merged to development
to master
one pull request will be created against development. Merge the pull request then create another pull request from development
into master
. Once the final pull request has been merged the generator will be published to npm. Make sure that the CHANGELOG.md and the package.json is correct before merging the auto generated pull request.