Re: Converting to pipeline questions
On Wednesday, August 14, 2019 at 1:34:10 PM UTC-7, Louis Elston wrote: > > " build only the branches that you specify.". I am assuming that this is > something in the script that does this, as when creating the MultiBranch > job, I see no option to allow for the selection of doing executing the job > for only one branch. Not to harp on the documentation, but if this can be > done, then document it up front (with an example). This would make more > users understand that Blue Ocean may be more applicable than it currently > appears. > Documentation pull requests are certainly welcomed and encouraged. See https://github.com/jenkins-infra/jenkins.io . The multibranch pipeline that is created by Blue Ocean has a "Configure" page that allows you to limit the branch names which can be built.. In the "Behaviors" section of that "Configure" page you select the "Add" button and then select the row labeled "Filter by name (with wildcards)". If you need something more specific than wildcards will allow, you can use "Filter by name (with regular expressions)". [image: filter-by-branch-with-wildcard.png] I have a private GitHub repository that includes several branches. I confirmed that it was able to filter by branch name with wildcards. Thanks, Mark Waite > > On Wednesday, August 14, 2019 at 1:06:47 PM UTC-4, Mark Waite wrote: >> >> >> >> On Wed, Aug 14, 2019 at 8:36 AM Louis Elston wrote: >> >>> This morning, I basically did what you just recommended. I created a >>> new Pipeline job (not using Blue Ocean), selected "Pipeline Script from >>> SCM', and pointed to the Jenkinsfile that I had created yesterday in the >>> master branch. Because this job is not a MultiBranch job, even thought you >>> can run it in Blue Ocean, because there are no 'Branches', the pipeline >>> editor pencil will not appearyou cannot edit the script in Blue Ocean. >>> >>> Are there any plans to modify Blue ocean so that the editor can be used >>> on any declarative script, MultiBranch or not? If not, what is your >>> recommended alternative (besides the Pipeline Syntax \ Declarative >>> Directive Generator)? >>> >>> >> There are no plans to modify the Blue Ocean editor to be used on >> pipelines outside of multibranch. >> >> You might try using a multibranch pipeline and define the multibranch >> pipeline to build only the branches that you specify. Multibranch >> pipelines can be defined to build only a subset of the available branches. >> That would allow you to choose which branches are built based on the job >> definition of the multibranch pipeline and patterns for branch names, >> rather than creating individual jobs for each branch yourself. >> >> >>> Being that our development process does not involve test branches merged >>> up into the master, and instead is one branch per version of the product >>> where all development work is done, using a Multibranch job does not fit >>> our needs. At least that is my impression, in that we do not want to >>> possibly have builds being run for any previous versions of the product >>> just because they have a Jenkinsfile. >>> >>> On Wednesday, August 14, 2019 at 9:33:02 AM UTC-4, Mark Waite wrote: When you used those steps in Blue Ocean, you defined a Pipeline in the branch where the Jenkinsfile was stored by Blue Ocean. I think that is what you wanted in the SCM repository. You're correct that Blue Ocean created a multibranch pipeline as part of that editing process. If you'd like a job which is not a multibranch Pipeline, create that job interactively with the Jenkins "New Item" menu. Choose "Pipeline" as the item type and use "Pipeline from SCM" with the repository name and the branch name that you want to create. In that case, the Jenkinsfile must already exist in the repository. That's a less typical use case, since most users prefer to have Pipelines automatically created and deleted as branches are created and deleted on their git repository. If that is your preferred working model, then you could use Blue Ocean to create the Pipeline, delete the job which Blue Ocean created, then interactively create a Pipeline job which is not a multibranch Pipeline. Once the job is created (either through Blue Ocean as a multibranch pipeline or through the interactive "New Item" as a pipeline or through an organization folder), then you can use Blue Ocean to launch jobs and to view the execution progress of the pipeline. Thanks, Mark Waite On Tuesday, August 13, 2019 at 1:14:54 PM UTC-7, Louis Elston wrote: > > Mark Wrote..."Blue Ocean is not limited to multibranch Pipelines. You > can use the Blue Ocean editor to create a Pipeline in a git repository > that > has no Jenkinsfile on any branch." > > Can someone point me to an example of this? I have a GitHub
Subversion plugin problem
Hello, I am trying to install jenkins and ran into a Subversion plugin problem. I was referencing this guide - https://www.linuxtechi.com/install-configure-jenkins-on-centos-7-rhel-7/ and everything was working fine. > [#]$ rpm -qa | grep -i jenkins > jenkins-2.176.2-1.1.noarch However, when I attempt to "Install suggested plugins", all the plugins install except Subversion. I can download the subversion.hpi (version 2.12.2) from here http://updates.jenkins-ci.org/download/plugins/subversion/ but it takes a long while to connect. I see this in the /var/log/jenkins/jenkins.log: > at java.lang.Thread.run(Thread.java:748) > Caused by: java.io.IOException: Failed to load > http://updates.jenkins-ci.org/download/plugins/subversion/2.12.2/subversion.hpi > to /var/lib/jenkins/plugins/subversion.jpi.tmp > at > hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1181) > ... 7 more > Caused by: java.net.SocketTimeoutException: Read timed out Any suggestions on how to get around this issue? Thanks, Mike -- Michael Vrencur Ace Info Solutions, Inc. (AceInfo) Supporting NOAA Advanced Technology Branch Global Systems Division / Earth System Research Laboratory michael.vren...@noaa.gov 303.497.7526 -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/14163784-6f03-3a0b-c81c-aad3af91fe64%40noaa.gov.
Re: Converting to pipeline questions
In Blue Ocean, if you create a new pipeline, and there is a Jenkinsfile in any branch in that repository, when you select “Create Pipeline”, it will execute the Jenkinsfile in each of those branches. At this point, there is no ability to Configure anything. Yes, if you then configure that new job you can restrict it to only execute on a particular branch. This does not solve my problem. Lets say that in ProductVersion1 branch there was a Jenkinsfile. We are now Working on Version 2 of the product, and now have ProductVersion2 branch, which also has a JenkinsFile. If I create a new Blue Ocean pipeline job (which initially cannot be configured to only execute on the new branch), then I am also going to execute a build of the previous branch (which I do not want to do because that version of the product has been released). How to handle this, is it done in the script, in that I would need to edit the Jenkinsfiles in both branches before creating the new job? On Thursday, August 15, 2019 at 9:08:15 AM UTC-4, Mark Waite wrote: > > > > On Wednesday, August 14, 2019 at 1:34:10 PM UTC-7, Louis Elston wrote: >> >> " build only the branches that you specify.". I am assuming that this is >> something in the script that does this, as when creating the MultiBranch >> job, I see no option to allow for the selection of doing executing the job >> for only one branch. Not to harp on the documentation, but if this can be >> done, then document it up front (with an example). This would make more >> users understand that Blue Ocean may be more applicable than it currently >> appears. >> > > Documentation pull requests are certainly welcomed and encouraged. See > https://github.com/jenkins-infra/jenkins.io . > > The multibranch pipeline that is created by Blue Ocean has a "Configure" > page that allows you to limit the branch names which can be built.. In the > "Behaviors" section of that "Configure" page you select the "Add" button > and then select the row labeled "Filter by name (with wildcards)". If you > need something more specific than wildcards will allow, you can use "Filter > by name (with regular expressions)". > > [image: filter-by-branch-with-wildcard.png] > > I have a private GitHub repository that includes several branches. I > confirmed that it was able to filter by branch name with wildcards. > > Thanks, > Mark Waite > > >> >> On Wednesday, August 14, 2019 at 1:06:47 PM UTC-4, Mark Waite wrote: >>> >>> >>> >>> On Wed, Aug 14, 2019 at 8:36 AM Louis Elston >>> wrote: >>> This morning, I basically did what you just recommended. I created a new Pipeline job (not using Blue Ocean), selected "Pipeline Script from SCM', and pointed to the Jenkinsfile that I had created yesterday in the master branch. Because this job is not a MultiBranch job, even thought you can run it in Blue Ocean, because there are no 'Branches', the pipeline editor pencil will not appearyou cannot edit the script in Blue Ocean. Are there any plans to modify Blue ocean so that the editor can be used on any declarative script, MultiBranch or not? If not, what is your recommended alternative (besides the Pipeline Syntax \ Declarative Directive Generator)? >>> There are no plans to modify the Blue Ocean editor to be used on >>> pipelines outside of multibranch. >>> >>> You might try using a multibranch pipeline and define the multibranch >>> pipeline to build only the branches that you specify. Multibranch >>> pipelines can be defined to build only a subset of the available branches. >>> That would allow you to choose which branches are built based on the job >>> definition of the multibranch pipeline and patterns for branch names, >>> rather than creating individual jobs for each branch yourself. >>> >>> Being that our development process does not involve test branches merged up into the master, and instead is one branch per version of the product where all development work is done, using a Multibranch job does not fit our needs. At least that is my impression, in that we do not want to possibly have builds being run for any previous versions of the product just because they have a Jenkinsfile. On Wednesday, August 14, 2019 at 9:33:02 AM UTC-4, Mark Waite wrote: > > When you used those steps in Blue Ocean, you defined a Pipeline in the > branch where the Jenkinsfile was stored by Blue Ocean. I think that is > what you wanted in the SCM repository. You're correct that Blue Ocean > created a multibranch pipeline as part of that editing process. > > If you'd like a job which is not a multibranch Pipeline, create that > job interactively with the Jenkins "New Item" menu. Choose "Pipeline" as > the item type and use "Pipeline from SCM" with the repository name and > the > branch name that you want to create. In that
Re: Converting to pipeline questions
On Thu, Aug 15, 2019 at 12:20 PM Louis Elston wrote: > In Blue Ocean, if you create a new pipeline, and there is a Jenkinsfile in > any branch in that repository, when you select “Create Pipeline”, it will > execute the Jenkinsfile in each of those branches. At this point, there is > no ability to Configure anything. Yes, if you then configure that new job > you can restrict it to only execute on a particular branch. This does not > solve my problem. Lets say that in ProductVersion1 branch there was a > Jenkinsfile. We are now Working on Version 2 of the product, and now have > ProductVersion2 branch, which also has a JenkinsFile. If I create a new > Blue Ocean pipeline job (which initially cannot be configured to only > execute on the new branch), then I am also going to execute a build of the > previous branch (which I do not want to do because that version of the > product has been released). How to handle this, is it done in the script, > in that I would need to edit the Jenkinsfiles in both branches before > creating the new job? > Would it work for you if you took the following steps? 1. Use Blue Ocean to create the first Pipeline on the branch that is the current product version. Blue Ocean will create a multibranch pipeline job that will build all branches that contain a Jenkinsfile. At this point, there is only one branch, so only one job will be created 2. Edit the multibranch Pipeline job that Blue Ocean created, add the filter to specifically limit that job to only build the precise branch that is the currently active development branch 3. When the time comes in the future that you are ready to add a Jenkinsfile on a new, independent branch of the same repository, add it from Blue Ocean or copy it from one branch to another with Git operations. Commit to the new branch, knowing that the new branch won't be built because it does not match the pattern for branches being selected for the multibranch pipeline definition 4. When you're ready to enable the new branch, change the definition of the multibranch pipeline to build both old and new branches. 5. When you're ready to stop building the old branch, change the definition of the multibranch pipeline to only build the new branch I think that workflow will allow you to use the multibranch pipeline job to precisely define which branches are built and which are not built. Whether or not a Jenkinsfile exists on a branch, the multibranch pipeline job would define which branches are allowed to build and which are ignored. Thanks, Mark Waite > > > On Thursday, August 15, 2019 at 9:08:15 AM UTC-4, Mark Waite wrote: >> >> >> >> On Wednesday, August 14, 2019 at 1:34:10 PM UTC-7, Louis Elston wrote: >>> >>> " build only the branches that you specify.". I am assuming that this >>> is something in the script that does this, as when creating the MultiBranch >>> job, I see no option to allow for the selection of doing executing the job >>> for only one branch. Not to harp on the documentation, but if this can be >>> done, then document it up front (with an example). This would make more >>> users understand that Blue Ocean may be more applicable than it currently >>> appears. >>> >> >> Documentation pull requests are certainly welcomed and encouraged. See >> https://github.com/jenkins-infra/jenkins.io . >> >> The multibranch pipeline that is created by Blue Ocean has a "Configure" >> page that allows you to limit the branch names which can be built.. In the >> "Behaviors" section of that "Configure" page you select the "Add" button >> and then select the row labeled "Filter by name (with wildcards)". If you >> need something more specific than wildcards will allow, you can use "Filter >> by name (with regular expressions)". >> >> [image: filter-by-branch-with-wildcard.png] >> >> I have a private GitHub repository that includes several branches. I >> confirmed that it was able to filter by branch name with wildcards. >> >> Thanks, >> Mark Waite >> >> >>> >>> On Wednesday, August 14, 2019 at 1:06:47 PM UTC-4, Mark Waite wrote: On Wed, Aug 14, 2019 at 8:36 AM Louis Elston wrote: > This morning, I basically did what you just recommended. I created a > new Pipeline job (not using Blue Ocean), selected "Pipeline Script from > SCM', and pointed to the Jenkinsfile that I had created yesterday in the > master branch. Because this job is not a MultiBranch job, even thought > you > can run it in Blue Ocean, because there are no 'Branches', the pipeline > editor pencil will not appearyou cannot edit the script in Blue Ocean. > > Are there any plans to modify Blue ocean so that the editor can be > used on any declarative script, MultiBranch or not? If not, what is your > recommended alternative (besides the Pipeline Syntax \ Declarative > Directive Generator)? > > There are no plans to modify the Blu