schedule jobs via api and delay parameter not working anymore?

2018-05-23 Thread roger . firpo
Hi, until very recently I was able to schedule the execution of jobs via the http api making use of the delay parameter, as described in https://stackoverflow.com/a/16573716/543321 My use case is to schedule a job to do some maintenance overnight, and I trigger it manually whenever it is n

Scope lock to folder

2018-05-23 Thread John Lonergan
How do I scope locks so that on team's lock names don't accidentally collide with another's? They seem to be created at server level rather than at folder level. Any advice or patterns? Right now I'm telling folk to be careful with naming. More generally... from a resource management point of v

Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
Hello All, Anyone knows how to edit a variable from shell and recover the result across each next shells. I'm trying to get the git tag version and to push the value into an env variable. In next, I'd like to re use the value into the next cmd shell. It doesn't work! Anyone has an idea? I wor

CRON doesn't work anymore after the upgrade to Jenkins ver. 2.89.4

2018-05-23 Thread mbk
We have updated our Jenkins to Jenkins version 2.89.4 Nowadays we have the problem that our jobs thta are triggered don't work like they should. Tbh - the "SCM - Build periodically" in Jenkins jobs works randomly. The triggered builds doesn't build caused by this. So we had to start the jobs man

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Ramanathan Muthaiah
> > stage('Build image') { > steps { > sh 'TAG=$(git describe --candidate=1 --tags)' > sh 'TAG=$(echo $TAG | cut -d\'-\' -f 1)' > sh 'WEB_IMAGE_NAME=' + env['ACR_LOGINSERVER'] + > '/my-project-1499882073260/test:' + env['TAG'] >

Re: Jenkins failure at continuous integration

2018-05-23 Thread Ramanathan Muthaiah
> > "C:\Program Files (x86)\Jenkins\workspace\Trivium 2015\Trivium 2015.sln" > (default target) (1) -> > "C:\Program Files (x86)\Jenkins\workspace\Trivium > 2015\Trivium.Common\Trivium.Common.csproj" (default target) (2) -> > (CoreCompile target) -> > Utils\Mail\Sender.cs(15,30): error CS1056

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Slide
Another option would be to use triple quoted strings to run all the commands within the same shell execution. You'd have to deal with the env variables and possibly escaping $ as needed. sh """TAG=\$(git describe...) | cut -d WEB_IMAGE_NAME=${ACR_LOGINSERVER}/.../\$(TAG) sudo docker""" O

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
Like this? stage('Build image') { steps { sh """TAG=$(git describe --candidate=1 --tags) TAG=$(echo $TAG | cut -d\'-\' -f 1) WEB_IMAGE_NAME=$ACR_LOGINSERVER/my-project-1499882073260/test:$TAG sudo docker build -t

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Edward Bond
Don’t use sing quotes ‘, make sure you use “, that way the string can be interpolated. I also use a global helper that grabs the output of `sh` functions. def runAndReturn(script){ toReturn = sh(script:script, returnStdout: true) toReturn = toReturn[0..-2] println toReturn toReturn } s

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
Hello, if like this.. stage('Build image') { steps { script { def TAG = sh (returnStdout: true, script: "git describe --candidate=1 --tags").trim() env.TAG = sh (returnStdout: true, script: "echo ${tag} | cut -d\'-\'

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
Hello Edward, This is my script at all I think I did a mistake... pipeline { agent any stages { stage('Build project') { steps { git credentialsId: '*', url: 'https://**' sh 'dotnet build WebApplication/WebApplication1/W

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Edward Bond
JB, Sorry, you are using the declarative syntax. I run my builds with a different pattern. Something like this might work for you, def runAndReturn(script){ toReturn = sh(script:script, returnStdout: true) toReturn = toReturn[0..-2] println toReturn toReturn }

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
OK, because I'm a beginner, wich pattern are you using? On Wednesday, May 23, 2018 at 1:27:28 PM UTC-4, Edward Bond wrote: > JB, > > Sorry, you are using the declarative syntax. I run my builds with a > different pattern. > > Something like this might work for you, > > > > def runAndReturn(scr

download pipeline library only once

2018-05-23 Thread Qiang
Hi, All, If I set the pipeline library pointing a tag in GIT repository, is it possible to not download the same tagged version every time in the pipeline execution? It would be nice to download and cache the library to save the time. Also it helps when the git connection is slow at times , it

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Edward Bond
You can use that pattern, it’s arguably better than what I use. However my builds can look like, the environment really depicts how you can execute things. I have a node labelled “default" def runAndReturn(script){ toReturn = sh(script:script, returnStdout: true) toReturn = toReturn[0..-

Re: Unable to run Jenkins inside docker container through ansible

2018-05-23 Thread Victor Martinez
Although this is not a question about using jenkins itself but how to use ansible and more specifically using the docker_container task. It smells like the command parameter is overriding the default behaviour of the jenkins image... My two cents -- You received this message because you are s

Re: Jenkins-docker

2018-05-23 Thread Victor Martinez
There are a few references in the suggested reference I posted earlier: - https://jenkins.io/doc/book/installing/#docker Your question is quite generic and you might need to be more specific, otherwise it might be hard to help you with. -- You received this message because you are subscribed to

Re: Test aborted

2018-05-23 Thread Victor Martinez
Can you elaborate it a bit more? Is that something you see in the build output or jenkins itself? Can you reproduce it locally using the same environment/setup as you do within Jenkins? Can you also explain what research have you done already? The whole stacktrace might help to know further. Ha

Re: Nexus Artifact Resolver unable to download large artifacts

2018-05-23 Thread Victor Martinez
is the assigned memory to the jenkins process big enough? You can monitor the memory usage with https://wiki.jenkins.io/display/JENKINS/Monitoring if it helps Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this gr

Re: Jenkins-docker

2018-05-23 Thread niristotle okram
What did u tried? On Thu, May 17, 2018 at 3:15 AM wrote: > Hi All, > > Setting a new infrastructure please help me out how to setup jenkins with > docker .? Individaly i know how to handle > > > Thank you > kirti > > -- > You received this message because you are subscribed to the Google Groups

Re: Best way to connect agent on OSX

2018-05-23 Thread Jon Schewe
It depends on what you want to do. I run my OSX slaves with the web start and a login script. This allows my tests to interact with the window manager. If you don't need that, then sticking with ssh is good. The only downside I can see to the ssh setup is that you need to allow ssh on your OSX mach

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread JB
I found, I need to put these commands in a script clause thanks for you help! On Wednesday, May 23, 2018 at 1:48:24 PM UTC-4, Edward Bond wrote: > You can use that pattern, it’s arguably better than what I use. > > However my builds can look like, the environment really depicts how you > can exe

Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Edward Bond
No problem, glad you figured it out. > On May 23, 2018, at 7:24 PM, JB wrote: > > I found, I need to put these commands in a script clause > thanks for you help! > > On Wednesday, May 23, 2018 at 1:48:24 PM UTC-4, Edward Bond wrote: > You can use that pattern, it’s arguably better than what I

Re: Post commit hook failed with exit code 127: --post-data not found

2018-05-23 Thread jack
> > Thank you Tyler Croy; I copied this directly from jenkins official doc, so very curious why they forgot to put that final \ at the end of the line; But still... I called a colleague and he added the \ at the end but we got immediately another error... which I don't remember anymore. Fina

Can I deploy Jenkins and/or a slave node on a Server ?

2018-05-23 Thread jack
Let me explain... Very new in computing, don't know much about servers... I recently started using Jenkins and have a master node running on my working PC, and successfully configured a windows slave/agent on another PC. Since we have other OS, I'm told to "deploy jenkins directly on our Serve

Cancel or abort a freestyle job and mark job as success

2018-05-23 Thread mark . mercer
I've been scouring the internet for a way to do this and have had no success We use git as our source control Our jenkins server is running in windows I am using windows batch scripts for several build tasks I have written a batch script that checks the commit message for a specific bit of text t