Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kirill Abramov
    @abramovk
    @a-hacker Hello. How soon will the update be released? Do not tell me, a similar plugin with a branch filter?
    Austin Hacker
    @a-hacker
    @abramovk, which update are you referring to? If you are asking when the plugin will be back on the marketplace I do not have an answer to that. If you need to re-install it, you can download a jar from our releases page (https://github.com/KyleLNicholls/parameterized-builds/releases) and manually install it on your bitbucket server instance.
    Kirill Abramov
    @abramovk
    @a-hacker Sorry, but the latest version of the plugin breaks the bitbacket
    Austin Hacker
    @a-hacker
    Can you open up an issue with more specifics?
    Austin Hacker
    @a-hacker
    @/all the app is now back on the marketplace
    Ghost
    @ghost~5cee9f54d73408ce4fc1aae4
    Thanks!
    Daniel CABRERA
    @h2oboy
    Hi, I am am trying to trigger a Jenkins job a manually from Bitbucket but some how is not able to find the job. The job is not in any sort of folder and it shall be able to find it. Jenkins is able to see Bitbucket and vise versa.
    Not sure how to findout why BB is not able to find the Jenkins job
    the Jenkins job is a simple test job
    Daniel CABRERA
    @h2oboy
    The API Token is okay, since I can see on Jenkins side that every time that I trigger a manual job in BB the usage on the usage on the Jenkins API keeps increasing
    Austin Hacker
    @a-hacker
    Hi @h2oboy, if you have csrf protection enabled on your Jenkins server, make sure you've indicated that in the Bitbucket Jenkins settings. Other than that, do you get any error messages when you trigger a manual build?
    Daniel CABRERA
    @h2oboy
    @a-hacker first of all thanks for your reply! I tried with and without csrf and same result. BB complains that is not able to find the job. The job that is actually exectuting on jenkis does not do anything beside echo "hello"
    Daniel CABRERA
    @h2oboy
    I test starting the jenkins job remotely, by using CLI with the same user/credentials that I use on the BB plugin and I can build the jobs
    Austin Hacker
    @a-hacker
    Have you checked if any of the other triggers work?
    It could also be some sort of firewall or other network issue between Bitbucket and Jenkins. You may want to ssh to your Bitbucket Server and see if using curl or wget to trigger the job works from there.
    Daniel CABRERA
    @h2oboy
    @a-hacker I build a jenkins job using curl using the following commands: curl -I -u mysure:1197084e4d98207d89d42ca05df15ec333 http://myjenkins.local/jenkins/job/test/build?token=wtthothuothuththtg it builds without any issue. If you noticed I had to add a build token on my jenkins job to allow me to build it. If I do not do that I can not build the job. Do I have to set my jenkins jobs to build using a token?
    Daniel CABRERA
    @h2oboy
    I added the token to your pluging configuration to match the one on my jenkins job and still complaining about "job was not found". All this happened if I trigger the job manully on BB
    Daniel CABRERA
    @h2oboy
    I tested again by creating a branch and it triggers the job. So something is broken on manual building :-/
    I need to pass some json parameters to some of my jobs. This can be done using curl like this --form json='{"parameter": [{"name":"FILE_LOCATION_AS_SET_IN_JENKINS", "file":"file0"}]}'
    Is it possible to pass json parameters using your plugin?
    Daniel CABRERA
    @h2oboy
    @a-hacker I am trying to pass parameters to the jenkins build. It works when I start the job remotely by using curl. curl -X POST "http://jenkins.local/jenkins/job/test/buildWithParameters?GIT_BRANCH=develpment" -u userd:1197084e4d98207d89d42ca05df15ec999
    I added GIT_BRANCH=development under Parameterized Builds for Jenkins on BB and the jobs does not even start. Not sure why is not working!. I tested by creating a branch on BB. The same process work if I change my Jenkins job to do not expect parameters
    Austin Hacker
    @a-hacker

    @h2oboy could you create a github issue for this? Please include the version of "Parameterized Builds for Jenkins" that you are using.

    As for passing json parameters, I have not used them before so I'm not sure if they are supported or not. That would depend on how they are passed through the rest api. If they are different than other parameters though, they would not be supported.

    Daniel CABRERA
    @h2oboy
    I am running a jenkins job passing the following build parameters -> GIT_BRANCH=$BRANCH. The job get exectuted when I create a new branch (as expected). If I change the build parameters to -> GIT_BRANCH="{"branchType":"Mybranch"}", the job does not get even executed. Am I amble to pass any random string ?
    @a-hacker
    Daniel CABRERA
    @h2oboy
    seams like it does not like the special characters "{" . Itried using adding /{ but still not luck
    miron
    @miron5555_gitlab

    Hi,

    I am trying to put together a manual and also event based build possibility between Bitbucket Server and Jenkins, and for this I use the Bitbucket "Parameterized Builds for Jenkins" and the Jenkins "Bitbucket Branch Source" plug-ins.

    Does anyone have an experience, whether this "Parameterized Builds for Jenkins" plug-in can support the Jenkins Multibranch Pipeline and/or Bitbucket Team/Project job types?

    I am trying to use jobs with jenkinsfiles and repo scanning with multiple branches, so based on docs, this sounds perfect, but somehow does not do the job.

    Experiences:

    with bitbucket team job type: the behavior is different if I use in Bitbucket job settings:
    -> job/hook with multiple branch checkbox not checked in -> build is triggered but nothing happens in Jenkins -> see the Jenkins error message at the bottom...(seems it comes to Jenkins but maybe the HTML/json body is incorrect)
    -> job/hook with multiple branch checkbox checked in -> job not found (and I see nothing in the Jenkins logs)

    with multibranch job type: the behavior is always the same:
    -> job/hook with multiple branch checkbox not checked in -> job not found (and I see nothing in the Jenkins logs)

    -> job/hook with multiple branch checkbox checked in -> job not found (and I see nothing in the Jenkins logs)

    On the other hand, with some simple job types, e.g. with a simple freestyle job with a simple command/shell, the build can be triggered from Bitbucket and also I can see it executed in Jenkins.

    So really looks/feels like, that the multibranch job types I am selecting are not supported somehow by this plug-in.

    Did anyone manage to make it working?

    Thanks in advance for the support.

    Daniel CABRERA
    @h2oboy
    @miron5555_gitlab did you try to trigger the job using curl and passing the right parameters ? That will help to discard any connectivity issues
    Austin Hacker
    @a-hacker

    @miron5555_gitlab Parameterized Builds for Jenkins does provide multibranch pipeline support. However, the job type isn't supported amazingly. Some trigger types will trigger a scan while others trigger a build based on the branch name only. Depending on your configuration, it may not work well for you. If the job is not being found though, then you may have the name set incorrectly. This can happen if the job is in a folder or some other nested path.

    As for Bitbucket Team/Project job types, I am unsure how they work. If they use the standard jenkins rest API for triggering jobs they should work though.

    miron
    @miron5555_gitlab
    I have luckily made it work. :)
    I realised, that these type of jobs are in some kind of a "folder" (multibranch pipeline project name). For a "simple-freestyle-job" it's easy - in BB you just create hook with the same name: "simple-freestyle-job". For multibranch pipelines, you have to include the name of a that folder. Let's say you've created folder with the name "multibranch-pipeline", and you set up the bitbucket plugin in its configurations. Then in BB, when you want to create a hook for triggering build over "feature" branch or "master" branch, you have to name this hook in this format: "<folderName>/<jobName>/" -> e.g. "multibranch-pipeline/feature/" or "multibranch-pipeline/master/". You also have to make sure that checkbox "Multibranch Pipeline" is NOT marked. Quite strange/funny, seems like it still needs some documentation. Or maybe I have accidentally found a workaround, but it works. :)
    Thanks anyway.
    hattsann
    @hattsann
    In a trigger on BitBucket hook settings, if a build parameter is 'true' as default(e.g. KEY=true), UI does not check on the checkbox. Is it known issue?
    Austin Hacker
    @a-hacker

    @miron5555_gitlab If you want to trigger a build of a specific branch that works. However, if you want to trigger scans of the multibranch pipeline parent job, you would need to have the "Multibranch Pipeline" checkbox checked. The idea is to allow scans to happen only when they need to rather than polling on a regular basis.

    @hattsann what version of the plugin are you using? I know I've seen that issue come up before but I thought it had already been fixed.

    Daniel CABRERA
    @h2oboy
    @a-hacker I got the latest plugin and I added my token and save/test the connection with Jenkins. Everthing goes well. If I come back to Jenkins Settings and I try to test Jenkins Settings the connection fails, because the token was not saved
    Austin Hacker
    @a-hacker
    @h2oboy I believe that the token is saved. However, when the page is rerendered the token is not populated on the page. This is because the api token is a secret and should be treated as such. The test settings button uses what's currently on the page so it will be missing the token and fail as you've observed.
    Daniel CABRERA
    @h2oboy
    @a-hacker will be nice to some how allow the user to use the Test Jenkins Settings and maybe mask the token to verify if there still connectivity between the 2 parties
    Austin Hacker
    @a-hacker
    I agree. I'm not super happy with the current token handling but wanted to get something in place to stop exposing the token directly on the page. There is definitely room for improvement.
    Pär Lindfors
    @hasterhorb
    Hi , i have been running Parameterized Builds for a year or so on Bitbucket 5, working great! After upgrading to BB 6, i also updated to Parameterized Builds v4.0.5 where things stopped to work. After checking what url was sent to Jenkins, it looks like the URL is not kept when passing it around. I run my Jenkins behind a proxy on URL http://ci.domain.com/jenkins, but "jenkins" is stripped away in 4.0.5 and 4.0.4, resulting in "job not found". It works again in 4.0.3 which im currently running. Is this a bug?
    Austin Hacker
    @a-hacker
    4.0.4 included a change to the way the Jenkins url is built. It's entirely possible that the path elements are being stripped as a result of this change. Could you open an issue for this?
    Pär Lindfors
    @hasterhorb
    Yes, i will do it! Thanks!
    Salih Pala
    @spala_gitlab

    Hi everybody,

    I'm using "parametrized build for jenkins" on bitbucket (server). I've added a lot of definitions before. But now I get an error when I want to add a new definition.

    I don't know how to solve it. Can you help me ?

    version: Atlassian Bitbucket v6.0.1

    error: An error occurred while processing the request. Check the server logs for more information.

    I've defined 63 before. My old definitions look and work. But every time I try to identify a new one, it makes these mistakes.

    my latest logs

    2019-09-30 13:04:07,682 ERROR [https-jsse-nio-8443-exec-217] admin.user @FSWYL5x784x118424x0 1y8r9yz 213.74.20.110:50407,0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/TOW/repos/services/settings/hooks/com.kylenicholls.stash.parameterized-builds:parameterized-build-hook/enabled HTTP/1.1" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exception while processing REST request: "PUT /rest/api/latest/projects/TOW/repos/microservices/settings/hooks/com.kylenicholls.stash.parameterized-builds:parameterized-build-hook/enabled HTTP/1.1"
    java.lang.IllegalArgumentException: The provided LOB data is too long
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:141)
    at com.atlassian.stash.internal.setting.InternalSharedLob$Builder.data(InternalSharedLob.java:86)
    at com.atlassian.stash.internal.repository.InternalRepositoryHook$Builder.settings(InternalRepositoryHook.java:226)
    at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.updateHook(DefaultRepositoryHookService.java:839)
    at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.setEnabled(DefaultRepositoryHookService.java:807)
    at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.enable(DefaultRepositoryHookService.java:206)
    at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
    at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
    at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
    at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
    at com.atlassian.stash.internal.rest.hook.RepositoryHookResourceHelper.enableHook(RepositoryHookResourceHelper.java:71)
    at com.atlassian.stash.internal.rest.hook.RepositoryHookRepositoryResource.enableHook(RepositoryHookRepositoryResource.java:108)
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
    at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92)
    at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
    at com.atlassian.bitbucket.internal.xcode.web.XcodeUserAgentFilter.doFilter(XcodeUserAgentFilter.java:36)
    at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
    at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81)
    at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
    at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFi

    Zsolt Dénes
    @ronhks

    Hi all!

    Before I write a bug report, I would like to check the problem here:

    • Parameterized Builds for Jenkins version: 4.0.5 - latest
    • Bitbucket version: 6.7.1 - latest
    • Jenkins version: 2.190.1 - latest LTS
    • Crowd version: 6.6.0 - latest
    • Crowd-2-Jenkins-plugin version: 2.0.1 - latest
    • Any Jenkins or Bitbucket settings that could be relevant
    • We expreinced fail to start build from Bitbucket with the plugin.
    • FACTS:
      • We have used crowd to auth from the begining.
      • We use the The Parameterized Builds for Jenkins plugin (henceforward: plugin) with a technikal user (for example robot).
      • We generated a token with this robot user and we used the plugin with pleasure.
      • After the last upgrade, we can not start build from bitbucket. :/
    • From my investigation, I came to the plugin not pushes the token to start the job, it uses the logged in username/sessionID. I though it, beacuse in the jenkins.log I found when I push on build manuially from bitbucket
      jenkins.log : d.t.j.c.CrowdAuthenticationManager#authenticate: Application name and/or password are not valid.
      BUT
      in the crowd log, I don't see the technical user (robot) tries, just only this line:
      atlassian-crowd.log : [crowd.manager.application.ApplicationServiceGeneric] Invalid credentials for user zsolt.denes in directory XYZ, aborting˛
      So we connected the bitbucket to jenkins with tecnical user robot but it tries to login in my name to start a build.

    So right now, I don't know makes the mistake. Can You check, the jenkins's token process handling not changed? Of course, I also write to the Jenkins Crowd-2.plugin developers.

    Thanks a lot your energy for this work!

    Gr,
    Zsolt

    Zsolt Dénes
    @ronhks
    I reported at crowd-2 plugin site: https://issues.jenkins-ci.org/browse/JENKINS-59666
    Austin Hacker
    @a-hacker
    @ronhks do you have credentials set in the "Jenkins Settings" within your account page? If so, those will override whatever you have set as the default credentials.
    Zsolt Dénes
    @ronhks
    @a-hacker Thanks for yout advice! Previously we didn't set it on the robot account, but it worked (we set on the bitbucket main settings ). I set it righnt now on the account page , but nothing changed. :(
    In jenkins.log I see the same error d.t.j.c.CrowdAuthenticationManager#authenticate: Application name and/or password are not valid. :/
    Zsolt Dénes
    @ronhks
    @a-hacker I upgraded the Parameterized Builds for Jenkins plugin to 4.0.7 and the error msg changed. I refered to the addre page settings. I set it up in my account, and everything worked. So this changed from 4.0.5 to 4.0.7 beacuse neither our user set it berfore
    In this case, what the globally set token do?
    Austin Hacker
    @a-hacker
    @ronhks from 4.0.5 to 4.0.7 the only real change to requests was how the url path was being built. Maybe the core issue you were facing was different and these log messages were obfuscating the real issue? Either way, I don't have experience with Crowd so I don't know what it is doing or why your machine user does not seem to be able to authenticate. Since your credentials seem to work, you may want to just use your credentials as the default user/token settings or require everyone to set up their account Jenkins settings.
    dreemoutloud
    @dreemoutloud
    Good afternoon. Please excuse a newbie question. When we merge to master, two invocations of our jenkins job run. I suspect this is because we have both
    "PUSH EVENT" and "PR MERGED" triggers enabled; the merge is invoking the latter and (I suspect) the commit within the merge is invoking the former. Is the correct? Is there an exhaustive definition of what counts as a "PUSH EVENT"?
    Austin Hacker
    @a-hacker

    Hi @dreemoutloud. All questions are welcome here, no need to worry! That is exactly what is happening. A push event triggers whenever the contents of a branch are updated. This could be adding new commits, removing commits, rebasing the branch, etc.

    Personally, I prefer using the PUSH EVENT trigger with a branch filter for your target branch. Even though master may be locked down such that all changes have to go through PRs, what I really care about is that my job builds when master is updated. This is dependent on your workflow though and what matters to you.

    dreemoutloud
    @dreemoutloud
    Thank you @a-hacker :)