Re: Role based strategy - pattern for jobs for example two maps deep

2020-05-19 Thread Nico van de Kamp
Luckily I found somebody with the same issue although he had it working. 
What he wrote is if I go two maps deep I have to create three roles. And my 
expection was that I need to create one role!

So If I want to give access to the jobs in folder  than what I was 
expecting was that I have to create one role like "^mapy//.*". That is 
not working. You have to create a role with "^mapy/" another role with 
"^mapy//" and "^mapy//.*". This are roles to give someone explicit 
access to some jobs in x map deep. The rule is than: "you have create x 
roles map deep + 1"

This is not how I first should think but it is (code wise) done to create 
more flexibility.

Correct me if I'm wrong, but this working for me.

Nico

On Friday, May 8, 2020 at 2:09:16 PM UTC+2, Nico van de Kamp wrote:
>
> Hello,
>
> We use the plugin "Role strategy plugin / project matrix authorisation"
>
> Let say I have in a map jobs like this:
>
> mapx/
>  - job 1
>  - job 2
>
> etc. Than the pattern is for example ^mapx.*, with Build, Cancel, Discover 
> and Read. This working fine.
>
>
> Now I have this
> mapy
>  - 
>- job 1
>- job 2
>  - 
>- job 1
>- job 2
>- job n 
>  - 
>- job 1
>- job 2
>- job n
> 
> Now I want to give a user/group only give access to the jobs in map . 
> What should be the pattern than  I have tried the following (and more)
> ^mapy/.*
> ^mapy/*
> ^mapy/(.*)
> ^mapy\/.*
> ^(?i)mapy/.*
>
> etc. but if I log in for this user mapx in shown up but not the mapy so 
> that the user can have access to 
>
> I hope that someone can help me out with this.
>
>
> Thanks in advance,
>
> Best regards,
>
> Nico
>

-- 
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/aa4d8d87-0703-470a-8073-64710c4dfeb4%40googlegroups.com.


Re: Role based strategy - pattern for jobs for example two maps deep

2020-05-14 Thread Nico van de Kamp
Hello,

Nobody has this issue that I can give a role access to a specific map and 
what the pattern than should be? I must say, we are going in the near 
future to a new version of Jenkins, but on this moment I'm talking about 
Jenkins version 2.9!

Nico.

-- 
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/4b0b8f12-a4bf-4513-81e1-149f31748125%40googlegroups.com.


Role based strategy - pattern for jobs for example two maps deep

2020-05-08 Thread Nico van de Kamp
Hello,

We use the plugin "Role strategy plugin / project matrix authorisation"

Let say I have in a map jobs like this:

mapx/
 - job 1
 - job 2

etc. Than the pattern is for example ^mapx.*, with Build, Cancel, Discover 
and Read. This working fine.


Now I have this
mapy
 - 
   - job 1
   - job 2
 - 
   - job 1
   - job 2
   - job n 
 - 
   - job 1
   - job 2
   - job n

Now I want to give a user/group only give access to the jobs in map . 
What should be the pattern than  I have tried the following (and more)
^mapy/.*
^mapy/*
^mapy/(.*)
^mapy\/.*
^(?i)mapy/.*

etc. but if I log in for this user mapx in shown up but not the mapy so 
that the user can have access to 

I hope that someone can help me out with this.


Thanks in advance,

Best regards,

Nico

-- 
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/24820b00-f374-4aab-955b-cfb41762e2b9%40googlegroups.com.


Re: How to automatically build the latest svn tag

2019-08-02 Thread Nico van de Kamp
Question:

I'm not familiar with this specific but I try to get the last version of a 
tag from SVN. I found this.

SVN is installed on another server than the Jenkins server. 

So to run command: *export SVN_TAG=`svn ls --username someuser --password 
somepass --non-interactive http://someproj.googlecode.com/svn/tags 
 |tail -1`* , I think an svn 
client needs to be installed on the jenkins server? Otherwise get the 
message "svn command not found". Is that right or do I miss something?

In the past I use (putty if I remember well) for tunneling: 
*svn+ssh://@*, is that also possible with this construction?

Or does someone have a better idea?

Nico

-- 
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/a5cb96cf-d384-4038-a0d5-16007f831852%40googlegroups.com.


How to configure Jenkins to let it work with SVN, so that directory's/file's are checked out?

2019-05-03 Thread Nico van de Kamp
Hello,

This year feb. I started working with Jenkins.  Now I want to deploy new 
versions from SVN.

I understand there two ways:
[list]Push: initiative is at the side of SVN.[/list]
[list]Pull: initiative is at Jenkins side by polling.[/list]

On this moment I prefer the Push method, but...


*Structure in SVN is:*
> Implementation
   > Data
  [color=blue]> Tool
 > tags
>Toolname- #Location 1: This is a directory and 
for every new version a directory will be added with files.
  > all kind of files[/color]
  [color=orange]> Tool
 > tags
>Toolname- #Location 2: This is a directory and 
for every new version a directory will be added with files.
  > all kind of files[/color]


*1. Push Method:*
I have found that at the SVN post-commit hook (at the repository/hook) has 
to be created like:
[code=Bash]
REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget \
  --header "Content-Type:text/plain;charset=UTF-8" \
  --post-data "`svnlook changed --revision $REV $REPOS`" \
  --output-document "-" \
  --timeout=2 \
  http://server/subversion/${UUID}/notifyCommit?rev=$REV[/code]

This is the 'simple' script version. There is also a 'Robust' version but 
to explain how does this work it make no difference if we look to the 
simple version or the robust version I think

I think at the Jenkins side I have to do:
1. I have to create a freestyle job with "Source Code Management" see my 
screenshot "2019-05-03 08_20_36-Jenkins_job SVN.png"
2. And do I have to create a "Remote Build trigger" see my screenshot 
"2019-05-03 08_28_06-Jenkins Build trigger.png"

*But my question are:*
*1. What makes the connection between SVN and Jenkins? *
*- I understand if something is committed were does that script point 
to the instance of Jenkins? At which part is the connection declared?*
*- And were does that script make a kind of connection with that 
specific job? or is that ${UUID}*
*- And my idea is that pos-commit hook need to placed at the location 
of the repository were we are interested in. This means that if somenthing 
in SVN is commited, but that has nothing todo were we are not interested, 
the script will not be executed. Or does it work different?*
*2. What will trigger the Job? must I create a trigger "Trigger builds 
remotely"? If so, can I create any kind of token string? like my name? If I 
need this than I think I need also to fill that token at the SVN side 
or...?*
*3. And do I have to create for every SVN location a new Job and than also 
for every SVN location a post-commit hook script? I think so, but I'm not 
sure*
 
*2. Pull by Polling Method:*
First thing to is not difficult, create a "Poll scm schedule" for the 
Crontab.
But than? What todo next?

*My questions about polling are:*
*1. Now I have connection between Jenkins and SVN. I have the Cronjob 
running.*
*- But how do I know if there is a new version?*
*- How do I know which is the new version? Which directory is new and 
do I have to pick up from SVN*
*- And what does it trigger the job? I mean ok, If I have found with 
Jenkins the latest version to check-out, what made that the job is 
triggered and the build is started and the directory's/files's are checked 
out?*

*Or does any know a good tutorial were all this is explained? I have 
googled a lot and bought three books, I can't find the answers on these 
questions. *
*I hope that someone can help me out with this or point me in the 
direction, so that I can solve it by myself. *
*Or can someone explain to me what I do not understand and what my lack of 
knowledge is?*

Thanks in advance.

With regards,

Nico

-- 
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/f76a0302-dcfe-4f44-9950-70bcd4a59d4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Example of get 'latest' source map/file's from SVN and if not exist in Nexus, put into Nexus.

2019-03-29 Thread Nico van de Kamp
Hello,

In another tread before I mention already I'm new to Jenkins.

But a thing what I have to make is:

   1. Another company is putting SVN (=folder) a folder with files, which 
   is the new version like:
  1. Main_folder *<-- When in this folder a new folder is placed, 
 Jenkins must be triggered.*
  - -1.0.3
- -1.0.4
- - etc 
2. *When a new folder is there, Jenkins must be triggered;*
  1. *Jenkins must capture only the new folder with the content.*
  2. Then look in Nexus if the folder -x.x.x already exist 
  in Nexus.
 1. If already exist in Nexus --> 
 1. send a mail with version already exist
 2. If not exist in Nexus --> 
 1. zip the complete -x.x.x 
2. Put it in Nexus
3. Send a e-mail with info
 
This is in short what I have to make. Marked in *red *is for me the hard to 
define part. 

I think that I can solve this by using "*Source Code Management --> 
Subversion*" of Jenkins.
Fill here the Repository URL in with the right Local module directory so 
that Jenkins job is only triggered by the right directory.

But what for me hard to understand is, how does Jenkins know or how can we 
capture the last added directory in SVN? 

I believe a folder has a attribute number let say it has now number 52. But 
if you add a new file or folder to a directory it is increased to 53. Must 
I think this way or...?

*So I'm looking for an example, so that I understand how I can solve this.*

Thanks in advance,

Nico.

-- 
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/7254566d-94c8-48e7-bbe4-400bf4b0c1f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What can be the reason of: "Problems occurs on injecting env vars as a build step Java heap space"?

2019-03-29 Thread Nico van de Kamp
Hello,

I'm added to a colleague who is doing CI/CA for a certain project. I'm 
"already" three weeks working with jenkins! But without jokes, I'm new to 
Jenkins.

I see now this error "[Multijob] - [ERROR] - Problems occurs on injecting 
env. vars as a build step: Java heap space" and I've been searching on the 
internet but till now, I do not find a solution to resolve this issue? Also 
the other team members have searching for a solution. I know what the heap 
means for Java.

What my colleague already have done is:

   - Jenkins.xml: Xrs -Xms8192M Xrs -Xmx8192M -Xss64M 
   -XX:MaxPermSize=512M -jar "%BASE%\slave.jar" -jnlpUrl http://... 
   -secret xxx
   - Searching the internet to find if someone else has also this problem

We use the following versions:

   - Jenkins v2.9, I know there is a newer version (v2.164.x)
   - On this moment I don't know the version number of the env injection 
   plugin. I know the latest version is 2.1.6
   - jre1.8., I believe version 1.8 does not use the MaxPermSize variable 
   anymore or...?

The strange thing is, in the end everything seems to work fine, but I don't 
like such a messages!

I hope that someone can help us out or point us in a direction that we can 
solve it!

Thanks in advance,

-- 

Met vriendelijke groet,

*Nico van de Kamp*

-- 
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/dc76e41b-c2d9-4219-a282-2a9e4f258afa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


"[Multijob] - [ERROR] - Problems occurs on injecting env. vars as a build step: Java heap space", does anyone know, what we can do about it?

2019-03-29 Thread Nico van de Kamp
Hello,

I'm added to a colleague who is doing CI/CA for a certain project. I'm 
"already" three weeks working with jenkins! But without jokes, I'm new to 
Jenkins.

I see now this error "[Multijob] - [ERROR] - Problems occurs on injecting 
env. vars as a build step: Java heap space" and I've been searching on the 
internet but till now, I do not find a solution to resolve this issue? Also 
the other team members have searching for a solution. I know what the heap 
means for Java.

What my colleague already have done is:

   - Jenkins.xml: Xrs -Xms8192M Xrs -Xmx8192M -Xss64M 
   -XX:MaxPermSize=512M -jar "%BASE%\slave.jar" -jnlpUrl http://... 
   -secret xxx
   - Searching the internet to find if someone else has also this problem

We use the following versions:

   - Jenkins v2.9, I know there is a newer version (v2.164.x)
   - On this moment I don't know the version number of the env injection 
   plugin. I know the latest version is 2.1.6
   - jre1.8., I believe version 1.8 does not use the MaxPermSize variable 
   anymore or...?

The strange thing is, in the end everything seems to work fine, but I don't 
like such a messages!

I hope that someone can help us out or point us in a direction that we can 
solve it!

Thanks in advance,

Nico

-- 
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/368c6eb8-181c-4097-9559-124b92bb0744%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.