Repository URL to install this package:
|
Version:
1.8.1 ▾
|
| src |
| cli.js |
| index.js |
| package.json |
| readme.md |
A collection of useful utilities for Doodlers :toolbox:
Make sure you have Node.js installed, which gives you node and npm. If you aren't sure if you have npm installed, run the command npm -version. If it prints out a version number (and not an error), then node is installed and ready to install the CLI with one of the commands below.
Then you need to make sure that you have the following added to the global ~/.npmrc file:
@doodle:registry=https://npm-proxy.fury.io/tmf/
@doodlescheduling:registry=https://npm.pkg.github.com/
and that you are logged into the @doodlescheduling scope on npm (so that you can get access to Doodle's GitHub packages):
read:packages and repo scopes$ npm login --scope=@doodlescheduling --registry=https://npm.pkg.github.com
$ npm install --global @doodle/doodle-node-cli
: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
init Setup the CLI configuration
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
add meeting -m Creates a SchedEx meeting
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 and monolith user data for a user
trial -t Start a trial for a Doodle user
version -v Prints the CLI version number
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')
--subscriptionId: The subscriptionId to use for commands that require it
Examples
$ doodle gh
$ doodle pr
$ doodle jira
$ doodle daily
$ doodle premium
$ doodle trial --email=user@doodle-test.com
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: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.
Once you have completed the setup steps outlined above, you are almost ready to use the CLI. An important thing to note is that the CLI relies on Vault to get the client IDs and secrets for the Keycloak clients in the different environments. This means that, in order to add users with the CLI, you will need to be connected to the staging VPN and logged into the correct Vault address.
Old devboxes, staging and preproduction use the Vault staging address. New devboxes each have their own address.
:bulb: TIP: If you only need to use the Vault staging address, you can add the following line to your rc file if it is not already there:
export VAULT_ADDR=https://vault.internal.doodle-test.com. The CLI will then automatically login for you using this address. If you need to use the CLI for new devboxes, the Vault Token Helper is recommended, as it makes logging into and switching between Vault namespaces much easier.

Want to automate the creation of new user accounts? Of course you do!
Assuming you have gone through the initial setup, you just need to run either one of these commands:
$ doodle add user
$ doodle -a
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
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. If you ran doodle init you were asked to supply a PAT. If you skipped the PAT in the setup steps, then you can either run doodle init again, or add your PAT manually to the ~/.doodlecli/config.json file.
Then, to deploy a TagFlow-enabled project, 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.
git clone git@github.com:DoodleScheduling/doodle-node-cli.gitcd doodle-node-cliyarn installyarn linkNow save your changes and run the commands normally. Since you are linking the project, the command doodle will pull from your local copy of the CLI and not the one installed globally.
:bulb: To "unlink" run
$ yarn unlinkin thedoodle-node-cliroot directory.
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: