Re: Docker-plugin - ssh connection refused when connecting to slave

2018-01-18 Thread Alejandro Villarreal
@Martin / @Nicolas, have you ever seen that after failing to connect to a 
sibling container (due to a missing "Docker Hostname"), and stopping that 
container (from the Docker plugin section under Manage Jenkins), a new 
container never gets created to service new build requests from projects? I 
have the master setup to not perform builds so when I request a new build 
from the project, there are no executors that can service it... a new 
container should be spawned for this, no? Am I missing something? Could 
this be a different issues?

On Friday, October 20, 2017 at 4:03:45 AM UTC-5, seol...@gmail.com wrote:
>
> Hi,
> I am getting this error on various versions of Jenkins and the 
> docker-plugin including latest of both.
> My Jenkins master is running in a container. It successfully launches a 
> docker container for the slave (using the evarga/jenkins-slave image) but 
> then fails to connect with the error below.
> I can see my slave running with a docker ps and can even successfully 
> connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral 
> port is) using the same credentials configured in the docker agent template 
> section.
> Any ideas really welcome as I'm now going round in circles trying to get 
> this working.
> Thanks.
>
>
> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
> Connection refused (Connection refused)
> SSH Connection failed with IOException: "Connection refused (Connection 
> refused)".
> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>   at com.trilead.ssh2.Connection.connect(Connection.java:834)
>   at com.trilead.ssh2.Connection.connect(Connection.java:703)
>   at com.trilead.ssh2.Connection.connect(Connection.java:617)
>   at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (Connection refused)
>   at java.net.PlainSocketImpl.socketConnect(Native Method)
>   at 
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>   at 
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>   at java.net.Socket.connect(Socket.java:589)
>   at 
> com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:367)
>   at 
> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>   at com.trilead.ssh2.Connection.connect(Connection.java:774)
>   ... 9 more
> [10/20/17 08:13:45] Launch failed - cleaning up connection
> [10/20/17 08:13:45] [SSH] Connection closed.
>
>
>

-- 
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/c60bb73f-eccd-43f4-8ea2-0058398c6f7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[EVENT]: Jenkins World 2018 CFP is Open

2018-01-18 Thread Alyssa Tong
Hi All,

Jenkins World 2018 Call for Papers (CFP) launched
 yesterday.
 We are looking for use case from Jenkins practitioner, contributors,
 plugin developers, and users of all backgrounds and levels, from small
start-ups to large scaled Jenkins instances.

This year's Jenkins World takes place in San Francisco, Sept 16 -19,
additionally there will be a Jenkins World Europe taking place sometime in
October, location is TBA.

CFP  for both locations will be open
for only 2 months, deadline is
March 18, 2018.

Looking forward to seeing many excellent submissions.

BR,
alyssa

-- 
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/CAC9wNaySvs7Cgz2aZcgMJPDyy60awb2L-XjALnPftEi4KAd0QA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: sshAgent connection error through Pipeline with Private key

2018-01-18 Thread Jimmy Bway
Hi,

Wanted to know if somehow you found a solution ?

If yes please share.

Regards

Le mardi 5 septembre 2017 19:38:07 UTC-4, sabharwal81 a écrit :
>
> Hello everyone,
>
> I am stuck with one odd problem where i am trying to run remote command on 
> linux server from my slave machine (windows server) as part of Pipeline 
> script. As SSH connections are only supported using Private/Public Keys, i 
> did follow steps mentioned in blog 
> https://medium.com/@weblab_tech/how-to-publish-artifacts-in-jenkins-f021b17fde71
>  
> to generate keys to be later used for calls. Below are things i have done 
> so far:
> - Connected to slave server and created key using ssh-keygen.
> - Created new credential using key/passphrase in Jenkins (id as 
> server_ssh_key).
> - Copied over the public key under /authorized_keys (id_rsa.pub) on the 
> remote server.
> - Connected from Slave server to the remote linux server through console 
> to allow entry to "known host" file on the slave server.
> - Updated Pipeline script to use below code to allow use of newly created 
> credentials.
> pipeline {
> options {
> timestamps()
> }
> agent {label 'att_server_slave'}
> stages {
> stage('Builds') {
> steps {
> script{ 
> stage ('Starting build_rhel56_x64_1')  
> {
>   sshagent(credentials: ['server_ssh_key']) {
>
> ssh 'ro...@192.168.2.111  ls'
> }
> }
> }
> }
> }
> }
> }
>
> when i am trying to run this pipeline script, i am getting below error:
>
> 00:13:26 [ssh-agent] Using credentials root
> 00:13:26 [ssh-agent] Looking for ssh-agent implementation...
> 00:13:27 [ssh-agent]   Exec ssh-agent (binary ssh-agent on a remote 
> machine)
> 00:13:27 $ ssh-agent
> 00:13:27 SSH_AUTH_SOCK=/tmp/ssh-OzJHVK5660/agent.5660
> 00:13:27 SSH_AGENT_PID=6056
> 00:13:27 $ ssh-add 
> C:\EngineJenkins\workspace\pipeline_test@tmp\private_key_3271471486698300052.key
> 00:13:28   3 [main] *ssh-add 2176 tty_list::allocate_tty: No tty 
> allocated*
>
> Can someone please help in understanding what wrong i am doing? Or what 
> specific check/step i am missing?
>
> 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/2d13fb7e-44e2-4976-8c27-d437b1e15cf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run jobs on oraclelinux container.

2018-01-18 Thread Jacob Larsen
Yes. Docker plugin isn't able to separate the build environment from the 
Jenkins slave though. The images used are more traditional slaves with 
the jenkins slave daemon running inside the same container, which means 
that the jenkins slave dependencies must be mixed with the build 
environment. The one property shared with the 3 first solutions is that 
they only need the build environments themselves, as the slave daemon 
runs outside this container.


/Jacob


On 2018-01-18 07:41, Dirk Heinrichs wrote:

Am 17.01.2018 um 20:57 schrieb Jacob Larsen:


1. Use Docker Slaves Plugin

2. Use Cloudbees Docker Custom build environment plugin

3. Use the Docker Pipeline plugin, specifically the .inside syntax



4. Use Docker plugin: Multiple Docker hosts, Container templates must 
be defined either globally or in job configs (which will then add them 
to each defined Docker host in the global config). Support SSH and 
JNLP slaves.


HTH...

    Dirk
--
*Dirk Heinrichs*
Senior Systems Engineer, Delivery Pipeline
OpenText^TM Discovery | Recommind
*Email*: dirk.heinri...@recommind.com 


*Website*: www.recommind.de 

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon 
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer 
HRB 10646


This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in 
error) please notify the sender immediately and destroy this e-mail. 
Any unauthorized copying, disclosure or distribution of the material 
in this e-mail is strictly forbidden


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den 
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie 
die unbefugte Weitergabe dieser Mail sind nicht gestattet.


--
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/191ddd71-5f8f-aab7-dc3c-5bd5f10815d5%40opentext.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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/583f73cb-6d4f-44e8-1e1b-aa7042c43d29%40larsen.net.
For more options, visit https://groups.google.com/d/optout.


Re: Powershell step in pipeline not executing

2018-01-18 Thread Flavio Campana
I got i straight from the pipeline syntax page (and some online example) 
and i dont get syntax errors

