jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.57k stars 787 forks source link

Unknown webhook in BitBucket Server #7204

Closed AntoineFr closed 4 years ago

AntoineFr commented 4 years ago

Summary

When I run jx import using BitBucket Server, an error is thrown after pushing the git repository :

error: create webhook request failed on *Project*/*Repo*: Status: 400 Bad Request, Body: {"errors":[{"context":"events[9].id","message":"the event pr:from_ref_updated is unknown","exceptionName":null}]}

Recently @abayer added a lot of improvements for Bitbucket Server (thank you!) but some features in https://github.com/jenkins-x/jx/commit/3bc47eae5ca832c8b615baa0329f36e356b01576 are too new for the Bitbucket Enterprise release (6.10), including the pr:from_ref_updated webhook which I guess was introduced in Bitbucket Server 7.0 (https://confluence.atlassian.com/bitbucketserver/bitbucket-server-release-notes-872139866.html#BitbucketServerreleasenotes-BitbucketServer7.0).

Steps to reproduce the behavior

Expected behavior

The repo is created and the webhooks are installed.

Actual behavior

An error is shown and no webhooks are added.

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.1.39
Kubernetes cluster v1.17.4
kubectl            v1.13.2
helm client        2.12.2
git                2.17.1
Operating System   Ubuntu 18.04.4 LTS

Kubernetes cluster

On premise

Operating system / Environment

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic
abayer commented 4 years ago

@AntoineFr Whoops! Sorry, I really should have thought about that. PR up at #7206 to check the server version before applying that webhook.

Briggybros commented 2 years ago

@abayer Seeing this issue again in jx 3.2.217