Repository URL to install this package:
|
Version:
1.3.2 ▾
|
| src |
| cli.js |
| index.js |
| package.json |
| readme.md |
A collection of useful utilities for Doodlers :toolbox:
npm install --global https://github.com/DoodleScheduling/doodle-node-cli.git
npm install --global @doodle/doodle-node-cli
git clone git@github.com:DoodleScheduling/doodle-node-cli.gitcd doodle-node-cliyarn installyarn link:bulb: To "unlink" run
$ yarn unlinkin thedoodle-node-cliroot directory
:rainbow: That's it! Now you're ready to run the commands.
Once installed, you now have a doodle command in your terminal.
Usage
$ doodle <commands> [options]
Commands
pr -p Opens the current branch's pull request on GitHub
jira -j Opens the current branch's ticket on JIRA
add user -a Adds a new Keycloak user
release -r Deploy a TagFlow project anywhere except production
release ls List the most recent tags for a TagFlow project
repo -s Lookup and launch a DoodleScheduling repository
itests Build the command needed to run the web-integration-tests
i18n -i Look for problems in the OneSky i18n files (React projects only)
premium Change a user's premium status
jenkins Launch the Jenkins job for the current repo:branch
login -l Get a JWT token for a user
trial -t Start a trial for a Doodle user
Options
If any of these options are set, the command will not prompt you to supply the
information manually.
--email: The email address to use
--password: The password to use
--target: The enviornment (staging, devbox, etc)
--premium: If set to 'true', make a premium subscription
--subscriptionName: The subscription name (e.g., '25: Business 1 annual CHF')
Examples
$ doodle gh
$ doodle pr
$ doodle jira
$ doodle daily
$ doodle premium
$ doodle trial --email=user@doodle-test.com
Launch an interactive search for DoodleScheduling repositories (with auto-complete)
$ doodle repo
If you want to update the list of DoodleScheduling repositories:
cd) into the doodle-node-cli directory you just clonednode cli.js repo --update:bulb: If you are using the CLI by linking via npm link or yarn link, then you can also run doodle repo --update
Want to automate the creation of new user accounts? Of course you do!
Assuming you have gone through the initial setup (instructions below), you just need to run either one of these commands:
$ doodle add user
$ doodle -a
You will need to get your CLI setup to automatically create test users. This should only need to be done once:
@doodle-test.com email address (see the warning below)doodle init to setup the initial configuration$ doodle add user:warning: IMPORTANT! You will need to use an email address in the @doodle-test.com (GSuite) domain when creating test user accounts because these test accounts are required for logging in to our testing environments.
In order to deploy a repository to a namespace, you will need a PAT or Personal Access Token from Github. You can read about how to get one here.
Now type the following command in your terminal to get setup:
$ doodle init
After you have run the setup step, you should never need to do it again unless you want to change the information you provided. Then, to deploy a TagFlow-enabled frontend, simply type:
$ doodle release
and follow the on-screen instructions.
If your environment does not have a doodle-node-cli keycloak client, then you can easily create one by importing the file config/keycloak-client.json into your Keycloak environment.
Clients tab and then click the Create buttonSaveService Account Roles Tab, and in the Client Roles choose realm-management and make sure that manage-users is one of the assigned roles. Without this you can't create new users with the CLI.Credentials tab and copy the client Secret to the clipboardkeycloakClientSecret:$ vault write secret/doodle/<ENVIORONMENT>/doodle-node-cli/secrets keycloakClientSecret=<CLIENT_SECRET>
:bulb: Use this Vault Login Helper to easily switch between your vault enviornments. If you are trying to connect the doodle-node-cli to a new devbox, then you will want to be logged in to vault using the devbox vault address.
:bulb: Don't forget to open a PR that adds your new devbox to the
DOODLE_ENVSconstant in the constants.js file.
read:packages and repo scopes$ npm login --scope=@doodlescheduling --registry=https://npm.pkg.github.com
> Username: Github username
> Password: Personal Github access token with `read:packages` and `repo` scopes
> Email: Public email of Github account
This library is published to the registry using Tagflow.
git tag pub.1.0.0-rc.0 git push origin pub.1.0.0-rc.0
git tag pub.1.0.0 git push origin pub.1.0.0
:heart: :rainbow: :hamburger: