Jenkins Blue Ocean NodeJS setup - node.js

How do i setup a node.js project in Jenkins Blue Ocean?
I keep getting a "command not found"
I installed a NodeJS version.
For the Pipeline settings i set
Agent - any
For Init / Provide Node & npm bin/ folder to PATH i set
NodeJSInstallationName* - nw
ConfigId - none
Child steps - Print Message

Fixed by installing NodeJS on local machine.

Related

Windows Job Runner from Linux Cluster (Enterprise)

The documentation from what I have found is a bit sparse on the setup of job runner nodes. I am wondering if anyone has set up a config - Rundeck Linux Cluster with a Windows Job Runner. I was able to install the .jar and all that on the Windows node and it appears and is able to communicate via Runner Management.
Where I am stuck and it gets ambiguous his how to properly specify to use the job runner. This is my current setup:
job runner installed and is green in Runner Management and assigned to my project
IN Project config I have Runner selected as the Default Node Executioner
Default File Copier is also set to runner-file-copier
Under Project nodes
I setup a Node Wizard - here is the edited yaml:
mydomain:
nodename: nodename
hostname: jobrunnerhost.domain
osFamily: windows
node-executor: runner-node-exec
file-copier: runner-file-copier
Under the jobs I have it set to the appropriate node.
I am getting this error when I try and run anything either a simple DIR command or executing a basic powershell:
Execution failed: 28 in project Server.Validation.mynode: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [mynode: COPY_ERROR: Reason: FILE_COPIER_NOT_FOUNDUnable to find file copier: runner-file-copier]}, Node failures: {mynode=[COPY_ERROR: Reason: FILE_COPIER_NOT_FOUNDUnable to find file copier: runner-file-copier]}, status: failed]
I have tried setting up multiple ways. I feel as though I am missing a config or another step somewhere. Any help is appreciated.

Run npm command during post deploy powershell step in Octopus

I have a nodejs application that I've built/packaged via teamcity as well as deploy to one of our servers (which has node installed) through the Octopus deploy portal.
Everything works ok until i come to the post deploy powershell script from within octopus.
In one of the code blocks I have npm commands that throws an error npm not recognised.When I run the power-shell scripts on the server, everything works but when I try to run this via the octopus post deploy script I get the error as stated above.
I know that node /npm are installed and that the environment variables re:nodejs is set correctly, unless there is something else i'm missing , it still isn't working.
a simple pseudo-code of what i'm trying to do is this:
$deploymentDir = 'D:\Apps\<appname>\<octopus-version-number>'
$name = "service"
cd $deploymentDir
if($name){
Write-Host "link node-windows..."
npm link node-windows //node-windows is installed globally
}
else{
}
Unless there is something I'm missing , how can I get this to run via octopus ?
There is a possibility that Octopus master/tentacle service runs on different user, check the environment variable for that user also.
If you unable to find the root cause, the alternate is define one Target scoped variable called "npmPath" ( value may be different based on target ) in octopus to store npm path
Now, you can use $npmPath variable in script.

Jenkins + JenkinsFile + Bourneshell - Step fail

I updated my plugins and Jenkinsfile recently
Using a common stack of
Latest version of Jenkins on Ubuntu
Blue Ocean plugin
Azure VM Agent plugin
Pipeline (Jenkinsfile)
I randomly have steps crashing when they are processed on another agent (created by Azure VM plugin).
wrapper script does not seem to be touching the log file in /tmp/jenkins/workspace/[name of workspace]#tmp/durable-2ae31cde
(JENKINS-48300: if on a laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300)
script returned exit code -1
How can I fix it?

where are the build logs created when gcloud app deploy fails

Quick: where can I find the deployment logs for a node deploy which fails?
Setup: windows 10 box developing a node.js website. the website runs locally, and has deployed successfully with the same package stack (body-parser, express, firebase, firebase-tools, path, pug)
Google Cloud SDK 134.0.0
app-engine-python 1.9.40
bq 2.0.24
bq-win 2.0.24
core 2016.11.07
core-win 2016.11.07
gcloud
gsutil 4.22
gsutil-win 4.20
windows-ssh-tools 2016.05.13
The last few lines of the deploy output shows a core dump and timeout ends the deploy and how the latest gcloud update gacked up the logging output.
[91mnpm[0m[91m WARN using --force I sure hope you know what you are doing.
[0m
> group-coms#0.0.1 install /app
> npm install --force
[91mAborted (core dumped)
ERROR: (gcloud.app.deploy) Error Response: [4] DEADLINE_EXCEEDED
Oh yes, when it failed earlier today, I moved the folder to the root of the drive testing the 'too long a path' theory and it deployed successfully a couple of times. I haven't added or renamed any files since then, I have tried reloading all the node_modules to no avail.
# [START app_yaml]
runtime: nodejs
vm: true
# [END app_yaml]
I changed the yamal file to comply with upgrading#appyaml_changes and the deploy completed successfuly... I would still like to know more about how I can monitor the build process..

Cordova cli create with proxy

I want to run
cordova create hello com.example.hello HelloWorld
but all I get is the base folder structure and the error: connect ETimedOut.
I have set the proxy for node.js and PhoneGap projects get setup fine.
Cordova cli is setup fine so far (can find it in c:\Users\username\AppData\Roaming\npm)
Anything I am missing? (PATH is set to ...npm)
I managed to fix it:
set the urls platform.js
http instead of https.
installed ANT and set some environement vars:
ANT_HOME c:\dev\apache-ant-1.9.3\
ANT_OPTS -Dhttp.proxyHost=http://proxy.myAddress.de -Dhttp.proxyPort=3000
PATH %ANT_HOME%\bin
set some additonal Adnroid environment vars:
PATH %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
Hope this helps others

Resources