Re: Why does my pipeline have 2 workspaces?

2019-09-01 Thread Ramanathan Muthaiah
On Wednesday, August 28, 2019 at 4:18:13 PM UTC+5:30, Toby Hersey wrote:
>
> Thanks Ram , is that the same for the @2 folders as well?
>
> Or is that because a build has run 2 in parallel?
>

Could be a possibility.

/Ram 

-- 
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/2ac28b0e-832e-4af5-a908-f24bb0dacbfe%40googlegroups.com.


Re: how to ignore jenkisnfile from polling for pipeline jobs

2019-09-01 Thread Ramanathan Muthaiah
On Saturday, August 31, 2019 at 12:24:00 AM UTC+5:30, SADHAN wrote:
>
> the problem i am seeing is if i add polling for the source code repo using 
> checkout function of jenkinsfile, the job is getting triggered for the 
> source code changes and also for the jenkisnfiles changes though both are 
> in different Repos.
> How do we avoid the polling for jenkisnfiles.
>
> I tried to add "ignore from user" but it dint work, i tried to add "ignore 
> from paths" it also dint work.
>

Sharing a tidbit of what I did earlier to avoid triggering fresh builds 
jobs for changes in Jenkinsfile -- you may need additional logic to process 
the changeset, i.e. checkout the repo, gather the list of changed files ( 
this will help to determine if the changeset includes only Jenkinsfile), 
and then take the necessary action.

/Ram

-- 
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/47c364c8-4ef5-430f-8945-46a35efa3f90%40googlegroups.com.


Re: BuildStrategies doesn't pick ignoreCommitterStrategy from multibranch generator job (i.e, job-dsl way)

2019-09-01 Thread SathyaNarayanan Kumaraswamy
Hi Team,
>
> I'm trying to implement BuildStrategies --> ignoreCommitterStrategy
> approach via multibranch generator job (i.e, job-dsl way), since there are
> many existing multibranch-pipeline jobs
>
> After running seed job (i.e., multibranch generator job) I could see
> BuildStrategies getting reflected in existing multibranch pipeline jobs but
> still ignoreCommitterStrategy -> ignoredAuthors is not getting added.
>
> It means at this moment have to get into multibranch pipeline jobs ->
> config -> BuildStrategies  manually click Add button
> ->ignoreCommitterStrategy --> ignoredAuthors list which is bit painful as
> we have many multibranch pipeline jobs.
>
> Any help on this is really appreciated.
>
> *Code snippet used inside dsl script:*
> buildStrategies {
> ignoreCommitterStrategy {
>   ignoredAuthors("sat...@xyz.com")
>   allowBuildIfNotExcludedAuthor(false)
>   }
> }
>
> Note: Had even tried with
> "au.com.versent.jenkins.plugins.ignoreCommitterStrategy"
>
> Thanks,
> Sathya Narayanan.K
>

-- 
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/CAH9epA1Ghc1ezgCqDTwuBwoGc9rq3nJiibhAmpgmMrrw%3DdzQDg%40mail.gmail.com.


Re: Installing All Jenkins Plugins from hpi files.

2019-09-01 Thread Norman Khine
Maybe this is what you are looking for assuming you are using AWS
https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml#L1128

On Sun, 1 Sep 2019 at 11:53, Miguel Campos  wrote:

> Hello,
> I have a need of being able to "replicate Jenkins masters" I mean ensure
> that every new Jenkins master I install is exactly the same as the version
> I defined some time ago.
> by exactly the same I mean configuration and versions.
> However I need to have then configured different credentials, and having
> different "secret.key"  so that it if a Jenkins instance is compromised the
> other instances are safe.
>
> To get base version of Jenkins is easy is a matter of getting the right
> jenkins.war.
> the problem shows when dealing with plugins.
> Maintaining a txt with names and versions manually I think is going to be
> to muh work and too complecated to maintain it is a verry long list.
> So my Intention is "clone" my Base instance plugins, so I can use the gui
> tools to perform the upgrades and testing and once I'm ok with that I can
> "clone" the plugins and make a tgz that I can use later to install a fresh
> instance.
>
> I do not know if it's save to Just copy the plugins folder from a running
> instance. (there are also some config fines I do not know if I need those)
>
> So What I tried to do instead is to download all the hpi files for the
> list of files and versions. and make the zip with those.
>
> My problem:
> When starting a fresh install of jenkins using only the jenkins.war and
> the plugins directory containing only all the hpi files for the plugins
> something is wrong with the dependencies.
> I mean for example with the role base auth.  it has a dependency of the
> matrix-auth plugin.
> I have both hpi with the right versions.  but some how when Jenkins boot
> instead of installing all the hpi disregarding dependencies  for the
> plugins.
> instead some how I.ve got installed version 1.1 for the matrix-auth when
> my hpi is the right one.
>
> I would like to understand why is this happening. why if my hpi file is
> for version 2.4 I've got 1.1  installed.
> and if there is a way to control this.
>
> Should I control dependencies and install hpi in order? I guess that will
> be much complicated. (I've seen some scripts doing something like that for
> dockers)
>
> What is the right way of getting a new clear instance of Jenkins master
> that is exactly the same as other? (but clear without credentials projects
> etc etc.
> 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/c64d6ac6-5d88-4309-af5b-a0bd96df5840%40googlegroups.com
> 
> .
>
-- 
%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for
c in ",adym,*)^zqf" ] )

