Active Directory authentication + Build agents

2017-08-10 Thread Daniel Becroft
Hopefully this is a quick question. We are currently moving to Active Directory authentication for Jenkins (as we can't get emails to send to our developers unless Jenkins knows about them now). Our plan is to create a group in AD (JenkinsUsers), put everyone into that group, and then give the

Re: curl upload with filename in variable

2017-08-10 Thread Curtis Kline
Richard, that was the problem. There was an extra line feed stuffed into the variable by accident. Thanks! Curtis On Thu, Aug 10, 2017 at 5:16 AM, Richard Bywater wrote: > Taking a look at the error, it appears like you have a line feed or > carriage return at the end of

Re: Using Secrets as "environment variables" in containerTemplate of jenkins-kubernetes-plugin

2017-08-10 Thread WANG, YAN-HONG
@Carlos, Thanks!!! 2017-08-10 21:27 GMT+02:00 Carlos Sanchez : > There is a PR for it https://github.com/jenkinsci/ > kubernetes-plugin/pull/162 > > On Thu, Aug 10, 2017 at 9:15 PM, YAN-HONG WANG > wrote: > >> Hi, >> >> In jenkins-kubernetes-plugin, is

Re: Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread nicolas de loof
Oh yes that's a stupid typo in default value, will fix this and push a release. We are still missing multi arch docker images so this same id can pull a Windows version of the agent image Le 10 août 2017 8:51 PM, "Jacob Larsen" a écrit : > Looks like the agent image is the

Re: Using Secrets as "environment variables" in containerTemplate of jenkins-kubernetes-plugin

2017-08-10 Thread Carlos Sanchez
There is a PR for it https://github.com/jenkinsci/kubernetes-plugin/pull/162 On Thu, Aug 10, 2017 at 9:15 PM, YAN-HONG WANG wrote: > Hi, > > In jenkins-kubernetes-plugin, is there any syntax that support using *Secrets > as environment variables* in *containerTemplate*?

Using Secrets as "environment variables" in containerTemplate of jenkins-kubernetes-plugin

2017-08-10 Thread YAN-HONG WANG
Hi, In jenkins-kubernetes-plugin, is there any syntax that support using *Secrets as environment variables* in *containerTemplate*? I just saw something from here. https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables So some syntax like

Re: The format of key of containerEnvVar within Jenkins Kubernetes Plugin

2017-08-10 Thread Carlos Sanchez
You can not use dots in an environment variable https://kubernetes.io/docs/api-reference/v1.6/#envvar-v1-core a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_' On Wed, Aug 9, 2017 at 9:18 AM, WANG, YAN-HONG

Re: Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread Jacob Larsen
Looks like the agent image is the default one that was just set in the latest release, see https://github.com/jenkinsci/docker-slaves-plugin/commit/2d0470b27a84ddff00c3e1adc7aec9b7e8dece00 Take a look at the Docker Slaves section of the global Jenkins configuration. The remoting image is

Re: Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread nicolas de loof
I'm on vacation so can't help before 1 week. Pipeline is fully supported, please check global configuration for the agent image you have configured for docker-slaves-plugin Le 10 août 2017 5:30 PM, "Geoff Bache" a écrit : > > Yes, I didn't contribute anything to that

Solid approach to starting Jenkins jobs from Slack?

2017-08-10 Thread Idan Adar
I've scored the web, tried all sort of Hubot plug-ins, Slash Command integration in Slack, but it's pretty bad... they either don't work, don't support multi-branch jobs, etc... Has anyone found a solid way to start Jenkins jobs from Slack and can share with the rest of us? -- You received

Re: Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread Geoff Bache
Yes, I didn't contribute anything to that generated command. On Thursday, 10 August 2017 17:22:17 UTC+2, slide wrote: > > The extra slash after "agent" is odd, I assume that the docker create > command is generated by the plugin? > > On Thu, Aug 10, 2017 at 8:14 AM Geoff Bache

Re: Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread Slide
The extra slash after "agent" is odd, I assume that the docker create command is generated by the plugin? On Thu, Aug 10, 2017 at 8:14 AM Geoff Bache wrote: > Hi all, > > > > I have a Jenkins pipeline defined (Windows server 2016) and I’m trying to > get it to use docker

Does docker-slaves-plugin with pipeline assume Linux?

2017-08-10 Thread Geoff Bache
Hi all, I have a Jenkins pipeline defined (Windows server 2016) and I’m trying to get it to use docker containers instead of building locally. The docker-slaves-plugin looked like the most convenient interface for this among a confusing forest of different Docker plugins. So I

Re: curl upload with filename in variable

2017-08-10 Thread Richard Bywater
Taking a look at the error, it appears like you have a line feed or carriage return at the end of the env.filename variable (note the quote is on the next line and not next to apk like I'd expect). Richard. On Thu, 10 Aug 2017 at 09:40 Curtis Kline wrote: > The file

Re: How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2017-08-10 Thread Vincent Heet
Ok so maybe i'm able to add this myself next week. I looked at the class you mentioned but would adding the PodTemplate class as a property there fix my issue? And I'm not sure why you mention volumes, volumes would then be supported from the PodTemplate if I understand this correctly? On

Re: Throttling parallel step

2017-08-10 Thread Mirek S
> > > *The only solution I came up with is to create 3 lockable resources of the > same label and lock them in each* > *of the closures. * > Now that I think of it - it wouldn't work anyway - another build of this job would not be able to reach the test-throttler resources, so it would wait

Throttling parallel step

2017-08-10 Thread Mirek S
Hi! I'm using something like this to run tests in parallel: stage('Test') { steps { script { testing_closures = [one: { print("staring one"); sleep 10; print("finishing one") }, two: { print("staring two"); sleep 10; print("finishing two") },

Re: How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2017-08-10 Thread Carlos Sanchez
It is not yet possible. Volumes would need to be added to the class https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesDeclarativeAgent.java On Thu, Aug 10, 2017 at 9:22 AM, Vincent Heet

How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2017-08-10 Thread Vincent Heet
Hi, I configured a declarative pipeline with the kubernetes-plugin to start a jenkins job's in a k8s cluster. This is working great but now I want to use volumes for secrets and need to specify a podTemplate. I'm not sure how to configure a podTemplate for a declarative pipeline. The pipeline

Re: Affordable solution for Jenkins CI and build slaves in the cloud?

2017-08-10 Thread Victor Martinez
If you mean to backup your Jenkins server, then read below: In my case I've been using tools such as: - *Puppet*: https://github.com/jenkinsci/puppet-jenkins - *Chef*: https://github.com/chef-cookbooks/jenkins - *Ansible*: https://github.com/geerlingguy/ansible-role-jenkins

Re: curl upload with filename in variable

2017-08-10 Thread Victor Martinez
Couple of thoughts: - ${params.ReleaseNotes} doesn't look it got any value, then it might be one of the root causes, - if you use the -v flag, does it give you any details? sh """ ls -l ${env.filename} curl -v -F "status=2" -F "notify=1" -F "notes=${params.ReleaseNotes}" -F "

Re: Parameterized build driven by Jenkinsfile

2017-08-10 Thread Craig Barr
Thanks Jacob. That worked exactly as I would expect! On Thu, Aug 10, 2017 at 5:40 AM, Jacob Larsen wrote: > Try this: > properties([ > parameters([ > string(name: 'bld', defaultValue: 'full', description: ''), > string(name: 'branch', defaultValue: 'dev',