Re: Problem with Publish over SSH

2021-03-05 Thread Arnaud bourree
Hi,

You should use id_rsa which is private key and add id_rsa.pub which is
public key to allowed keys in target platform.

Regards

Arnaud


Le sam. 6 mars 2021 à 00:59, nosl...@hotmail.com  a
écrit :

> I am running Jenkins on UBuntu on a Vagrant VM
>
> I created the ssh keys in ~/.ssh
>
> From Jenkins > Configure > Publish over SSH, in the Path to key I enter
> "/home/vagrant/.ssh/id_rsa.pub"
>
> I get a "No such file: '/home/vagrant/.ssh/id_rsa.pub"" error.
>
> Why doesn't Jenkins see this file?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/fd0ff7d5-87fc-446c-8fc6-e09b62c62513n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAESUf_DJ-7SHdEE69%3DnBc9iV0vYy0MMtc%2Bwxm_siVmRpdzDQTA%40mail.gmail.com.


Problem with Publish over SSH

2021-03-05 Thread nosl...@hotmail.com
I am running Jenkins on UBuntu on a Vagrant VM

I created the ssh keys in ~/.ssh

>From Jenkins > Configure > Publish over SSH, in the Path to key I enter 
"/home/vagrant/.ssh/id_rsa.pub"

I get a "No such file: '/home/vagrant/.ssh/id_rsa.pub"" error.  

Why doesn't Jenkins see this file?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fd0ff7d5-87fc-446c-8fc6-e09b62c62513n%40googlegroups.com.


RE: How can i execute shell scripts from Jenkins ?

2021-03-05 Thread 'Jensen, Gil' via Jenkins Users
Thanks Eric

Thanks and Regards
Gil Jensen
General Dynamics Land Systems
M:616-610-0914
D:586-825-5421
jen...@gdls.com

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Eric Pyle
Sent: Friday, March 5, 2021 2:47 PM
To: jenkinsci-users@googlegroups.com
Subject: Re: How can i execute shell scripts from Jenkins ?


CAUTION EXTERNAL EMAIL
THIS EMAIL WAS SENT FROM OUTSIDE GDLS. PLEASE DO NOT OPEN ANY URL LINKS, OPEN 
ATTACHMENTS OR REPLY TO THIS EMAIL IF YOU ARE UNABLE TO VERIFY THE SENDER’S 
EMAIL ADDRESS

Typically such problems are because the shell script is tested under a 
different user account than the one used by Jenkins. This may result in 
commands not being found due to different $PATH settings or permission errors 
because of different user permissions. It's hard to be more specific without 
knowing more about the errors you are seeing.

Eric
On 3/5/2021 12:03 PM, Gil Jensen wrote:
can you tell me why Jenkins would get a different result from the  shell 
scripts  alone?
On Wednesday, March 18, 2020 at 12:25:34 PM UTC-4 Siddhesh Malpani wrote:
Mohan,

Yes of course you can do that. Simply ad the shell script file name in the 
'Execute Shell' step as explained by Derek. Remember that you've give the path 
of your file relative to your workspace directory. Suppose your worskapce dir 
is 'build-dev' and the shell script 'patch.sh' is located in a dir 'scripts' 
under the workspace. Then you'll have to give it's path as:

./scripts/patch.sh

And you're good to go.

Cheers,
Siddhesh
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c6d9f1a7-ac7a-4e88-9267-ee8ec1386223n%40googlegroups.com
 
[groups.google.com].

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ddb470f6-4eac-0cbe-2909-117690147526%40cd-adapco.com
 
[groups.google.com].

--
This is an e-mail from General Dynamics Land Systems. It is for the intended 
recipient only and may contain confidential and privileged information.  No one 
else may read, print, store, copy, forward or act in reliance on it or its 
attachments.  If you are not the intended recipient, please return this message 
to the sender and delete the message and any attachments from your computer. 
Your cooperation is appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/107cb34f902c48aa8e3dfa838cdf064e%40gdls.com.


RE: How can i execute shell scripts from Jenkins ?

2021-03-05 Thread 'Jensen, Gil' via Jenkins Users
Thank you, I have done this but they are still not running equally

Thanks and Regards
General Dynamics Land Systems
Gil Jensen
M:616-610-0914
D:586-825-5421
jen...@gdls.com

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Gil Jensen
Sent: Friday, March 5, 2021 12:04 PM
To: Jenkins Users 
Subject: Re: How can i execute shell scripts from Jenkins ?


