Skip to content

patricktiu/generator-ibm-service-enablement

 
 

Repository files navigation

IBM Service Enablement Yeoman Generator

Bluemix powered Travis Coveralls Codacy Version DownloadsMonthly DownloadsTotal License

Pre-requisites

Install Yeoman

npm install -g yo

Installation

bash npm install -g generator-ibm-service-enablement

Usage

Following command line arguments are supported

  • --bluemix {stringified-json} - used by Scaffolder to supply project information from pman. For an example of a bluemix.json look at the fallback_bluemix.js file.

Development

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\"}"

Testing

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"
			}
		}
	]

}

Publishing Changes

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.

About

IBM Service Enablement Yeoman Generator

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 72.7%
  • Java 14.1%
  • Python 7.9%
  • Swift 3.8%
  • Shell 1.5%