How to hide checkout scm step output in Jenkins console output

2019-09-04 Thread pix data
Hi Team,

Is it possible to hide the checkout scm step generated console output in
Jenkins.

In my Jenkinsfile I have checkout scm as first step, which is generating
following output in my console of Jenkins.

The following output I want to hide in Jenkins Console is,

Cloning the remote Git repository

Cloning repository https://github.com/forpixona/pr-rest.git

 > git init /var/jenkins_home/workspace/Testing # timeout=10

Fetching upstream changes from https://github.com/forpixona/pr-rest.git


 > git --version # timeout=10

 > git fetch --tags --progress https://github.com/forpixona/pr-rest.git
 +refs/heads/*:refs/remotes/origin/*

> git config remote.origin.url https://github.com/forpixona/pr-rest.git
 # timeout=10

 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
# timeout=10

 > git config remote.origin.url https://github.com/forpixona/pr-rest.git
 # timeout=10

Fetching upstream changes from https://github.com/forpixona/pr-rest.git


 > git fetch --tags --progress https://github.com/forpixona/pr-rest.git
 +refs/heads/*:refs/remotes/origin/*

> git rev-parse refs/remotes/origin/testing^{commit} # timeout=10

 > git rev-parse refs/remotes/origin/origin/testing^{commit} # timeout=10

Checking out Revision 591a19f0a5f83d128ff1a0db17934094c3c6e410
(refs/remotes/origin/testing)

 > git config core.sparsecheckout # timeout=10

 > git checkout -f 591a19f0a5f83d128ff1a0db17934094c3c6e410

Commit message: "updated the things"


Thanks in Advance.
-- 
Kind Regards

-- 
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/CAOpjHkf8eohNxiJQfSY-4ydX9G5GvkjJUo69QJiFZAJU-0dcVQ%40mail.gmail.com.


Re: Issue with jenkins pipeline

2019-09-04 Thread Toni Van de Voorde
Hi Salvatore,

The pipeline seems correct, but how did you configure jenkins to run this?
Seems to me it doesn't find this specific configuration?!

Cheers

On Thu, 5 Sep 2019 at 00:06, Salvatore Esposito <
salvatore.esposit...@gmail.com> wrote:

> Hi. I create this pipeline using docker container based on jenkins image:
>
> pipeline {
> agent any
>
> stages {
> stage('Build') {
> steps {
> echo 'Building..'
> }
> }
> stage('Test') {
> steps {
> echo 'Testing..'
> }
> }
> stage('Deploy') {
> steps {
> echo 'Deploying'
> }
> }
> }
> }
>
> But when I ran it I got back this:
>
> Stage View This Pipeline has run successfully, but does not define any
> stages. Please use the stage step to define some stages in this Pipeline
>
> And there is no echoed valus in console.
>
> What happens with this?
>
>
> --
> 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/af693584-c9ed-4724-8b85-28ece61afcd6%40googlegroups.com
> 
> .
>

-- 
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/CAGRKivw7k%3DnpuuNkwMSj38YjHomDZVN%3Du-%3DSHgs5oAYnJeJMGA%40mail.gmail.com.


How to isolate docker container tests with Jenkins?

2019-09-04 Thread Stephen Person
For the life of me I cannot come up with an efficient solution to running 
tests against a docker container in an isolated environment with Jenkins. 
Emphasis on 'isolated environment' so many builds/tests can run in parallel 
without interference. I have tried the docker-in-docker approach but this 
caused many complications with networking and other stuff which compromised 
the functionality of my containers.

Some things worth mentioning...
1. I use docker-compose to build and start my container and all dependent 
containers (like activemq, postgres, etc)
2. Limited to using Host Network for all containers (cant use ip-forwarding)

As you can tell, I think about the container as the final artifact I'm 
delivering to production, which is why it's important to run tests against 
the container instead of inside it. Any and all thought is greatly 
appreciated. 

-- 
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/405a49ff-6f85-4083-92ad-f8c18a34ab5f%40googlegroups.com.


I want deploy C\C++ projects in to jenkins and maveen, please advice guide and help me how to process this deployment

2019-09-04 Thread Jeevan Podduturi
I want deploy C\C++ projects in to jenkins and maveen, please advice guide 
and help me how to process this deployment 

-- 
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/be5a0c28-45e5-44e3-9ea4-a1b7061e149e%40googlegroups.com.


Re: Converting Classic to Pipeline questions

2019-09-04 Thread Matt Hicks

>
> how to tell if these jobs can be converted to a pipeline job?
>

The pipeine steps reference lists all plugins that include pipeline 
support.  If the freestyle jobs to convert use plugins from that list it 
should be relatively easy to convert.  If plugins not in the list are used 
(e.g. Promoted Builds plugin), you will have to keep those steps in a 
freestyle job, search for a similar plugin that has pipeline support, or 
build it yourself--perhaps in a shell script.
 
 

-- 
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/863450d3-7834-4fa5-b72c-a28b7c96cc80%40googlegroups.com.


Running jenkins container to Dynamically provisioned Docker agents

2019-09-04 Thread Salvatore Esposito
Is there a way to do that by using a container and not a regular 
installation?

-- 
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/ecdcfdf1-c7a9-4bad-85f1-a4c131776b20%40googlegroups.com.


Re: Under Jenkins SignTool Error "No certificates were found", works fine logged on as user

2019-09-04 Thread Chia-Yu Wu
Hi Mark, 
I have the same issue with ev sign (usb token) code through jenkins.
It work fine if i do ev sign in admin role command line.
But if let it auto build and sign through, the jenkins console will show 
the following error message:

"No certificates were found that met all the given criteria"

I have read your suggestion, using the agent to "Launch agent via Java Web 
Start" instead of runnig jenkins as windows service.
But I don't have a slave node, my jenkins only have a default master node, 
I can't config the master node "Launch agent via Java Web Start"

Could you help me about this issue?
I'll very appreciate your help.


Mark Waite於 2019年5月9日星期四 UTC+8下午10時59分13秒寫道:
>
>
>
> On Thu, May 9, 2019 at 6:13 AM A M > 
> wrote:
>
>> Thanks a lot Mark for your quick response!   As I understand it the goal 
>> is to create a slave/agent that will run the code signing directly on 
>> windows, instead of a service. great idea!
>>
>> However, I am stuck at step 4, I dond't see the "Launch agent via Java 
>> Web Start" option. I found a general solution online 
>> ,
>>  
>> by specifying a concrete or random port in the Global Security TCP 
>> settings. I tried both, and even restarted Jenkins a couple of times, and 
>> it doesn't show up. 
>>
>>
> I think you are on the right path.  That solution is the correct solution.
>
> Here are the screen shots that I used to confirm it is working with 
> Jenkins 2.164.2:
>
> *Jenkins -> Configure Global Security -> Agents -> Port 5*
>
> [image: Annotation 2019-05-09 084830.jpg]
>
> *Jenkins -> Build Executor Status -> New Node*
>
> [image: Annotation 2019-05-09 084942.jpg]
>
> *Node name -> Permanent Agent -> OK*
>
> [image: Annotation 2019-05-09 085016.jpg]
>
> Name -> Description -> Remote root directory -> Launch Method "Launch 
> agent via Java Web Start"
>
> [image: Annotation 2019-05-09 085149.jpg]
>
> Mark Waite
>  
>
>> I only see 1) Launch agent by connecting it to the master, 2) ... via 
>> execution of command on the master, 3) ... Let Jenkins control this Windows 
>> slave as a Windows service.
>>
>>
> That likely indicates that you installed the 'windows-slaves' or 
> 'windows-agents' plugin.  You don't need that plugin and generally don't 
> want it.  The technique it uses to start the agent is based on DCOM, is 
> exceptionally brittle, and is very hard to use.  You can (and probably 
> should) remove the windows-slaves or windows-agents plugin.  Agents run on 
> Windows quite well without needing that plugin.
>  
>
>> Also checked if there are any updates of Jenkins, only some unrelated 
>> plugin-updates are available. Anything else I could check?
>>
>> Thank you!
>>
>> Am Mittwoch, 8. Mai 2019 16:05:00 UTC+2 schrieb Mark Waite:
>>>
>>>
>>>
>>> On Wednesday, May 8, 2019 at 7:18:31 AM UTC-6, A M wrote:

 hi Mark

 I am struggling with a very similar issue. What exactly do you mean by 
 your comment and how do I achieve this?


>>> I said:
>>>
>>> > Run the Windows agent from the Windows desktop rather than running it 
>>> from a service which has been allowed to interact with the desktop.
>>>
>>> The most direct way to implement what I described is to:
>>>
>>>1. Login to the Windows desktop machine where code signing will be 
>>>run
>>>2. Open a web browser to the Jenkins server
>>>3. Create an agent (a node) to represent that Windows computer
>>>4. Configure the agent to "Launch agent via Java Web Start"
>>>5. Define the required agent fields (like a remote root directory - 
>>>I prefer 'C:\J\' to reduce problems with Windows and long paths) and 
>>> save 
>>>the configuration of that agent
>>>6. Download the 'agent.jar' file from the hyperlink on the web page, 
>>>save it somewhere convenient (like C:\J\agent.jar)
>>>7. Open a command prompt window on the Windows desktop machine and 
>>>change to the convenient directory C:\J
>>>8. Copy the 'Run from agent command line" from the web page into the 
>>>command prompt window
>>>
>>> Thanks for asking!
>>> Mark Waite
>>>  
>>>
 I want to run the signtool.exe together with the certificate on a USB 
 token as an AfterPublish job in Jenkins. Jenkins is running as admin. 
 Single sign-on is activated for the USB token. Running signtool.exe in the 
 admin console works, running the same command through Jenkins results 
 in the "No certificates were found that met all the given criteria." 
 error.

 Any help is much appreciated. Thank you!
>
> -- 
>> 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 jenkins...@googlegroups.com .
>> To view this discussion on the web visit 
>> 

Re: Integrating Jenkins with EKS Cluster

2019-09-04 Thread Junaid Mukhtar
> Hi Team
>
> We are using Jenkins to run build, test and deploy jobs to our KOPS
> Cluster successfully without any issues. Jenkins is running on a dedicated
> EC2 instance
>
> We are now planning to switch over to EKS Cluster and want to point
> Jenkins to the new EKS cluster to perform the same actions.
>
> We are using Kubernetes Plugin for the KOPS cluster which uses certificate
> and username/password for authentication. But for EKS AWS uses
> aws-iam-authenticator that goes into the kubeconfig to generate on the fly
> tokens and so far we haven't been able to come up with a way to use
> aws-iam-authenticator to integrate Jenkins with EKS cluster.
>
> I would be really greateful if you could point me in a right direction or
> share with me the steps to integrate Jenkins with EKS cluster.
>
> 
> Regards,
> Junaid
>

-- 
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/CAPO_fvoE9RnNETYENS%3DfRdmsgbh-hktj7fQm3Q_mp_7S0UG%2BFw%40mail.gmail.com.


Git Plugin checking out mystery commit

2019-09-04 Thread Shaun McArthur
This is happening more often than I'd like, and I can't figure out why.

- the commit I want to test is c3a9...
- the git plugin ends up checking out cd69 - which appears to be master 
(?why?)

> /usr/bin/git merge -s recursive --ff c3a9d9a295f1acd636078514a49558c871cb502a 
> # timeout=10*00:00:10.967*  > /usr/bin/git rev-parse HEAD^{commit} # 
> timeout=10*00:00:11.053* Seen 91 remote branches*00:00:11.068*  > 
> /usr/bin/git show-ref --tags -d # timeout=10*00:00:11.083* Checking out 
> Revision cd69b45ba6a34f67791c5cbc6964b5c152415aae (origin/master)


- and of course, when I try to update the status, I get an error:

message": "No commit found for SHA: cd69b45ba6a34f67791c5cbc6964b5c152415aae"



...and then we end up re-testing master.

What is the Git Plugin doing?


Related - is there a way to script something before the git plugin does 
it's thing? I could convert the branch name to a commit id.


Thanks for any assistance. Cross posted to SO.
Shaun

-- 
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/34c14b2c-d7f5-423f-9711-72603e89c471%40googlegroups.com.


Issue with jenkins pipeline

2019-09-04 Thread Salvatore Esposito
Hi. I create this pipeline using docker container based on jenkins image:

pipeline {
agent any

stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying'
}
}
}
}

But when I ran it I got back this:

Stage View This Pipeline has run successfully, but does not define any 
stages. Please use the stage step to define some stages in this Pipeline

And there is no echoed valus in console.

What happens with this?


-- 
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/af693584-c9ed-4724-8b85-28ece61afcd6%40googlegroups.com.


Re: Under Jenkins SignTool Error "No certificates were found", works fine logged on as user

2019-09-04 Thread Mark Waite
On Wed, Sep 4, 2019 at 4:06 PM Chia-Yu Wu  wrote:

> Hi Mark,
> I have the same issue with ev sign (usb token) code through jenkins.
> It work fine if i do ev sign in admin role command line.
> But if let it auto build and sign through, the jenkins console will show
> the following error message:
>
> "No certificates were found that met all the given criteria"
>
> I have read your suggestion, using the agent to "Launch agent via Java Web
> Start" instead of runnig jenkins as windows service.
> But I don't have a slave node, my jenkins only have a default master node,
> I can't config the master node "Launch agent via Java Web Start"
>
> Could you help me about this issue?
> I'll very appreciate your help.
>
>
If you're running the master as a service, then you'll need to add an agent
which is running on the desktop.  The agent can be on the same computer
where you run the Jenkins master, but the new agent will need to be
launched from the desktop.

If you're running the master from a command line, then it should work.

Thanks,
Mark Waite


>
> Mark Waite於 2019年5月9日星期四 UTC+8下午10時59分13秒寫道:
>>
>>
>>
>> On Thu, May 9, 2019 at 6:13 AM A M  wrote:
>>
>>> Thanks a lot Mark for your quick response!   As I understand it the goal
>>> is to create a slave/agent that will run the code signing directly on
>>> windows, instead of a service. great idea!
>>>
>>> However, I am stuck at step 4, I dond't see the "Launch agent via Java
>>> Web Start" option. I found a general solution online
>>> ,
>>> by specifying a concrete or random port in the Global Security TCP
>>> settings. I tried both, and even restarted Jenkins a couple of times, and
>>> it doesn't show up.
>>>
>>>
>> I think you are on the right path.  That solution is the correct solution.
>>
>> Here are the screen shots that I used to confirm it is working with
>> Jenkins 2.164.2:
>>
>> *Jenkins -> Configure Global Security -> Agents -> Port 5*
>>
>> [image: Annotation 2019-05-09 084830.jpg]
>>
>> *Jenkins -> Build Executor Status -> New Node*
>>
>> [image: Annotation 2019-05-09 084942.jpg]
>>
>> *Node name -> Permanent Agent -> OK*
>>
>> [image: Annotation 2019-05-09 085016.jpg]
>>
>> Name -> Description -> Remote root directory -> Launch Method "Launch
>> agent via Java Web Start"
>>
>> [image: Annotation 2019-05-09 085149.jpg]
>>
>> Mark Waite
>>
>>
>>> I only see 1) Launch agent by connecting it to the master, 2) ... via
>>> execution of command on the master, 3) ... Let Jenkins control this Windows
>>> slave as a Windows service.
>>>
>>>
>> That likely indicates that you installed the 'windows-slaves' or
>> 'windows-agents' plugin.  You don't need that plugin and generally don't
>> want it.  The technique it uses to start the agent is based on DCOM, is
>> exceptionally brittle, and is very hard to use.  You can (and probably
>> should) remove the windows-slaves or windows-agents plugin.  Agents run on
>> Windows quite well without needing that plugin.
>>
>>
>>> Also checked if there are any updates of Jenkins, only some unrelated
>>> plugin-updates are available. Anything else I could check?
>>>
>>> Thank you!
>>>
>>> Am Mittwoch, 8. Mai 2019 16:05:00 UTC+2 schrieb Mark Waite:



 On Wednesday, May 8, 2019 at 7:18:31 AM UTC-6, A M wrote:
>
> hi Mark
>
> I am struggling with a very similar issue. What exactly do you mean by
> your comment and how do I achieve this?
>
>
 I said:

 > Run the Windows agent from the Windows desktop rather than running it
 from a service which has been allowed to interact with the desktop.

 The most direct way to implement what I described is to:

1. Login to the Windows desktop machine where code signing will be
run
2. Open a web browser to the Jenkins server
3. Create an agent (a node) to represent that Windows computer
4. Configure the agent to "Launch agent via Java Web Start"
5. Define the required agent fields (like a remote root directory -
I prefer 'C:\J\' to reduce problems with Windows and long paths) and 
 save
the configuration of that agent
6. Download the 'agent.jar' file from the hyperlink on the web
page, save it somewhere convenient (like C:\J\agent.jar)
7. Open a command prompt window on the Windows desktop machine and
change to the convenient directory C:\J
8. Copy the 'Run from agent command line" from the web page into
the command prompt window

 Thanks for asking!
 Mark Waite


> I want to run the signtool.exe together with the certificate on a USB
> token as an AfterPublish job in Jenkins. Jenkins is running as admin.
> Single sign-on is activated for the USB token. Running signtool.exe in the
> admin console works, running the same command through Jenkins 

Re: Jenkins Update Problems

2019-09-04 Thread Terry Shields
We have figured out that this is due to Jenkins 2.139 updated libpam4j from 
1.8 to 1.11, looks like 1.11 requires root to get authentication. If we 
start Jenkins using root everything as far as logging in works, it breaks 
all kinds of other things so we would rather not do this. Starting Jenkins 
using the jenkins user as we have done for years breaks all logins that 
come from Active Directory. Has anyone else encountered this and what did 
you do to get around it?

On Monday, August 5, 2019 at 1:19:47 PM UTC-6, Terry Shields wrote:
>
> Our Jenkins server uses Active Directory for login management and the 
> Security Realm in Jenkins is set to: Unix user/group database. We are 
> currently running release 2.138.4 in Jenkins and everything works great. If 
> I update to any release above 2.138.4 all logins to Jenkins using a user in 
> AD stop working, a local user can still login. We have been trying to 
> figure out what is the cause, but have been unable to track it down for 
> some time now. Has anyone else run into something like this?
>
> Other releases that have been tried and fail:
> 2.140
> 2.147
> 2.150.3
> 2.164.2
> 2.176.1
>
>
>

-- 
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/dd38f340-cc96-4ede-9854-d9ba141fd65b%40googlegroups.com.


Re: Post all the archive data from Jenkins in Confluence

2019-09-04 Thread sravan
I am also fine with posting the results on results on remote host

On Wednesday, September 4, 2019 at 11:30:20 AM UTC-7, sravan wrote:
>
> Hi Guys,
> Is there a way to post the Jenkins results for the entire job (Probably 
> last 10 runs) on Confluence.
>
> Thanks,
> Sravan
>

-- 
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/2b52e3da-c4f6-40da-9028-19cbcd0eca30%40googlegroups.com.


Post all the archive data from Jenkins in Confluence

2019-09-04 Thread sravan
Hi Guys,
Is there a way to post the Jenkins results for the entire job (Probably 
last 10 runs) on Confluence.

Thanks,
Sravan

-- 
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/c412bac8-270c-4d2b-83c9-ea16f8f418a4%40googlegroups.com.


Re: SAML Configuration

2019-09-04 Thread Srinivasan RK
Thanks Ivan

On Wednesday, August 28, 2019 at 1:46:46 PM UTC-4, Srinivasan RK wrote:
>
> I have setup the SAML Plugin and loaded the IDP Metadata. My SP Metadata 
> always shows "AuthnRequestsSigned="true". How can i disable it? I am being 
> asked by admin if i can send without signed. I could not find how to do it 
> in Jenkins. 
>
>
> I am not sure what this checkbox  "Disable Signature Redirect Binding Auth 
> Request" is used for under SAML Configuration. I tried changing the Data 
> Binding to HTTP-Redirect and select the check-box, but when I view the 
> spMetaData file, it still shows up with AuthnRequestSigned = ture and 
> bindings:HTTP-POST.
>
>
> Versions : Jenkins 2.176.2 deployed on WebLogic 12.2.1.3 with SAML 1.1.2 
> Plugin.
>
>
> Thanks
>
>
> Srini
>

-- 
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/9b774bab-fa8e-497f-8102-1be9ddee6c6b%40googlegroups.com.


Re: Delay agent execution for auto-updates at boot

2019-09-04 Thread James Green
Hi Toni,

Looks like we are not alone:
https://issues.jenkins-ci.org/browse/JENKINS-43771 (see linked issue which
is indeed the same).

I ended up adding a vanilla Amazon Linux 2 AMI as an agent yesterday to try
things. It failed because git wasn't installed. I added a user data script
to install this but then java wasn't installed. So I added this too and the
agent log stalled entirely. Not sure what I did wrong and have not had a
chance to investigate further. Your comments well well be relevant - the
documentation inline did not make clear the difference between user data
and init script when used on an Amazon Linux 2 AMI (there is cloud-init).

If I get further I will update this thread.

James


On Tue, 3 Sep 2019 at 09:35, Toni Van de Voorde  wrote:

> Hey James,
>
> I had the same issue without understanding what happened. Meanwhile I also
> understand that it's due to the automatic updates kicking in. I solved it
> by removing the JDK from that AMI and let the master install it.
>
> You could also update your AMI and not allow auto upgrades, or you could
> add in the "init-script" of the cloud configuration in jenkins master to
> perform an upgrade. From what I see in the code (
> https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java#L184)
> it should wait for the upgrade to be finished.
>
> Hope this helps
>
> Cheers
>
> On Tuesday, September 3, 2019 at 10:26:38 AM UTC+2, James Green wrote:
>>
>> So our builds failed again yesterday due to this automatic update kicking
>> in. I checked, there was indeed a JDK security update so no complaints, but
>> I need a better system of updating Jenkins.
>>
>> Given Packer can search for and filter down AMIs, I thought the EC2
>> plugin should be able to, too. Solves our issue. Ticket if anyone is
>> interested: https://issues.jenkins-ci.org/browse/JENKINS-59180
>>
>>
>> On Thu, 29 Aug 2019 at 10:17, James Green  wrote:
>>
>>> I finally used Packer to build an AMI based on Amazon Linux 2 to act as
>>> as agent. Yesterday, the builds began failing with a Java stack trace.
>>>
>>> Turns out the EC2 instance starts, and in parallel the Jenkins agent
>>> begins and an auto-upgrade of openjdk kicked off. Further instructions
>>> failed. Rebuild the AMI and the new agent worked a treat.
>>>
>>> Is there a way of avoiding this problem by preventing Jenkins from
>>> launching the agent until the boot steps are complete? I cannot be the
>>> first to encounter this issue :-)
>>>
>>> Thanks,
>>>
>>> James
>>>
>>> --
> 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/edc2e575-ffa3-4865-9e78-9a0466497e67%40googlegroups.com
> 
> .
>

-- 
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/CAMH6%2BazHCG%3DL0AQ040W9oYwgVz-f6qW4g6ZGO8dabydSjAuYjA%40mail.gmail.com.