Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git buildpack no pipeline defined for kind pullrequest #102

Open
afewellvmware opened this issue Apr 5, 2020 · 0 comments
Open

git buildpack no pipeline defined for kind pullrequest #102

afewellvmware opened this issue Apr 5, 2020 · 0 comments

Comments

@afewellvmware
Copy link

git buildpack errors on pullrequest pipeline if no override or pullrequest pipeline added in jenkins-x.yml file.

I am using jenkins-x with tekton on k8s:

NAME               VERSION
jx                 2.0.1185
Kubernetes cluster v1.14.10-gke.27
kubectl            v1.17.2
helm client        Client: v2.14.3+g0e7f3b6
git                2.17.1
Operating System   Ubuntu 18.04.3 LTS

If I use a jenkins-x.yml file with git buildpack and no overrides/pullrequest steps defined, I get the following error:
failed to generate Tekton CRDs: unable to extract the requested pipeline: no pipeline defined for kind pullrequest

I have tried this on several repos, brand new repos with a single-line jenkins-x.yml with one line buildPack: git, I also had repos already working with the git buildpack but with a override set for the pullRequest pipeline, in which case it works with no problem. But I made a change to my standard pipeline for several repos, which uses the git buildpack and a custom pullRequest pipeline step ... I moved my custom command from the pullRequest pipeline to the release pipeline and so my resulting jenkins-x.yml file only defined a release pipeline step. Once I made that change, the pipelines stopped working and started producing the error above.

I then added a placeholder step for the pullrequest pipeline to my jenkins-x.yml file, and the pipeline started working again.

So it appears if I do not have some step defined for the pullRequest pipeline when in a jenkins-x.yml file using the git buildpack, it will not find a default pullRequest pipe and will produce the above error.

Here is my currently working jenkins-x.yml file with a placeholder step for the pullrequest pipeline:

buildPack: git
pipelineConfig:
  pipelines:
    pullRequest:
      postBuild:
        steps:
        - command: echo "echo from the pullRequest postBuild pipeline step"   
    release:
      postBuild:
        steps:
        - command: ./pipescripts/post-merge-run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant