ssh-agent plugin do not actually switch job cridentials
Hi. I am using ssh-agent plugin to define cridentials for my job(node is defined with user "ec2-user" but I want to run build script under different user - ctmacc1) I have defined such user on EC2 linux node , with same ssh key as ec2-user. When I connect to machine manually (putty) with ctmacc1 - it works with no problem But when I run job through jenkins - I see following: [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Registered BouncyCastle on the remote agent [ssh-agent] Started. [ssh-agent] Using credentials *ctmacc1* [RH12CtmAws] $ /bin/sh -xe /tmp/hudson1327337313392147816.sh + id uid=1000(*ec2-user*) gid=1000(ec2-user) groups=1000(ec2-user),4(adm),10(wheel),190(systemd-journal) context=unconfined_u:unconfined_r:unconfined_t:s0 That means ssh-agent says that it uses cridentials *ctmacc1 *at which user name is defigned to be ctmacc1. But "id" command at build script shows that it actually runs under ec2-user -- 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/CAFASMLQkcyrtdJRR7eFWML-zOx1xr7%2B6o5v8ZZdE8jXOgnGMdw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Different user in Jenkins node configuration and job.
Hi. I am using Jenkins with EC2 plugin. Problem is aas follows. In Jenkins configuration I created definition of EC2 Linux node, with user "ec2-user". Initialisation script of thosenode instalal several packages and creates my aplicative user ("appuser"), under which I actually want to my application and run tests. Problem is that jenkins configuration definition have only one user definition. So - if I have put there ec2-user, I have no place to put appuser user name and password. In Job(project) definition, there is only link to label (actually - node definition), and there is no place to say - that those job I want actually to run with appuser and not ec2-user. Work around I uses now is - in shell scrpt of my project job I copy everythinkg from workspace to home directorry of appuser and run test from there using "su". But - it looks for me to be little bit crippy... Is there any way to do it in more "normal" - straight forward manner? -- 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/CAFASMLQBzk-b4A6G3OUCsrEcu4VzT7u5CezRqj85aGNoRfqUiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
How to search jenkins artifacts copied from one job to another.
Hi. I have 2 jenkins jobs(both runs on amazon EC2 nodes). One archive some file as artifact. Second is defined to have an access to those artifact. When I comes to second node (that access artifact, created by first one) I see that those artifact lays under directorry : *workspace\label=windows2012Aws_ONE_LOCAL_MSSQL* Where *windows2012Aws_ONE_LOCAL_MSSQL *is name of primary job - that creates artifact... Is there some Jenkins mnemonic, that I can put in my second job - to point my script (power-shell) where ios those file located? Or I have to use hardcoded path %workspace%../../../*label=windows2012Aws_ONE_LOCAL_MSSQL *like I have to do now? -- 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/099cae7f-9656-47e8-8986-6327016ec4a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to get ip(public or private of one EC2 node and pass it to second
Some additional thought. If there is some way to pass to slave information about jenkins server, that manages it - it could give a kind of workaround. For example I can start some web server or my_sql db server at jenkins node. And bootstrup script that deploy slaves can when deploying sserver node put its ip at those server, and client bootstrup script get from there server's ip.. -- 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/4263d2b2-d525-4412-a2a7-60c416fbdb74%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to get ip(public or private of one EC2 node and pass it to second
Some additional thought. If there is some way to pass to slave information about jenkins server, that manages it - it could give a kind of workaround. For example I can start some web server or my_sql db server at jenkins node. And bootstrup script that deploy slaves can when deploying sserver node put its ip at those server, and client bootstrup script get from there server's ip... пятница, 3 февраля 2017 г., 0:37:46 UTC+2 пользователь Moshe Zuisman написал: > > I am quite a new bee in jenkins. So - it can happen , that I ask > something that already was asked. While - I did not find anything on those > or another forums or documentation. > > I have 2 jobs on my jenkins server. > One creates node (EC2 amazon Windows machine) with application server > installed on it. > Second should create secondary fail-over instance, thay have to "know" > host of primary host (and keep it in application database). > At batch script, that I have put in primary job definition I have run > power shell job that prints public host name of primary host into stdout. > So - when I look at job stdout - I can copy from there those public IP. > Than I edit job definition of secondary node and put there primary host > ip... > So - I can run my tests half automatically , but it require manual > involvement in secondary node job, and prevent automatic execution of tests. > Is there any way to store those primary host ip during run of primary job > run(in some jenkins intenal variables , storage , whatever) of even let us > say file/local db - at machine running jenkins server. So - that later > secondary job whould be able to get it automatically without human > involvement... > > To get it clear. I can not run primary job in advance and keep it alive > with constant IP. Since all those test is test of ongoing development > builds - both instances have to be each time recreated from scratch, since > they are each time installed from last development build. > Thanks in advance > -- 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/0e5e2f14-8965-4bec-a403-754a257aea9e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
How to get ip(public or private of one EC2 node and pass it to second
I am quite a new bee in jenkins. So - it can happen , that I ask something that already was asked. While - I did not find anything on those or another forums or documentation. I have 2 jobs on my jenkins server. One creates node (EC2 amazon Windows machine) with application server installed on it. Second should create secondary fail-over instance, thay have to "know" host of primary host (and keep it in application database). At batch script, that I have put in primary job definition I have run power shell job that prints public host name of primary host into stdout. So - when I look at job stdout - I can copy from there those public IP. Than I edit job definition of secondary node and put there primary host ip... So - I can run my tests half automatically , but it require manual involvement in secondary node job, and prevent automatic execution of tests. Is there any way to store those primary host ip during run of primary job run(in some jenkins intenal variables , storage , whatever) of even let us say file/local db - at machine running jenkins server. So - that later secondary job whould be able to get it automatically without human involvement... To get it clear. I can not run primary job in advance and keep it alive with constant IP. Since all those test is test of ongoing development builds - both instances have to be each time recreated from scratch, since they are each time installed from last development build. Thanks in advance -- 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/7d579a1c-caf4-43f7-9424-cd9179bda308%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.