Il giorno giovedì 18 gennaio 2018 17:53:41 UTC+1, Björn Pedersen ha scritto:
>
> Hi,
>
> I have no experience with declarative pipelines,
> but  configFileProvider is a standalone step , not taking a body like you 
> use it (it's not a withConfigFile...)
>
> try:
>
>echo "Getting version for ${env.projectDir}"
>configFileProvider([configFile(fileId: 
> '52c08128-fa6f-4c79-8a43-ff4f6dd13dbd', variable: 'MYSCRIPT')]) 
>powershell script: "${MYSCRIPT} -projecDir 
> ${env.projectDir}"
>script { res = powershell script: "${MYSCRIPT} -projecDir 
> ${env.projectDir}" 
> echo "results: ${res}"
>}
>
>
>
>
> Björn
>

-- 
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/e16abc89-8577-41be-8a52-2f9149563694%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Powershell step in pipeline not executing

2018-01-18 Thread 'Björn Pedersen' via Jenkins Users
Hi,

I have no experience with declarative pipelines,
but  configFileProvider is a standalone step , not taking a body like you 
use it (it's not a withConfigFile...)

try:

   echo "Getting version for ${env.projectDir}"
   configFileProvider([configFile(fileId: 
'52c08128-fa6f-4c79-8a43-ff4f6dd13dbd', variable: 'MYSCRIPT')]) 
   powershell script: "${MYSCRIPT} -projecDir ${env.projectDir}"
   script { res = powershell script: "${MYSCRIPT} -projecDir 
${env.projectDir}" 
echo "results: ${res}"
   }




Björn

-- 
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/adef1318-236c-4dd5-972b-dba1e0726a93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Powershell step in pipeline not executing

2018-01-18 Thread Flavio Campana
I tried right now but nothing changed

Il giorno giovedì 18 gennaio 2018 17:33:11 UTC+1, slide ha scritto:
>
> You may want to try naming the variable something else besides "script" 
> which is a pipeline variable (you use it right below). I might recommand 
> PSSCRIPT, or something similar.
>
>>
>>

-- 
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/46735d94-2e06-40f7-8f9b-8f67d16e4263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Powershell step in pipeline not executing

2018-01-18 Thread Slide
You may want to try naming the variable something else besides "script"
which is a pipeline variable (you use it right below). I might recommand
PSSCRIPT, or something similar.

On Thu, Jan 18, 2018 at 9:14 AM Flavio Campana  wrote:

> I've got a strange problem with a declarative pipeline and powershell, it
> seems the script is never executed.
> The script is in a managed file.
> The pipeline:
>
> pipeline {
> agent any
> triggers {
> pollSCM('H * * * *')
> }
> tools {
> msbuild "DefaultMSBuild"
> }
> environment {
> solution = 'Project.sln'
> project = 'Project\\Project.csproj'
> projectDir = 'Project\\Project'
> key = credentials('proget-testauto-apikey')
> }
> stages {
> stage('Build and test') {
> steps {
> echo "Getting version for ${env.projectDir}"
> configFileProvider([configFile(fileId:
> '52c08128-fa6f-4c79-8a43-ff4f6dd13dbd', variable: 'script')]) {
> powershell script: "${script} -projecDir
> ${env.projectDir}"
>script { res = powershell script: "${script} -projecDir
> ${env.projectDir}"
> echo "results: ${res}"
> }
> }
> echo 'Restore nugets..'
> bat "%NUGET% restore Project.sln"
> echo "Building solution : Project.sln"
> script {
> scanner = tool name: 'NewSonarScanner', type:
> 'hudson.plugins.sonar.MsBuildSQRunnerInstallation'
> props = readProperties text: '${res}'
> withSonarQubeEnv('DefaultSonart') {
> bat "${scanner}\\SonarQube.Scanner.MSBuild.exe
> begin /k:Project /n:Project /v:${props.PackageVersion}
> /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.login=%SONAR_AUTH_TOKEN%
> /d:sonar.cs.nunit.reportsPaths=\"NTestResult.xml\"
> /d:sonar.cs.opencover.reportsPaths=\"opencover.xml\" /d:sonar.verbose=true"
> bat "\"${tool name: 'DefaultMSBuild', type:
> 'msbuild'}\"\\msbuild.exe Project.sln /m /target:clean,build
> /p:Configuration=Release" //;VisualStudioVersion=12.0
> nunitReturn = bat returnStatus: true, script:
> "%OPENCOVER% -output:\"%WORKSPACE%\\opencover.xml\" -returntargetcode
> -register:user -target:\"%NUNIT%\"
> -targetargs:\"%WORKSPACE%\\Project.Tests\\bin\\Release\\Project.Tests.dll
> -v --result=NTestResult.xml;format=nunit3 --work=%WORKSPACE%\" "
> bat "${scanner}\\SonarQube.Scanner.MSBuild.exe end"
> }
> }
> }
> }
> stage('Positive result') {
> when {
>   expression { nunitReturn == 0 }
> }
> steps {
> echo "Archiving Project"
> archiveArtifacts artifacts: '**/bin/Release/**',
> onlyIfSuccessful: true
> bat "%NUGET% pack Project\\Project.csproj -Prop
> Configuration=Release"
> bat "%NUGET% push
> Project\\Project.${props.PackageVersion}.nupkg -s %REPOTESTAUTO% ${key}"
>
> }
> }
> stage('Negative result'){
> when {
>   expression { nunitReturn > 0 }
> }
> steps {
> script { currentBuild.result = "UNSTABLE" }
> }
> }
> }
> post {
>
> failure {
> mail(from: "a...@test.com",
>to: "d...@test.com",
>subject: "Error in ${env.JOB_NAME}",
>body: "See at ${env.BUILD_URL}")
> }
>
> unstable {
> mail(from: "a...@test.com",
>to: "d...@test.com",
>subject: "Test failed in ${env.JOB_NAME}",
>body: "See at ${env.BUILD_URL}")
> }
> }
> options {
> // For example, we'd like to make sure we only keep 10 builds at a
> time, so
> // we don't fill up our storage!
> buildDiscarder(logRotator(numToKeepStr:'20'))
> timeout(time: 60, unit: 'MINUTES')
> }
> }
>
> the script:
> param([Parameter(Mandatory=$true)][string]$projectDir)
> $packageVersion = ''
> Write-Output "Executed=True"
> Write-Output
> "PropFile=:$env:WORKSPACE\\$projectDir\\Properties\\AssemblyInfo.cs'"
> $content = Get-Content ($env:WORKSPACE + '\\'  + $projectDir +
> '\\Properties\\AssemblyInfo.cs');
> foreach ($line in $content)
> {
> if ($line -match '\[assembly:
> AssemblyVersion\("((\d+)\.?(\d*)\.?(\d*)?[\.-]?([\d\*]*)?([a-zA-Z]*)?(\d*?))"\)\]')
> {
> Write-Output "AssemblyFullVersion=$($Matches[1])"
> Write-Output "AssemblyVersion=$($Matches[2]).$($Matches[3]).$($Matches[4])"
> Write-Output "AssemblyMajor=$($Matches[2])"
> Write-Output "AssemblyMinor=$($Matches[3])"
> Write-Output "AssemblyRevision=$($Matches[4])"
> Write-Output "AssemblyBuild=$($Matches[5])"
> Write-Output "AssemblySuffix=$($Matches[6])"
> Write-Output 

Powershell step in pipeline not executing

2018-01-18 Thread Flavio Campana
I've got a strange problem with a declarative pipeline and powershell, it 
seems the script is never executed.
The script is in a managed file.
The pipeline:

pipeline {
agent any
triggers { 
pollSCM('H * * * *') 
}
tools {
msbuild "DefaultMSBuild"
}
environment {
solution = 'Project.sln'
project = 'Project\\Project.csproj'
projectDir = 'Project\\Project'
key = credentials('proget-testauto-apikey')
}
stages {
stage('Build and test') {
steps {
echo "Getting version for ${env.projectDir}"
configFileProvider([configFile(fileId: 
'52c08128-fa6f-4c79-8a43-ff4f6dd13dbd', variable: 'script')]) {
powershell script: "${script} -projecDir 
${env.projectDir}"
   script { res = powershell script: "${script} -projecDir 
${env.projectDir}" 
echo "results: ${res}"
}
}
echo 'Restore nugets..'
bat "%NUGET% restore Project.sln"
echo "Building solution : Project.sln"
script {
scanner = tool name: 'NewSonarScanner', type: 
'hudson.plugins.sonar.MsBuildSQRunnerInstallation'
props = readProperties text: '${res}'
withSonarQubeEnv('DefaultSonart') {
bat "${scanner}\\SonarQube.Scanner.MSBuild.exe 
begin /k:Project /n:Project /v:${props.PackageVersion} 
/d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.login=%SONAR_AUTH_TOKEN% 
/d:sonar.cs.nunit.reportsPaths=\"NTestResult.xml\" 
/d:sonar.cs.opencover.reportsPaths=\"opencover.xml\" /d:sonar.verbose=true"
bat "\"${tool name: 'DefaultMSBuild', type: 
'msbuild'}\"\\msbuild.exe Project.sln /m /target:clean,build 
/p:Configuration=Release" //;VisualStudioVersion=12.0
nunitReturn = bat returnStatus: true, script: 
"%OPENCOVER% -output:\"%WORKSPACE%\\opencover.xml\" -returntargetcode 
-register:user -target:\"%NUNIT%\" 
-targetargs:\"%WORKSPACE%\\Project.Tests\\bin\\Release\\Project.Tests.dll 
-v --result=NTestResult.xml;format=nunit3 --work=%WORKSPACE%\" "
bat "${scanner}\\SonarQube.Scanner.MSBuild.exe end"
}
}
}
}
stage('Positive result') {
when {
  expression { nunitReturn == 0 }
}
steps {
echo "Archiving Project"
archiveArtifacts artifacts: '**/bin/Release/**', 
onlyIfSuccessful: true
bat "%NUGET% pack Project\\Project.csproj -Prop 
Configuration=Release"
bat "%NUGET% push 
Project\\Project.${props.PackageVersion}.nupkg -s %REPOTESTAUTO% ${key}"

}
}
stage('Negative result'){
when {
  expression { nunitReturn > 0 }
}
steps {
script { currentBuild.result = "UNSTABLE" }
}
}
}
post {

failure {   
mail(from: "a...@test.com", 
   to: "d...@test.com", 
   subject: "Error in ${env.JOB_NAME}", 
   body: "See at ${env.BUILD_URL}")
}

unstable {   
mail(from: "a...@test.com", 
   to: "d...@test.com", 
   subject: "Test failed in ${env.JOB_NAME}", 
   body: "See at ${env.BUILD_URL}")
}
}
options {
// For example, we'd like to make sure we only keep 10 builds at a 
time, so
// we don't fill up our storage!
buildDiscarder(logRotator(numToKeepStr:'20'))
timeout(time: 60, unit: 'MINUTES')
}
}

the script:
param([Parameter(Mandatory=$true)][string]$projectDir)
$packageVersion = ''
Write-Output "Executed=True"
Write-Output 
"PropFile=:$env:WORKSPACE\\$projectDir\\Properties\\AssemblyInfo.cs'"
$content = Get-Content ($env:WORKSPACE + '\\'  + $projectDir + 
'\\Properties\\AssemblyInfo.cs');
foreach ($line in $content)
{
if ($line -match '\[assembly: 
AssemblyVersion\("((\d+)\.?(\d*)\.?(\d*)?[\.-]?([\d\*]*)?([a-zA-Z]*)?(\d*?))"\)\]')
{
Write-Output "AssemblyFullVersion=$($Matches[1])"
Write-Output "AssemblyVersion=$($Matches[2]).$($Matches[3]).$($Matches[4])"
Write-Output "AssemblyMajor=$($Matches[2])"
Write-Output "AssemblyMinor=$($Matches[3])"
Write-Output "AssemblyRevision=$($Matches[4])"
Write-Output "AssemblyBuild=$($Matches[5])"
Write-Output "AssemblySuffix=$($Matches[6])"
Write-Output "AssemblyNumber=$($Matches[7])"

if ($packageVersion -eq ''){
$packageVersion = $Matches[1];
}
}
elseif ($line -match '\[assembly: 
AssemblyInformationalVersion\("((\d+)\.?(\d*)\.?(\d*)?[\.-]?([\d\*]*)?([a-zA-Z]*)?(\d*?))"\)\]')
{
Write-Output "AssemblyInfoFullVersion=$($Matches[1])"
Write-Output 
"AssemblyInfoVersion=$($Matches[2]).$($Matches[3]).$($Matches[4])"
Write-Output "AssemblyInfoMajor=$($Matches[2])"
Write-Output 

Re: Help Please: How to change not reset admin password

2018-01-18 Thread Mai Waly
Please help

On Tuesday, November 28, 2017 at 6:01:49 PM UTC+2, Mai Waly wrote:
>
> Hi All, 
>
> Please help, our jenkins instance is now integrated to active directory 
> and my ldap account is admin.
> We have forgot local admin password and soon we need to change active 
> directory account password.
>
> How to change local account "admin" password via our ldap account, I can 
> not find where to change the password.
>
>
> Thanks & BRs
> Mais
>
>

-- 
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/39cd7686-799c-404c-a86c-81a0238eb292%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Nullpointer exception in Jenkins 2.46.3

2018-01-18 Thread Daniel Beck

> On 18. Jan 2018, at 10:14, 'Madhawa Gunasekara' via Jenkins Users 
>  wrote:
> 
> ERROR: Processing failed due to a bug in the code. Please report this to 
> jenkinsci-users@googlegroups.com

This error mostly means you're on Maven Plugin 2.16 or older, superseded by 
2.17 since July 2017. Please update your plugins to current versions, and 
report a bug as described on https://jenkins.io/redirect/report-an-issue if the 
problem persists.


-- 
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/E032D2A7-5EB4-4A43-A2F0-9114C2DF3423%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


RE: Declarative script not archiving artefacts

2018-01-18 Thread David Aldrich
Thanks Björn

Removing $WORKSPACE/ fixed it.

Best regards

David

From: 'Björn Pedersen' via Jenkins Users 
[mailto:jenkinsci-users@googlegroups.com]
Sent: 18 January 2018 12:27
To: Jenkins Users 
Subject: Re: Declarative script not archiving artefacts


always {
archiveArtifacts artifacts: 
'$WORKSPACE/RegressionTests/**/*.zip'

The artifacts should be  specified relative to the workspace, so the 
$WORKSPACE/ seems wrong. archiveArtifact will not archive files outside the 
current workspace

Björn
--
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/26229d4c-7cdc-46e5-b5c2-2b1221bcd69e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Click 
here
 to report this email as spam.

-- 
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/1f72264450a04959bdd226e927fe19de%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Re: Declarative script not archiving artefacts

2018-01-18 Thread 'Björn Pedersen' via Jenkins Users

always {
>
> archiveArtifacts artifacts: 
> '$WORKSPACE/RegressionTests/**/*.zip'
>
> The artifacts should be  specified relative to the workspace, so the 
$WORKSPACE/ seems wrong. archiveArtifact will not archive files outside the 
current workspace
 
Björn 

-- 
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/26229d4c-7cdc-46e5-b5c2-2b1221bcd69e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unexpected termination of the channel

2018-01-18 Thread 'Madhawa Gunasekara' via Jenkins Users

Hi 

Did you able to resolve this issue. I'm facing the same issue. 

Thanks,
Madhawa
On Thursday, May 5, 2016 at 5:51:39 PM UTC+5:30, Jordi Andreu Miralles 
wrote:
>
> Hi,
>
> we are suffering in the last days timeouts and sudden death of our slave 
> intances in Amazon EC2. 
>
> I'm observed that the Response Time in Node list page is over 3ms and 
> later we get "Time out for last n try"
>
> Finally in the node status page we get an Exception:
>
> java.io.IOException: Unexpected termination of the channel
> at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
> Caused by: java.io.EOFException
> at 
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2325)
> at 
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2794)
> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:801)
> at java.io.ObjectInputStream.(ObjectInputStream.java:299)
> at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
> at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
> at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
>
> Jenkins version: 1.651.1
> amazon ec2 plugin version: 1.31
>
> Any idea how to solve this problem?
>
> Best regards,
>
> Jordi
>

-- 
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/29c59c77-e1a8-44d6-a286-c60803671010%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Nullpointer exception in Jenkins 2.46.3

2018-01-18 Thread 'Madhawa Gunasekara' via Jenkins Users
Hi Devs,

I found this NPE when we try to build one of our repo using Jenkins. Any 
idea to avoid this issue. I found a similar issue with Jenkins older 
version [1]. but that issue is all ready fixed.

[1] https://issues.jenkins-ci.org/browse/JENKINS-20929

[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
org.wso2.carbon.mediation.templates.ui ---
ERROR: Processing failed due to a bug in the code. Please report this to 
jenkinsci-users@googlegroups.com
java.lang.NullPointerException
at 
jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:42)
at 
jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
at 
jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:902)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
project=hudson.maven.MavenModuleSet@5cd176f5[platform-builds/carbon-mediation]

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/d6c58495-dbc1-421f-b38d-5207f9207ceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Hey Guys, I am running a Jenkins job that deploys to aws beanstalk, I want in the description to have the the commit message and I am using ${GIT_COMMIT} env variable. What I am getting is the commit

2018-01-18 Thread amit shohat
Hey Guys,

I am running a Jenkins job that deploys to aws beanstalk, I want in the 
description to have the the commit message and I am using ${GIT_COMMIT} env 
variable.
What I am getting is the commit hash and not the message.
I've installed the Git Tag Message plugin and enabled it in Additional 
Behaviours in source code management.
I am using the ${GIT_TAG_MESSAGE} in the aws deploy stage and it's not 
recognized.
I am using a freestyle project.
I've tried to capture the following commands:
git log -1 --oneline $GIT_COMMIT
git log -1 --pretty='%s' $GIT_COMMIT

But can't seem to capture it.
This is what I am getting:
[wp-az] $ /bin/sh -xe /tmp/jenkins6734038198136655184.sh
++ git log -1 --pretty=%s cdb858f3b84328184c6f83a2e79e8571a63d814c
+ Update README.md

I don't think we are taging our commits in github.

Would appreciate any assistance on how to deliever the commit message.
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/58433224-c405-4906-a523-3b1a8e289c22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Declarative script not archiving artefacts

2018-01-18 Thread David Aldrich
Hi

I have a declarative script that is not archiving the build artefacts. The 
structure of the script is:

pipeline {
agent { label "sim07" }
options { buildDiscarder(logRotator(numToKeepStr: '20')) }

triggers {
pollSCM('H 20 * * 1-5')
}

stages {
stage('build_and_test') {
steps {
sh '''
/usr/bin/python3 -u my_regression_test.py
'''
}

post {
success {
 emailext (subject: "${env.JOB_NAME}: Fixed!",
   body: '${DEFAULT_CONTENT}',
   recipientProviders: [[$class: 
'CulpritsRecipientProvider']],
  to: )
 }
failure {
script{ emailext (subject: "${env.JOB_NAME}: Failure!",
  body: '${DEFAULT_CONTENT}',
  recipientProviders: [[$class: 
'CulpritsRecipientProvider']],
  to: )
}
}
unstable {
script{ emailext (subject: "${env.JOB_NAME}: Unstable!",
  body: '${DEFAULT_CONTENT}',
  to: )
}
}
always {
archiveArtifacts artifacts: 
'$WORKSPACE/RegressionTests/**/*.zip'
}
}
}
}
}

On the console output I see:

[Pipeline] archiveArtifacts
Archiving artifacts
[Pipeline] script
[Pipeline] {
[Pipeline] emailext
Sending email to: 
[Pipeline] }

But no artefact files are listed (but they are present in the build directory).

Have I structured the 'post' section incorrectly?

Best regards

David

-- 
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/0d3410a9c9fc478989f86e0411da4d81%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Master runs out of disk space because of Jenkins files and libraries loading

2018-01-18 Thread Shiran
Hi all,

I've noticed that when my pipeline jobs start and load the Jenkins file and 
shared libraries, I end up with many copies of the entire repository being 
checked out on the master. This causes master to run out of disk space

 

*More details:*


   1. I use Git plugin to load the Jenkins file
   2. Loading shared libraries (stored under "vars" folder) starts at the 
   beginning of the build, using this pipeline step:
   library identifier: 'utils', retriever: modernSCM([$class: 'GitSCMSource'
   , credentialsId: '<   >', id: '<   >', remote: '<   >',
   traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait'], [
   $class: 'RefSpecsSCMSourceTrait', templates: [[value: "  "])
   
   
*For example:*

I have a job called "*post_job*" and my Jenkins files and libraries are 
stored in a repository called "my_repository".


*After loading my Jenkins file:*

/jenkins_home/jenkins/workspace/ post_job@script  

è contains all of my_repository content  


*After loading my lobraries (I have 3: jobFlow, ManifestMap, utils):*


/jenkins_home/jenkins/workspace/post_job@libs 

jobFlow  è contains all of 
my_repository content  

jobFlow@tmpè empty  

manifestMap è contains all of 
my_repository content 
 

manifestMap@tmp   è 
empty


utils   è contains all of 
my_repository content  
 

utils@tmp è empty   

 


So I have my_repository content 4 times (!!) for each job that I have!
Any suggestions? please!
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/3f81e9ca-9e1c-437d-87f1-b3e3faeefe86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.