Re: Invoke another pipeline under another repository's branch

2017-09-15 Thread Kevin Burnett
:D this is working for me: build('/proj/hot-repo/master') where proj is a bitbucket project key (bitbucket server in my case) and hot-repo is a repo within that project. On Friday, September 15, 2017 at 11:30:02 AM UTC-4, Slava Dubrovskiy wrote: > > > 15.09.2017 17:50, Dan Tran пишет: > >

Re: Jenkins pipeline parallel execution for different nodes on both Declarative and Scripted

2017-08-25 Thread Kevin Burnett
you can use the "parallel" step in a declarative pipeline. you cannot wrap multiple stages inside a parallel step unless you use scripted (currently. this may be implemented in declarative in the future). it is very hard to read code that is not indented. please indent your code. :) i think

Re: notifyCommit won't fire specific jobs, need help debugging

2017-06-30 Thread Kevin Burnett
so the job that doesn't fire has parameters. what about the job in the same instance that you said works? does it have parameters? i'm believe i've seen jobs with parameters not get triggered, but i'm not sure if that's just how it works (job with parameters never get triggered) or if there are

Re: GitHub and Bitbucket branch source UI refactoring

2017-06-26 Thread Kevin Burnett
This is so good. :) The pre and post diffs looked right, and the new UI and functionality gives me everything that I was hoping for. I'm going to remove the "discover pull requests from [everywhere]" behaviors and select "Only branches that are also filed as PRs" on production as soon as

Re: Fastest way to git tag in a Jenkinsfile?

2017-06-17 Thread Kevin Burnett
it is possible to skipDefaultCheckout and then "checkout scm". this isn't typically necessary or desirable if you want to operate on the same repo where your Jenkinsfile lives, but it sounds like you might want to override some checkout options, which seems cool. we also do this for some jobs

Re: GitHub and Bitbucket branch source UI refactoring

2017-06-16 Thread Kevin Burnett
we'd be down to try that, yes. thanks for making these changes in a way that will benefit the product long-term! fingers are crossed that there's already a built-in way to pretend like pull requests don't exist! you're already building the branches; why also build the pull requests, eh? :)

Re: Can environment directive be used in post?

2017-06-14 Thread Kevin Burnett
i don't believe you can use the environment instruction in post, no. but you can use withEnv: https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-withenv-code-set-environment-variables On Wednesday, June 14, 2017 at 8:43:43 AM UTC-4, Idan Adar wrote: > > In a stage I can do the

Re: How to set environment variable in multibranch pipeline?

2017-06-13 Thread Kevin Burnett
here's an example Jenkinsfile that sets an environment variable (REPO_URL) that applies to all stages. you can also use the withEnv step to set an environment variable for a certain block. pipeline { agent { label 'docker' } environment { REPO_URL = 'www.my.repo' } stages {

Re: Does Jenkis need the workspace in order to compare previous commits for Git repository

2017-06-08 Thread Kevin Burnett
I got super-confused here for a minute, so I thought it might be worth pointing out that people who are using multibranch pipelines can completely ignore the article presented in this thread (it says it's for "non-multibranch jobs") and get this bitbucket server add-on instead:

Re: Manual step stage on BlueOcean/Jenkins2 pipeline

2017-05-11 Thread Kevin Burnett
use the input step , like this: timeout(time: 5, unit: 'DAYS') { input message: 'Approve deployment?' } it's helpful to wrap it in a timeout, so eventually the pipeline will stop (fail) if no one approves

Re: How do I set env variable to currentBuild property in declarative pipeline environment.

2017-05-10 Thread Kevin Burnett
This is a way to accomplish what you're trying to do: #!groovy // assign to this variable in the first stage (see below), and then you can use it throughout your pipeline // not quite as clean as using the environment block, but it works. the problem seems to be that // the environment block

Re: A job to update other jobs

2017-05-09 Thread Kevin Burnett
what is up morgan, man? :) i just tested this to update a job description (it gets an http 302 when it works): curl -u user:pass -X POST https://ci.example.com/job/my-hot-job/submitDescription --data-urlencode "description=FROZEN by [fancy_business_here]" maybe someone else knows all about

Re: Pipeline with CVS

2017-05-02 Thread Kevin Burnett
Use the pipeline syntax generator that you can find in the left nav of your jenkins UI in any pipeline job. It's sweet. I will not take any cheap shots at CVS while I'm here.

Re: Multi branch source - PR versus branch build

2017-05-02 Thread Kevin Burnett
ack and there for we have > double builds > > Thanks > > -Dan > > On Monday, May 1, 2017 at 10:44:33 AM UTC-7, Kevin Burnett wrote: >> >> dan, >> >> i understand that you're using the bitbucket branch source plugin, you >> introduce a syntax error

Re: Multi branch source - PR versus branch build

2017-05-01 Thread Kevin Burnett
dan, i understand that you're using the bitbucket branch source plugin, you introduce a syntax error into the mainline branch (let's call it master), and you submit a pull request for a different branch (let's call it feature/new-hotness) that wasn't based off this bad master branch. your

Re: Jenkins Job gets triggered by Bitbucket Push event but not by Pull request event.

2017-04-06 Thread Kevin Burnett
if you're using bitbucket server and the recommended bitbucket server add-on, maybe you're running into this documented regression: https://github.com/topicusfinan/bitbucket-webhooks-plugin/issues/31. if so, as discussed in this github issue, a workaround is to downgrade this add-on to version

Re: Moving jobs from Bamboo to Jenkins

2017-03-31 Thread Kevin Burnett
type faster? :) ... :( i don't think you're going to find much help in terms of an existing script to perform the whole migration. http://stackoverflow.com/questions/38910932/bamboo-to-jenkins-migration. what i have found is that declarative pipelines facilitate migration quite well,

Re: Pipeline script for Build Trigger

2017-01-29 Thread Kevin Burnett
Sebastian, here's a snippet of a declarative Jenkinsfile pipeline showing a time-based (cron) trigger: pipeline { triggers { // every 30 minutes during 9 hours each night cron('H/30 20,21,22,23,0,1,2,3,4 * * *') } agent { label 'docker' } environment { GIT_COMMITTER_NAME =