Re: Declarative Pipeline: Add trigger only on when condition

2021-10-27 Thread Victor Martinez
I'm not sure if I understood correctly what user branches of the CICD mean in this particular case, can you clarify it? Some other questions: - Are the master and CICD branches part of the same projectA? - If so, how do users interact with the project? As far as I see the upstream trigger option

Re: how can I get the value of a global variable within a function in a pipeline?

2021-02-11 Thread Victor Martinez
You can simplify it quite a bit with the post stage event https://www.jenkins.io/doc/book/pipeline/syntax/#post The example pipeline uses the post *stages* section, you can use the one specific the stage 3 Another example can be found in https://www.jenkins.io/blog/2017/02/15/declarative-notif

Re: Extracting of jenkins error

2021-01-20 Thread Victor Martinez
I understand now, thanks. I'm afraid in your case the issue is related to a syntax error in the Pipeline so nothing about a runtime error, so there is no way to run any echo as you want. Though If I recall the Text Area field had a syntax validation, but I cannot find if that's true or somethi

Re: Extracting of jenkins error

2021-01-19 Thread Victor Martinez
There are different approaches but need more information, can you elaborate? On Tuesday, 19 January 2021 at 10:14:08 UTC jamespr...@gmail.com wrote: > How to find specific errors from jenkins console output and print them by > echo statement > -- You received this message because you are su

Re: Authorization on Multibranch Pipeline

2020-12-02 Thread Victor Martinez
I'm not sure if for the same Multibranch Pipeline there are certain authorisations for branches, but creating two Multibranch Pipelines for those branches and add the authorization at the project level might fulfill your needs: On Wednesday, 2 December 2020 at 03:54:08 UTC Rishi Gautam wrote:

Re: How to change defaultValue of input in case of declarative pipeline script?

2020-11-26 Thread Victor Martinez
You can try with environment variables or the Field annotation as shown below import groovy.transform.Field @Field def value1 = 'initial value' On Wednesday, 25 November 2020 at 19:00:24 UTC Kiyoshi Ohgishi wrote: > I want to change from scripted pipeline script to declarative pipeline > scri

Re: Gerrit Trigger plugin - next release?

2020-11-18 Thread Victor Martinez
I don't know when it might happen, but if you need the latest version from the master branch, and you don't wanna create the package from scratch, then you could fetch the plugin from https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fgerrit-trigger-plugin/detail/master/117/artifacts

Re: How to conditionally execute a step based on changeset (multiple paths)?

2020-11-12 Thread Victor Martinez
Hi, The comma is not supported since it does a GLOB match by default. You can use multiple changeset entries in the when or the regexp approach should be another way Cheers On Thursday, 12 November 2020 at 09:39:51 UTC geoffroy...@gmail.com wrote: > Hello > > our repository structure is as fo

Re: how to add a configuration parameter with spaces on Jenkins

