Is there a way to create Origen commands for the entire linux install? - origen-sdk

I am familiar with how to create application commands from this doc. I wonder if there is a way to configure site-wide commands that would fetch a particular application and change the CWD to the cloned application. Or would this be more in the rake solution space?
thx

I don't think anything really belongs in the rake solution space.
Origen does support the concept of creating a plugin which adds global commands - http://origen-sdk.org/origen/guides/plugins/creating/#Sharing_Global_Commands
The procedure is to create a regular Origen plugin, and then configure it with a global command launcher as in this example - https://github.com/Origen-SDK/origen_sim/blob/master/config/application.rb#L32
Then gem install my_plugin to your global Ruby environment. Then, anywhere in your environment, including outside of application workspaces, you will be able to run origen my_plugin_command.

Related

Clipanion can't serve commands

I made some test CLI according to official Clipanion docs (https://mael.dev/clipanion/docs/getting-started#execute-your-cli) and even cloned that example - https://github.com/i5ting/clipanion-test, but I have no idea why i can't execute my commands.
Most likely I have the problem with understanding how this tool works in general. So there are my steps:
Clone the project
Make sure that i have installed all necessary dependencies
Build the project (yarn prepack)
Execute the command from the root of the project
Here is what I'm getting:
zsh: command not found: clipanion
I'm running into this on macOS
Have I missed something in my steps?
Found the root of it
The thing is that clipanion doesn't provide functionality I expected. It makes your script powerful but you should make it executable and provide a runtime for it on your own.

Hubot with Rocket.chat

I am trying to integrate Hubot with rocketchat and make Hubot talk with rocketchat.
The sources I am referring to are:
https://hubot.github.com/docs/
https://github.com/RocketChat/hubot-rocketchat
I have installed Nodejs and in Node.js command prompt I did:
mkdir myhubot
cd myhubot
yo hubot
Questions I have:
How do I understand if rocketchat is integrated with Hubot?
If I have not integrated rocketchat, how should I do it? (I did refer to https://github.com/RocketChat/hubot-rocketchat). Here, I want to understand how and where to set environment variables. Also, how exactly do I run Docker here?
When I do docker export ROCKETCHAT_ROOM='https: //spree.chat/channel/'
It returns: "Cowardly refusing to save to a terminal. Use the -o flag or redirect."
How can I resolve this?
Here is the screenshot:
1.) Rocket.chat have "Internal hubot" which is integraded and contain some simplest Hubot scripts. Ideal for testing and introduction to Hubot. You can find these scripts in rocketchat/programs/server/npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/hubot-scripts/src/scripts/.
If you wanna use more complex scripts, you must use external Hubot.
2.) Setup "Environment Variables" are different for each platform. For example, if you want set ROCKETCHAT_ROOM to support, you must use something like env ROCKETCHAT_ROOM=support. But this only applies to Linux OS. For Docker syntax is -e ROCKETCHAT_ROOM=support. If you running external Hubot on Windows, you probably must use something different.
3.) ROCKETCHAT_ROOM variable is not for URL of your channel. You must put here name of your chat room.

NodeJS installation to jenkins : npm not found

Maybe someone can tell me what I missed installing nodeJS to jenkins, because when I want to execute shell script npm update I get error npm: not found.
I installed jenkins nodejs plugin then added installer:
After I created job with prams:
What I need to do more, to have accessible npm in any jenkins job?
It works for me. The only difference is that where you have a text box that reads "0.12.7", I have a popup menu that reads "Node.js 0.12.7". Maybe something has gone wrong and you should delete the installer and add it back?
Windows users, did you restart?
Do keep in mind that you need to restart active processes after installing npm.
During installation the folder of your npm.cmd is added to the PATH variable. However, active applications don't refresh their PATH variable automatically. That also holds for your active Jenkins service (and its child processes). They are still running with an old version of your PATH variable.
In other words, you need to restart the Jenkins service (or restart your entire system). Once restarted, Jenkins will have an updated PATH variable, and it will be able to find the npm.cmd processes and others.
What's wrong with using absolute paths?
Using the full path is not a solid solution. A package.json file can contain references to other cli processes (e.g. node, ng, react-scripts, npm-run-all, ...). You will probably have similar issues there. There is no way to keep up and reference all of them with full paths.

how to run npm/grunt command from jenkins

I'm new to this area and was trying to run the following commands from jenkins:
npm install
grunt quickStart
So far I've a jenkins running on a window machine as a window service and I've also installed NodeJs plugin for jenkins.
However, I'm stuck and quit confused following instructions here, its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place.
Here is the bit that's asking me to do:
I cannot see this setting for the jenkins job I create. Is there an easy way to run those command in jenkins from a .bat or .sh script, a .bat would be recomended since I'm on window machine.
Note : I've already checked out a project using git in jenkins!!!
Thanks
"its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place."
I don't think you need that I have pointed jenkins to the node installation folder an nothing more.., for this you go to Manage Jenkins->Configure System->NodeJS->NodeJS installations.. type in any name you like and point to where the node home folder is.
...cannot see this setting for the jenkins job I create...
Once you have configure that in your jenkins configuration you should have that configuration available like so:
...Is there an easy way to run those command in jenkins from a .bat or .sh script, a .bat would be recomended since I'm on window machine
I'm sorry don't get what commands are you referring to...
so summarizing :
you have to tell jenkins where you have your node installation
use that configuration in your jobs
hope this helps...
The way I made it, was trough execute shell, as the build tool for nodejs is npm, I simply wrote a shell script that instructs jenkins to run npm install in the workspace directory inside jenkins where it clones the git repository and then to zip and move the package if successful to another folder.

What is the best way to install a .bin file using default installer options?

I'm working on a small shell script to set up my development environment (eclipse + java + a bunch of other stuff) on linux. Installing .bin files is among them - these launch a GUI installer where user input is necessary - how do I simply use the default installer options and force the installation to complete?
You can try running them from a terminal passing the '-h', '--help' or '--usage' arguments to see if they handle it (and provide the listing of commands you can give it), but if it wasn't designed to receive any parameters there won't be much you can do for it.

Resources