Set up a Jenkins Piping Assembly with parameters

I read a lot about Jenkins 2.x and the pipeline system to create a setup with the following features:

  • Jenkins file managed by SCM.
  • Create each commit in the repository (git).
  • Passing parameters via a webhook trigger.

So far I have not been able to create a working setup for various reasons, some of the things I have tried:

Configuring multi-channel piping

  • My jenkins file from the git repository was fine-tuned.
  • Running via git notifyCommit

    webhook plugins works well ( http: // localhost: 8080 / git / notifyCommit? Url = ... )
  • It is not possible to pass additional parameters this way.

So, I was wondering if there is another way to run these builds? Triggered build remotely and shared webhook options are not displayed when configuring a multi-channel pipeline.

Plain pipeline

  • The pipeline jobs and trigger options mentioned earlier are available.
  • Selected 'Jenkinsfile from SCM' and used git.
  • Tried whitespace for "branches", tried refs / heads / **, ... a whole bunch of combinations.

Is Jenkins assuming in this case that there is a Jenkins file in each branch? It looks like the web host notifyCommit

is not even starting this.

If I force a manual build, Jenkins doesn't know what to build:

git fetch --tags --progress git@bitbucket.org:project.git +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/a
Seen branch in repository origin/master
Seen 2 remote branches
   git tag -l # timeout=10
   git rev-parse refs/tags/tagY^{commit} # timeout=10
   git rev-parse refs/tags/tagX^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

      

+3
git jenkins jenkins-pipeline


source to share


No one has answered this question yet

See similar questions:

1
How to avoid Jenkins running git commands in Jenkinsfile

or similar:

1432
How can I reconcile a separate head with a master / source?
879
Git workflow and rebase vs merge questions
854
Git for Beginners: The Ultimate Practical Guide
468
Various Ways to Remove Local Git Changes
eleven
Jenkins pipe: can multiple checks be avoided?
five
Jenkins Git Branch not working with environment variables
2
How to execute Jenkinsfile using gertrit trigger plugin for changeset in jenkins?
1
Jenkins Pipeline with Azure Web App Deployment
1
Industry indexing in jenkins multi-genre pipeline launches additional build already built by SCM poll



All Articles
Loading...
X
Show
Funny
Dev
Pics