2020-11-06 Thread Victor Martinez
Did you try with escaped double quotes? Something like: - bat "\"${msbuild}\" AoC/Source/project-GRDK.sln /t:Rebuild /p:configuration=\"Release Steam D3D11\" " You can also use the multilne approach to avoid the escape of double quotes: - bat """ "${msbuild}" AoC/Source/project-GR

Re: can I run a stage at a certain time within a pipeline

2020-10-30 Thread Victor Martinez
triggeredBy within the stage context should help you: https://www.jenkins.io/doc/book/pipeline/syntax/#when pipeline { ... triggers { cron 'H H22 * * 1-5' } stages { ... stage('deploy') { when { triggeredBy 'TimerTrigger' } ... }

Re: How to run a visual studio CMD command in a pipeline?

2020-10-30 Thread Victor Martinez
If you run the same command in your terminal, does it work? Does it need any kind of UI access? On Monday, 26 October 2020 at 11:55:23 UTC jesusfern...@gmail.com wrote: > I need to run a elevated x64 Native Tools Command Prompt fro VS 2019 > command ("vcperf /start session") within my pipeline.

Re: why my pipeline creates different workspaces?

2020-10-30 Thread Victor Martinez
Directories with an ampersand (like @tmp, @script, @libs, @2) are specifically created by the pipeline internals, each one got a different context. The ones with number are most likely related to a concurrent build running while other previous build is still running, to avoid clashing with acce

Re: Frequent "Disconnected computer for node" messages in jenkins logs

2020-02-14 Thread Victor Martinez
I've seen those stack traces with some other Cloud Node providers in Jenkins. Not sure if that's an implementation within the Jenkins core or the docker-plugin itself or some specific design. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

Re: Build block time

2020-01-14 Thread Victor Martinez
Can you clarify what you mean to build block time? Not sure whether that's related to a critical region that you'd like to handle sequentially rather than concurrently, if so, https://plugins.jenkins.io/lockable-resources might be a good candidate, if that's not what you meant, then sorry abou

Re: JobDSL: an example of configuring a bitbucket source trait of bitbucketForkDiscovery in the multibranchPipelineJob is wanted

2020-01-13 Thread Victor Martinez
You can use the dynamic DSL that it's specific for your installation, more precisely /plugin/job-dsl/api-viewer/index.html#method/jenkins.scm.api.SCMSource$$List.bitbucket Further det

Re: Jenkins job dsl- any way to dry run before affecting changes?

2019-12-30 Thread Victor Martinez
I've just seen your comment in the open PR regarding https://issues.jenkins-ci.org/browse/JENKINS-27182 > What I want is for my seed job to first output what it's going to change and wait for user input, then if the user confirms make the changes IIUC, you would like to mimic a kind of code revi

Re: durable-dbed1d4d/script.sh: Syntax error: "(" unexpected

2019-11-26 Thread Victor Martinez
Double quotes might be a bit tricky with the interpolation and gstring. I'd suggest move the script content to a file in your repo and just call the script using: sh label:"<-- Zipping files -->", script: "your_script.sh" I'd suggest to chmod 755 your_script.sh and add some shebang too. The ma

Re: Git Commit Message as an Environment Variable

2019-11-22 Thread Victor Martinez
If GitHub is the provider there is an inprogress PR to support it: - https://github.com/jenkinsci/pipeline-github-plugin/pull/65 Although I have not gone further to add some UTs yet though. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To un

Is possible to detect scriptsecurity.sandbox.RejectedAccessException without running the pipeline?

2019-07-11 Thread Victor Martinez
Hi there, Not sure if this has been already discussed in the past, but I wonder if it is possible to proactively detect whether a specific pipeline got a blacklisted method without need to run the whole pipeline? So I guess there are benefits of knowing whether the pipeline does fulfil the req

Re: How to use the saveOutput option of emailext plugin in a pipeline

2019-03-28 Thread Victor Martinez
I just raised https://issues.jenkins-ci.org/browse/JENKINS-56794 -- 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. T

Re: How to use the saveOutput option of emailext plugin in a pipeline

2019-03-28 Thread Victor Martinez
You are right! I took the wrong path to search for the code but without reading the specific code for the pipeline itself. So it's not supported I'm afraid! Sorry If I mislead you -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe

Re: How to use the saveOutput option of emailext plugin in a pipeline

2019-03-27 Thread Victor Martinez
It should be stored in the root path of the workspace, according to the docs: https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/webapp/help/projectConfig/saveOutput.html#L3 The name of the file would be -.html, further details about the implementation: - https://github.com/jen

Re: Windows personal certificate and Jira plugin

2019-03-26 Thread Victor Martinez
I'd suggest to add a logger to gather as much details as possible using the UI: - https://wiki.jenkins.io/display/JENKINS/Logging IIRC, long time ago I had some issues with the Jira plugin something related with the restapi and login, but the only way I was able to debug what caused the issue w

Re: SnakeYaml, or why is writeYaml Limited?

2019-03-25 Thread Victor Martinez
Something like the below snippet should work: import org.jenkinsci.plugins.pipeline.utility.steps.shaded.org.yaml.snakeyaml.Yaml @NonCPS def readYaml(data) { return (new Yaml()).dump(data) } println readYaml([name: "foo", surname: "bar", age: 1]) writeYaml implementation uses that particular

Re: Jenkins Performance loading slow

2019-03-18 Thread Victor Martinez
There are a couple of interesting articles/presentations to configure the JVM accordingly, see the below reply: - https://groups.google.com/d/msg/jenkinsci-users/T7F9FHzSYtY/xq5k9JdjBAAJ Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

Re: Is there a trim method in the string parameter ?

2019-03-07 Thread Victor Martinez
It seems it's solved: - https://issues.jenkins-ci.org/browse/JENKINS-47115 What version of declarative do you use? -- 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 e

Re: Coverity integration with jenkins

2019-03-05 Thread Victor Martinez
https://community.synopsys.com/s/article/Integrations-Documentation-Synopsys-Coverity-Jenkins . might help you also the example provided in: https://community.synopsys.com/s/question/0D5343TcQQNCA3/how-to-use-coverity-with-jenkins2-and-jenkinsfiles cheers -- You received this message be

Re: How to monitor jenkins queue

2019-02-12 Thread Victor Martinez
I used https://plugins.jenkins.io/metrics in the past plus some groovy scripts to export those metrics. I also used https://plugins.jenkins.io/build-failure-analyzer and an atlasboard on the top to visualise build times and so on. my two cents -- You received this message because you are subs

Re: Jenkins Plugin upgrade from 1.454 to 1.651.3

2019-02-06 Thread Victor Martinez
IIUC, you would like to use a WAR file different than the default one, if so, then you might need to use the properties section to enforce the version you'd like to: - https://github.com/jenkinsci/plugin-pom/tree/plugin-2.0 ... org.jenkins-ci.plugins plugin-pom 2.0 1.651.

Re: Get Ansible "PLAY RECAP" Failed value from Jenkins pipeline

2019-02-06 Thread Victor Martinez
I use also ansible and I took the approach to convert the ansible playbook output to JUnit format and that helps me to see the number of executed tasks and their status (success, failed, skipped). In case you are interested about it: - https://docs.ansible.com/ansible/latest/plugins/callback/ju

Re: error

2019-02-06 Thread Victor Martinez
I'm afraid I've no clue what's this is about and no context neither. You might need to provide more details if you want some help. Besides, unreachable means too many things, but worth also explain what you have tried in your end plus how you get there Cheers -- You received this message beca

Windows Installers

2019-02-05 Thread Victor Martinez
I love it!! Thanks for putting such an effort, may i ask you where I can see the msi installer changes and the chocolatey packaging process? Thanks -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiv

Re: How to configure $JENKINS_HOME/caches dir location?

2019-02-05 Thread Victor Martinez
https://issues.jenkins-ci.org/browse/JENKINS-18578 provides some details about fixing the 'cache' folder, is that what you need? -- 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,

Re: Get Ansible "PLAY RECAP" Failed value from Jenkins pipeline

2019-02-05 Thread Victor Martinez
Hi, Not sure IIUC, you want to parse the console output to search for 'Failed='? How do you run the ansible script in the jenkins pipeline? Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop recei

Re: Install specific version of plugins with Groovy script

2018-12-19 Thread Victor Martinez
Hi Phillip, I'm afraid I do not have an answer about it as I was in fact looking for an answer at that moment. Maybe I didn't ask correctly... I don't recall what I did instead. JCasC might solve this or sort of, although it's a beta feature: - https://github.com/jenkinsci/configuration-as-cod

Re: Increase Java heap size of Windows Slave

2018-11-27 Thread Victor Martinez
It does depend on how that particular windows agent is launched. The below references can help you: - https://issues.jenkins-ci.org/browse/JENKINS-3554 - https://support.cloudbees.com/hc/en-us/articles/204264000-Why-do-I-receive-java-lang-OutOfMemoryError-PermGen-space might also help -- You

Re: Jenkins Ignore Committer Strategy Plugin and job DSL

2018-11-21 Thread Victor Martinez
You might need to refer to the trais sections in the branchSource - /plugin/job-dsl/api-viewer/index.html#path/multibranchPipelineJob-branchSources-branchSource-source-git-traits-headWildcardFilter multibranchPipelineJob(buildName) { ... branchSources { branchSource { sour

Re: Get list of users who has access to a project role

2018-11-19 Thread Victor Martinez
I have not executed that particular groovy script at all, but based on the description and name I guess that's something you could use. *How to use the groovy script?* - https://wiki.jenkins.io/display/JENKINS/Scriptler+Plugin That's one way to gather those details. Besides that, I just wen

Re: Get list of users who has access to a project role

2018-11-19 Thread Victor Martinez
Might https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/export-role-strategy-permissions-to-csv.groovy provide those details? Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop re

Re: how to find how a Jenkins instance is installed?

2018-11-14 Thread Victor Martinez
There are a bunch of different options to install Jenkins based on the OS: - https://jenkins.io/doc/book/installing/ And on the top those options, there are some configuration management tool which can help to provisioning Jenkins on any machine, such as puppet/ansible/chef... Off the top of my

Re: calling another job from parent job

2018-11-13 Thread Victor Martinez
As far as I'm aware off, the run of each 'job/pipeline' is independent therefore all the stages, in any downstream* job, won't be shown in the upstream job unfortunately. The only way I'm aware of, is using a shared library/pipeline to call the same steps that the downstream job runs. *** aka a

Re: Maven global configuration via Groovy init script

2018-11-09 Thread Victor Martinez
I'd rather suggest to look at: - https://github.com/jenkinsci/configuration-as-code-plugin I'm not sure where the "Maven Project Configuration" section is but something like the below snippet might help to configure the maven tools globally: tool: maven: # (4) installations: - name:

Re: How do we send number of pass/fail test result using Test Results Analyzer plugin

2018-10-31 Thread Victor Martinez
Something like https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin#Email-extplugin-PipelineExamples might help, some examples: - http://ikeptwalking.com/using-email-ext-plugin-in-jenkins-pipeline/ Cheers -- You received this message because you are subscribed to the Google Groups "Jenki

Re: jacoco report not found

2018-10-30 Thread Victor Martinez
No enough details to understand whether the issue is within the maven project (maybe missing the jacaco configuration), sonar or a misconfiguration within the Jenkins instance somehow, or even some environmental issue. My first approach would be to run the mvn locally and ensure the jacoco rep

Re: Jenkins Administration - Role-based Authorization Strategy - Manage & Assign Roles list really big

2018-10-30 Thread Victor Martinez
Already addressed in another thread: - https://groups.google.com/d/msg/jenkinsci-users/uznqn8Y3NRw/ghn1gFROCgAJ -- 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

Re: Ansible for administering Jenkins

2018-10-30 Thread Victor Martinez
JCasC might be a good way of automating it - https://wiki.jenkins.io/display/JENKINS/Configuration+as+Code+Plugin There are some examples about configuring the Roles: - https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/integrations/src/test/resources/io/jenkins/plugins/casc/Ro

Re: Trigger on Jenkins Job Configuration Change

2018-05-24 Thread Victor Martinez
https://plugins.jenkins.io/scm-sync-configuration might be the one you are looking for -- 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

Re: Cancel or abort a freestyle job and mark job as success

2018-05-24 Thread Victor Martinez
I used https://wiki.jenkins.io/display/JENKINS/Groovy+Postbuild+Plugin in the past to manipulate the build status. It might help you Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving ema

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: 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: 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: 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 Sonar Plugin groovy script

2018-05-18 Thread Victor Martinez
Well.. the stacktrace message is quite clear: groovy.lang.MissingPropertyException: No such property: desc for class: RemoteClass Worth to look for where 'desc' is declared/instanced as it's not part of the snippet you pasted it. Likely you could find some answers in this code: - https://gith

Re: Jenkins-docker

2018-05-17 Thread Victor Martinez
Can you elaborate it a bit further what you mean? Meanwhile you could look at: - https://jenkins.io/doc/pipeline/tour/getting-started/ Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving em

Re: Manual reconstruction of job runtime?

2018-05-15 Thread Victor Martinez
I don't think there is any specific plugin to allow you to know how the current build environment looks like when using the configuration tools, unless you run some shell steps underneath to trap that environment setup. IMO, docker seems to fit quite well your requirements Cheers -- You recei

Re: Project with several Git repositories

2018-05-11 Thread Victor Martinez
Maybe it sounds a bit crazy, but what about using git submodules. The jenkinsfile logic is outside the target repo's source as your initial requirement, although my experience with git submodules is not really something I'd say I enjoyed it... but it might be something to explore if it helps.

Re:

2018-05-10 Thread Victor Martinez
I'm not sure if you can upgrade those plugins but you could give a go and run a local jenkins instance with the latest version of those plugins and see whether the same behaviour keeps going. Other than that, I don't have any other suggestions. Cheers -- You received this message because you

Re: How to check "Use Groovy Sandbox" programmatically from groovy : EnvironmentVariableContext

2018-05-10 Thread Victor Martinez
Does it help the below answer? - https://groups.google.com/forum/#!searchin/job-dsl-plugin/Use$20Groovy$20Sandbox%7Csort:date/job-dsl-plugin/UiD7ujvEQ-s/HvgRrAiJAwAJ -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this gro

Re:

2018-05-09 Thread Victor Martinez
As far as I see it's there What version of pipelines are you using? -- You received this message because you are subscribed to

Re: how get copy of environment variable - groovy job-dsl

2018-05-08 Thread Victor Martinez
Just in case, this thread is already followed up in the job-dsl-plugin mailinglist: - https://groups.google.com/d/msg/job-dsl-plugin/451Jp9EtErI/H0JIGQswAwAJ -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and st

Re: Please explain Jenkins.instance.*

2018-05-08 Thread Victor Martinez
You can access the javadoc reference about he jenkins core and some plugins: - https://jenkins.io/doc/developer/javadoc/ -- 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 a

Re: Jenkins groovy init script for sonarqube configuration

2018-05-04 Thread Victor Martinez
what version of the sonar plugin is installed? It looks like the current constructor is not just 5 parameters based but a lot of more: - https://github.com/SonarSource/sonar-scanner-jenkins/blob/master/src/main/java/hudson/plugins/sonar/SonarInstallation.java#L59 Cheers -- You received this

Re: E/launcher - unknown error: cannot find Chrome binary

2018-05-04 Thread Victor Martinez
It looks like you are using an agent based on the dockerhub maven 3.3.3 docker image, if so, are you sure that particular binary exists? you can also run which google-chrome to identify where that particular binary is allocated. Cheers -- You received this message because you are subscribed t

Re: E/launcher - unknown error: cannot find Chrome binary

2018-05-04 Thread Victor Martinez
Can you confirm whether the PATH and environment is correctly configured when running the pipeline in the agent? If you run at the very beginning something like the below snippet: ... sh 'echo $PATH' ... If /usr/bin is not part of the path, then you need to figure out how to configure it in th

Re: Exception when changing to directory, Finished: UNSTABLE

2018-05-04 Thread Victor Martinez
I'm not sure whether it will be related to but it seems the remote directory is required in the global settings: Besides of that,

Re: Exception when changing to directory, Finished: UNSTABLE

2018-05-04 Thread Victor Martinez
is wp-content/plugins/mailchimp-for-wp/integrations a relative path to where? Can you confirm if it works by using the absolute path instead? Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop recei

Re: how do I list all the pull request for the repo?

2018-05-04 Thread Victor Martinez
Yes, you can use groovy script, look at: https://jenkins.io/doc/book/pipeline/shared-libraries/#using-third-party-libraries Cheers -- 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

Re: how do I list all the pull request for the repo?

2018-05-03 Thread Victor Martinez
There are different approaches: - Official GH api: https://developer.github.com/v3/pulls/#list-pull-requests - Java Library: http://github-api.kohsuke.org/apidocs/org/kohsuke/github/GHPullRequestQueryBuilder.html and http://github-api.kohsuke.org/apidocs/org/kohsuke/github/GHRepository.html#g

Re: Bitbucket Branch Source Plugin: I/O error when accessing URL

2018-05-02 Thread Victor Martinez
Although my answer is quite generic it might be helpful: You might be able to debug those issues if you add some loggers in the jenkins instance: - see https://wiki.jenkins.io/display/JENKINS/Logging and https://wiki.jenkins.io/display/JENKINS/Logger+Configuration and you can add this logger: -

Re: In Jenkins how to pass a parameter from Pipeline job to a freestyle job

2018-05-02 Thread Victor Martinez
Wrong parameter name: Environment is not the name of the parameter but 'OS' therefore if you replace 'params.Environment' with 'params.OS' it should work -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and sto

Re: Pipeline: Getting status of all parallel downstream jobs, mark build as unstable

2018-05-02 Thread Victor Martinez
Hi, Build step returns a RunWrapper object therefore you could save their status in another hash/array and then query whether any of those downstream builds are unstable if so then set the currentBuild as UNSTABLE, for instance based on your snippet: import hudson.model.Result stage('Testin

Re: Trouble getting user id variable on builds

2018-05-02 Thread Victor Martinez
Can you confirm whether https://wiki.jenkins.io/display/JENKINS/Build+User+Vars+Plugin has been installed? ___ONLY_FOR_TRACKING_PURPOSES I just tried: as suggested in one of the URLs you posted, and it works like a charm: pipeline { agent any stages { stage('build user') {

Re: how to configure new tag trigger jenkins job building

2018-05-01 Thread Victor Martinez
https://docs.gitlab.com/ee/integration/jenkins.html and https://docs.bitnami.com/1and1/how-to/create-ci-pipeline/ might help you out Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emai

Re: How to execute sql queries through jenkins?

2018-05-01 Thread Victor Martinez
Likely you can start with: https://jenkins.io/doc/pipeline/tour/getting-started/ Then you can code your script to run the sql queries by command line and use the shell step if you use freestylejobs or sh step if you use pipelines. Although, you might require to ensure the configuration and sof

Re: How to disable a Jenkins Multibranch Pipeline job?

2018-05-01 Thread Victor Martinez
https://stackoverflow.com/questions/47840096/how-to-disable-a-jenkins-multibranch-pipeline-project might help you Cheers -- 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 a

Re: setNextBuildNumber from upstream job

2018-04-23 Thread Victor Martinez
IIUC, there are two different points here: *1) Variable interpolation.* It looks like *$COPY_FROM_BUILD* is not interpolated unless it's double quoted: nextBuildNumber("$COPY_FROM_BUILD") *NOTE*: that particular variable might be declared somehow, see below *2) Upstream parameter.* Off

Re: jenkins pipeline with groovy and use of “Withcredentials”

2018-04-10 Thread Victor Martinez
IIUC, you are missing the body of the withCredentials step, so something like the below should work ... stage ('Upload war to Artifactory') { withCredentials([usernamePassword(credentialsId: 'artifactory', usernameVariable: 'user', passwordVariable: 'password')]) { sh "sudo curl -u

Re: Upgrade Path for Jenkins/Hudson

2018-04-09 Thread Victor Martinez
Hey Thomas, most likely the hudson folder should be backed up: - https://wiki.eclipse.org/Using_Hudson/Administering_Hudson which matches with the Jenkins one too: https://wiki.jenkins.io/display/JENKINS/Administering+Jenkins As a suggestion: I'd rather consider to upgrade on batches firstly, mo

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
I'm afraid I do not have any other examples using the global timeout option. I hope someone else might come up with something else. Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emai

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
This is indeed what I did: - https://groups.google.com/d/msg/jenkinsci-users/upVzT3SOZy8/N5iguMZsAgAJ But using scripted pipelines, it looks like you cannot use try/catch within the declarative pipeline but post steps (https://jenkins.io/doc/book/pipeline/syntax/#post) but the timeout triggers

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
I did play with that sometime ago but I don't have access to those pipelines anymore... The below article might help you out: - https://support.cloudbees.com/hc/en-us/articles/226554067-Pipeline-How-to-add-an-input-step-with-timeout-that-continues-if-timeout-is-reached-using-a-default-value Alth

Re: Email-ext plugin and Pre-send Script variables

2018-03-15 Thread Victor Martinez
Have you tried with double quote multistring and also the $ variable? node { FROM = 'AAA ' emailext( to: "m...@email.com", presendScript: """msg.setHeader("From", ${FROM});""", subject: "test", mimeType: 'text/html', body: "content" ) } -- You

Re: How to Allocate more memory to jenkins application

2018-03-07 Thread Victor Martinez
There are a couple of interesting posts which might help you out: - https://jenkins.io/blog/2016/11/21/gc-tuning/ - https://www.cloudbees.com/so-you-want-build-worlds-biggest-jenkins-cluster . (see the slide 'Sizing the JVM heap…') Cheers -- You received this message because you are subscribe

Re: Bash variables defined during a step

2018-03-06 Thread Victor Martinez
In your case you just need to escape \$VERSION to avoid the GString to be interpolated. sh "find packages -name internal-* -type d -exec bash -c 'for arg; do export VERSION=\$(grep \${arg##*/} nexus-cicd-versions.txt | cut -d: -f2);sed -i \'s/#VERSION#/\${VERSION}/g\' \$arg/0/package.json; don

Re: Bash variables defined during a step

2018-03-06 Thread Victor Martinez
GString might be a bit crazy to escape some chars, maybe it's worthy to create a sh file somewhere and just call it? Then you get the benefits of being able to call/use it without the need to be in the pipeline itself. My two cents -- You received this message because you are subscribed to th

Re: Syntax for multiple artefact patterns in a declarative script?

2018-03-05 Thread Victor Martinez
You need to use comma separated based, further details in the /pipeline-syntax/ and https://jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts Something like the above snippet should work archiveArtifacts artifacts:'myProj/myExe, ../solibs/myLib' Cheers

Re: JNLP agent startup not working after upgrade from 2.4x to 2.89.4

2018-03-05 Thread Victor Martinez
https://jenkins.io/doc/upgrade-guide/ might help you out regarding what changes were published between 2.4X and 2.89.4 -- 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

Re: Build step and multibranch job

2018-03-01 Thread Victor Martinez
or even: https://stackoverflow.com/questions/37322143/how-to-trigger-multibranch-pipeline-jenkins-job-within-regular-pipeline-job -- 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

Re: Build step and multibranch job

2018-03-01 Thread Victor Martinez
Does the below answer works for your use case? - https://stackoverflow.com/questions/45010601/triggering-a-multibranch-pipeline-job-from-an-other-multibranch-pipeline -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this gro

Re: Creating the product from Jenkins

2018-02-28 Thread Victor Martinez
As far as I see and understand this particular question is about how to build a specific product which it's not about jenkins itself but something more specific of, likely, your work. Therefore, I cannot provide any insights but just some ideas: - Can you reproduce those errors locally? - Can yo

Re: Naginator Plugin

2018-02-26 Thread Victor Martinez
There is already an open ticket: - https://issues.jenkins-ci.org/browse/JENKINS-37076 Cheers -- 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+un

Re: SVN password error in Jenkins

2018-02-16 Thread Victor Martinez
It seems more an issue within the command itself, did you try to use the non interactive flag? - http://svnbook.red-bean.com/en/1.7/svn.ref.svn.html#svn.ref.svn.sw.non_interactive Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To uns

Re: Creating the product from Jenkins

2018-02-16 Thread Victor Martinez
No idea what you meant, you might need to explain a bit more what you did and what a product means and so on , otherwise I'm not sure whether others might be able to help you with Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To uns

Re: Question about JDK and Maven through Jenkins

2018-02-16 Thread Victor Martinez
if you run mvn -V -v . then you will see what's the java version and some other mvn environmental details which are used within maven, most likely it's not using the JDK but the JRE for some reason, please review how that particular JDK setup was made. Cheers -- You received this message bec

Re: How can I write pipeline script to trigger a job and parameters from property files

2018-02-15 Thread Victor Martinez
https://stackoverflow.com/questions/37295773/how-to-use-a-fileparametervalue-in-a-jenkins-2-pipeline might help you out -- 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

Re: Using shell script

2018-02-12 Thread Victor Martinez
Hi Francisco, Did you use the annotation @NonCPS in your function? Cheers -- 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...@googleg

Re: JobDSL: Problem defining copyArtifacts action inside promotion with configure block

2018-02-12 Thread Victor Martinez
Besides of that, the `specific` block is not part of the DSL definition of `copyArtifacts` as far as I see, but you could use any of the below DSLs: - /plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.helpers.step.StepContext.copyArtifacts-buildSelector-specificBuildSelector - h

Re: JobDSL: Problem defining copyArtifacts action inside promotion with configure block

2018-02-12 Thread Victor Martinez
Hi there, I don't see any configure block in the copyartifacts dsl definition (https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.step.StepContext.copyArtifacts) . You might need to use the global configure block to be able to use it accordingly. But you can s

Re: Multibranch Project Parameterized Drop-down?

2018-02-09 Thread Victor Martinez
Although I'm not aware of any dsl for that parameters, but the below URL might help you to convert UI configuration to pipelines easily: https://jenkins.io/doc/book/pipeline/getting-started/#snippet-generator Cheers -- You received this message because you are subscribed to the Google Group

Re: How to keep a running docker container after a build fails?

2018-02-08 Thread Victor Martinez
As you mentioned the lifecycle of the docker container with the step 'withDockerContainer' is well defined and doesn't allow to keep it alive. So i was assuming the docker.inside might help you to keep the container alive, but I was wrong: the docker.inside step removes the container while the

  1   2   3   4   5   6   >