Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
/*
* setsid.c -- execute a command in a new session
* Rick Sladkey <jrs@world.std.com>
* In the public domain.
*
* 1999-02-22 Arkadiusz Mi�kiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
*
* 2001-01-18 John Fremlin <vii@penguinpowered.com>
* - fork in case we are process group leader
#!/usr/bin/env python
import os,sys
if len(sys.argv)<2:
sys.exit("No arguments")
if os.getpgrp() == os.getpid() :
f = os.fork()
if f == -1:
sys.exit("fork")
Started by user anonymous
Running: Allocate node : Start
Running on master in /files/kohsuke/ws/jenkins/workflow/aggregator/work/jobs/trello-116/workspace
Running: Allocate node : Body : Start
Running: Shell Script
[workspace] Running shell script
+ sleep 60
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
@kohsuke
kohsuke / gist:84ce815d0a8ad85ecaf6
Last active August 29, 2015 14:12
nvidia problem
Dec 23 23:28:17 rescue kernel: [ 20.544453] nvidia 0000:01:00.0: irq 52 for MSI/MSI-X
Dec 23 23:28:18 rescue kernel: [ 21.684832] r8169 0000:03:00.0 eth0: link up
Dec 23 23:28:18 rescue kernel: [ 21.684837] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Dec 23 23:30:56 rescue kernel: [ 179.437927] NVRM: GPU at PCI:0000:01:00: GPU-bc0fa0b9-cac2-f507-b715-9bebdb69c71e
Dec 23 23:30:56 rescue kernel: [ 179.437933] NVRM: Xid (PCI:0000:01:00): 32, Channel ID 00000005 intr 00008000
Dec 23 23:30:56 rescue kernel: [ 179.438803] NVRM: Xid (PCI:0000:01:00): 69, Class Error: ChId 0005, Class 0000a097, Offset 00000d9c, Data ffffffff, ErrorCode 0000000c
Dec 23 23:32:23 rescue kernel: [ 266.469093] NVRM: Xid (PCI:0000:01:00): 69, Illegal Class Error: ChID 0007, Class 00000000, Offset 00001220, Data 3054a400
Dec 23 23:32:27 rescue kernel: [ 270.439207] NVRM: Xid (PCI:0000:01:00): 62, 0096(1c54) 00000000 00000000
Dec 23 23:32:44 rescue kernel: [ 287.807583] NVRM: os_schedule: Attempted to yield the CPU wh
diff --git a/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java b/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
index fc6e6f7..34afdae 100644
--- a/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
+++ b/src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
@@ -104,7 +104,7 @@ public abstract class EC2ComputerLauncher extends ComputerLauncher {
logger.println(msg);
}
- launch(computer, logger, computer.describeInstance());
+ launch(computer, listener, computer.describeInstance());
catchError {
try {
parallel(
dummy1: { build job: 'dummy1' },
dummy2: { build job: 'dummy2' }, // fails
)
} catch(_) {
}
}
[20:11:47] *** josb has joined #jenkins
[20:13:18] <josb> Hi. In the lastest Workflow plugin, 'currentBuild.result = "SUCCESS"' after a failed job doesn't seem to do anything, despite JENKINS-26834. Fyi.
[20:13:20] <jenkins-admin> JENKINS-26834:Direct access to contextual [Workflow]Run (Resolved) https://issues.jenkins-ci.org/browse/JENKINS-26834
[20:14:05] <kohsuke> josb: I think it's Jenkins' core thing. If somebody sets the build as a failure you can't set it back to success
[20:14:09] <kohsuke> josb: what's your use case?
[20:16:30] <josb> kohsuke: I tried to avoid a wrapper build to trigger a build failure of the current build. But then I discovered 'propagate: false' which works for my purpose (thanks for that!)
[20:17:18] <josb> So now I call 'build job: 'foo', propagate: false" inside my main workflow and all is well.
[20:18:11] <josb> My earlier attempt was to set 'currentBuild.result = "SUCCESS" after wrapping the build in a catchError block, but that doesn't work, hence my comment.
[20:18:39] <kohs
<j:jelly .... xmlns:local="local">
<d:taglib uri="local">
<d:tag name="radio">
...
${attrs.name}
</d:tag>
</d:taglib>
/*
* Copyright 2007,2008,2009,2010 Peter Poeml / Novell Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*