-- 
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/CAKgQ7UJHGyfZ8Fekh34Nb%2BW0s3Svnyav2nYVGEvKurVWZ4AvKQ%40mail.gmail.com.


How to Integrate MySQL Database with Jenkins

2019-09-01 Thread Mohtashim S


I'm on the Jenkins ver. 2.176.1.

I wish to connect to mysql database by passing host, port, and credentials 
in Jenkins pipeline for SELECT / INSERT queries to an existing database 
table.


As, I have understood there is no good plugin that works for MySQL 
connectivity (tried a couple which do not mask the password); I decided to 
set the MySQL hostname and Port as environment variables and username and 
password as credentials in Jenkins.


I have three plugins installed for this purpose viz. Credentials plugin, 
Credentials Binding plugin,Plain Credentials plugin.


[image: Jenkins Credential Plugins]

I then setup mysql credentials by clicking: 
Jenkins->Credentials->System->Global credentials (unrestricted)


[image: Mysql credentials]

Now; in-order to generate code for pipeline for accessing these credentials 
i go to-> http:///pipeline-syntax/ see below snapshot: 


[image: Syntax Generator]

Below are three queries I have:


1. The credentials drop-down (marked with *RED ARROW* in the snapshot 
above) in the pipeline syntax generator does not populate anything & seems 
disabled. I was expecting the mysql credentials ID to show up in the 
drop-down as expected. Can you suggest what could be the issue here ? Also, 
I have administrator role.

   1. 
   
   2. I need the syntax to pass the MySQL username and password as 
   variables to a different Jenkins job from my pipeline script below. Please 
   suggest how can I ? 
   
steps { build job: 'myjob1', parameters: [string(name: 'Region', value: 
"${params.Region}"),,)] }

3. Is there Alternate / better solution than the one I chose for Masking 
Database credentials ?

-- 
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/8afa06c2-aafe-43b8-9316-d6aea25ff2b0%40googlegroups.com.


Installing All Jenkins Plugins from hpi files.

2019-09-01 Thread Miguel Campos
Hello,
I have a need of being able to "replicate Jenkins masters" I mean ensure 
that every new Jenkins master I install is exactly the same as the version 
I defined some time ago.
by exactly the same I mean configuration and versions.
However I need to have then configured different credentials, and having 
different "secret.key"  so that it if a Jenkins instance is compromised the 
other instances are safe.

To get base version of Jenkins is easy is a matter of getting the right 
jenkins.war.
the problem shows when dealing with plugins.
Maintaining a txt with names and versions manually I think is going to be 
to muh work and too complecated to maintain it is a verry long list.
So my Intention is "clone" my Base instance plugins, so I can use the gui 
tools to perform the upgrades and testing and once I'm ok with that I can 
"clone" the plugins and make a tgz that I can use later to install a fresh 
instance.

I do not know if it's save to Just copy the plugins folder from a running 
instance. (there are also some config fines I do not know if I need those)

So What I tried to do instead is to download all the hpi files for the list 
of files and versions. and make the zip with those.

My problem:
When starting a fresh install of jenkins using only the jenkins.war and the 
plugins directory containing only all the hpi files for the plugins 
something is wrong with the dependencies.
I mean for example with the role base auth.  it has a dependency of the 
matrix-auth plugin.
I have both hpi with the right versions.  but some how when Jenkins boot 
instead of installing all the hpi disregarding dependencies  for the 
plugins.
instead some how I.ve got installed version 1.1 for the matrix-auth when my 
hpi is the right one.

I would like to understand why is this happening. why if my hpi file is for 
version 2.4 I've got 1.1  installed.
and if there is a way to control this.

Should I control dependencies and install hpi in order? I guess that will 
be much complicated. (I've seen some scripts doing something like that for 
dockers)

What is the right way of getting a new clear instance of Jenkins master 
that is exactly the same as other? (but clear without credentials projects 
etc etc.
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/c64d6ac6-5d88-4309-af5b-a0bd96df5840%40googlegroups.com.