CAUTION EXTERNAL EMAIL
THIS EMAIL WAS SENT FROM OUTSIDE GDLS. PLEASE DO NOT OPEN ANY URL LINKS, OPEN 
ATTACHMENTS OR REPLY TO THIS EMAIL IF YOU ARE UNABLE TO VERIFY THE SENDER’S 
EMAIL ADDRESS

can you tell me why Jenkins would get a different result from the  shell 
scripts  alone?
On Wednesday, March 18, 2020 at 12:25:34 PM UTC-4 Siddhesh Malpani wrote:
Mohan,

Yes of course you can do that. Simply ad the shell script file name in the 
'Execute Shell' step as explained by Derek. Remember that you've give the path 
of your file relative to your workspace directory. Suppose your worskapce dir 
is 'build-dev' and the shell script 'patch.sh' is located in a dir 'scripts' 
under the workspace. Then you'll have to give it's path as:

./scripts/patch.sh

And you're good to go.

Cheers,
Siddhesh
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c6d9f1a7-ac7a-4e88-9267-ee8ec1386223n%40googlegroups.com
 
[groups.google.com].

--
This is an e-mail from General Dynamics Land Systems. It is for the intended 
recipient only and may contain confidential and privileged information.  No one 
else may read, print, store, copy, forward or act in reliance on it or its 
attachments.  If you are not the intended recipient, please return this message 
to the sender and delete the message and any attachments from your computer. 
Your cooperation is appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/92c2c353d49b4d5ea5c66f18e5a26732%40gdls.com.


Re: How can i execute shell scripts from Jenkins ?

2021-03-05 Thread Eric Pyle
Typically such problems are because the shell script is tested under a 
different user account than the one used by Jenkins. This may result in 
commands not being found due to different $PATH settings or permission 
errors because of different user permissions. It's hard to be more 
specific without knowing more about the errors you are seeing.


Eric

On 3/5/2021 12:03 PM, Gil Jensen wrote:
can you tell me why Jenkins would get a different result from the  
shell scripts  alone?


On Wednesday, March 18, 2020 at 12:25:34 PM UTC-4 Siddhesh Malpani wrote:

Mohan,

Yes of course you can do that. Simply ad the shell script file
name in the 'Execute Shell' step as explained by Derek. Remember
that you've give the path of your file relative to your workspace
directory. Suppose your worskapce dir is 'build-dev' and the shell
script 'patch.sh' is located in a dir 'scripts' under the
workspace. Then you'll have to give it's path as:

./scripts/patch.sh

And you're good to go.

Cheers,
Siddhesh

--
You received this message because you are subscribed to the Google 
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jenkinsci-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c6d9f1a7-ac7a-4e88-9267-ee8ec1386223n%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ddb470f6-4eac-0cbe-2909-117690147526%40cd-adapco.com.


Jenkins does not install one particular CustomTool (already tried: extract ZIP, shell script)

2021-03-05 Thread Amedee Van Gasse
I have defined a Custom Tool Tesseract, which extracts a ZIP file.

In my Scripted Pipeline, I have this code:

withEnv([
"gsExec=$gsPath",
"compareExec=$comparePath",
"Path+TESSERACT=${tool name: 'Tesseract', type: 
'com.cloudbees.jenkins.plugins.customtools.CustomTool'}"
]) {
configFileProvider([configFile(fileId: 
GeneralVariables.mavenGlobalSettings, variable: 'MAVEN_SETTINGS')]) {
withMaven(jdk: GeneralVariables.JDK_VERSION, maven: 
GeneralVariables.Maven) {
sh 'echo $PATH'
sh "mvn --global-settings ${MAVEN_SETTINGS.replace '\\', '/'} 
--no-transfer-progress --batch-mode install " +
"--activate-profiles test -DgsExec=\"$gsPath\" 
-DcompareExec=\"$comparePath\" -Dmaven.repo.local=.repository"
}
}

In my Jenkins Console Log, I see this output:

provisioning config files...
copy managed file [MyGlobalSettings] to 
file:/C:/Users/jenkins/workspace/run-cross-module-tests-java-QA-11580@tmp/config12082685466158235325tmp
[withMaven] Options: []
[withMaven] Available options: 
[withMaven] using JDK installation jdk-8-oracle
[withMaven] using Maven installation 'M3'
+ echo 
/c/Users/jenkins/tools/hudson.model.JDK/jdk-8-oracle/bin:/c/Users/jenkins/workspace/run-cross-module-tests-java-QA-11580@tmp/withMavend1394d3e:/c/Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/Tesseract/Tesseract-OCR:/mingw64/bin:/c/program
 
files/powershell/7:/c/Program 
Files/ImageMagick-7.0.11-Q16-HDRI:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program
 
Files/Amazon/cfn-bootstrap:/c/ProgramData/chocolatey/bin:/c/Program 
Files/OpenSSH-Win64:/c/Program 
Files/dotnet:/cmd:/mingw64/bin:/usr/bin:/c/Program 
Files/OpenJDK/openjdk-11.0.10_9/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/Program
 
Files/PowerShell/7:/c/Program 
Files/OpenJDK/openjdk-8u282-b08/bin:/c/Program 
Files/nodejs:/bin:/c/Windows/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/c/Users/jenkins/AppData/Local/Microsoft/WindowsApps
/c/Users/jenkins/tools/hudson.model.JDK/jdk-8-oracle/bin:/c/Users/jenkins/workspace/run-cross-module-tests-java-QA-11580@tmp/withMavend1394d3e:/c/Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/Tesseract/Tesseract-OCR:/mingw64/bin:/c/program
 
files/powershell/7:/c/Program 
Files/ImageMagick-7.0.11-Q16-HDRI:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program
 
Files/Amazon/cfn-bootstrap:/c/ProgramData/chocolatey/bin:/c/Program 
Files/OpenSSH-Win64:/c/Program 
Files/dotnet:/cmd:/mingw64/bin:/usr/bin:/c/Program 
Files/OpenJDK/openjdk-11.0.10_9/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/Program
 
Files/PowerShell/7:/c/Program 
Files/OpenJDK/openjdk-8u282-b08/bin:/c/Program 
Files/nodejs:/bin:/c/Windows/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/c/Users/jenkins/AppData/Local/Microsoft/WindowsApps
+ mvn --global-settings 
C:/Users/jenkins/workspace/run-cross-module-tests-java-QA-11580@tmp/config12082685466158235325tmp
 
--no-transfer-progress --batch-mode install --activate-profiles test 
'-DgsExec=C:/Program Files/gs/gs9.53.3/bin/gswin64c.exe' 
'-DcompareExec=C:/Program Files/ImageMagick-7.0.11-Q16-HDRI/compare.bat' 
-Dmaven.repo.local=.repository

The PATH variable contains the Tesseract directory, 
/c/Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/Tesseract/Tesseract-OCR
.

I don't see anything in the log that actually tells me that a CustomTool is 
actually installed.

Further down in the logging, I see that Tesseract isn't found:

***REDACTED***.tesseract4.TesseractHelper ERROR Command failed: Cannot run 
program "tesseract": CreateProcess error=2, The system cannot find the file 
specified
***REDACTED***.tesseract4.Tesseract4ExecutableOcrEngine ERROR Tesseract 
failed. Please check that tesseract is installed and provided path to 
tesseract executable directory is correct

Indeed, when I verify the directories on the node itself, I see that the 
Tesseract directory is missing:

ls 
C:\Users\jenkins\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\ 

Directory: 
C:\Users\jenkins\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool 

Mode LastWriteTime Length Name
 - -- 
d3/5/2021  6:39 PMInspectHeaders

So let me repeat this very clearly: the PATH value is correct, but the 
actual directory does not exist.

InspectHeaders is the only CustomTool that is installed (earlier in the 
pipeline, with a shell script). Tesseract, which should be extracted from a 
ZIP file, is not installed.

I have several other nodes: on Linux, it is successfully installed with apt-get 
install; and on another Windows node, it is 

jenkins and bash

2021-03-05 Thread Gil Jensen
I have set up several jenkins jobs that do nothing more than execute bas 
scripts, howevwe The bash scripts run fine and complete with no errors in 
the but jenkins runs and gets errors is there a right way to debug this?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c24fff46-1b47-4196-8e61-2ec28df2fb11n%40googlegroups.com.


Re: How can i execute shell scripts from Jenkins ?

2021-03-05 Thread Gil Jensen
can you tell me why Jenkins would get a different result from the  shell 
scripts  alone?

On Wednesday, March 18, 2020 at 12:25:34 PM UTC-4 Siddhesh Malpani wrote:

> Mohan,
>
> Yes of course you can do that. Simply ad the shell script file name in the 
> 'Execute Shell' step as explained by Derek. Remember that you've give the 
> path of your file relative to your workspace directory. Suppose your 
> worskapce dir is 'build-dev' and the shell script 'patch.sh' is located in 
> a dir 'scripts' under the workspace. Then you'll have to give it's path as:
>
> ./scripts/patch.sh
>
> And you're good to go.
>
> Cheers,
> Siddhesh
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c6d9f1a7-ac7a-4e88-9267-ee8ec1386223n%40googlegroups.com.