• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • build-blocker-plugin
    • None
    • 165.v5ecb_fb_f61520

      blocking property support all jobs including pipeline (symbol was also added on https://github.com/jenkinsci/build-blocker-plugin/commit/c472151589710de894ff54a4ab278839b3280c35

      But I would like to setup such property at folder level for all jobs inherit the property by default. Folder or multibranch pipeline

      It will avoid duplicating code at pipeline level and enforce such blocking status by person configuring job (like via JobDSL) and the ones implementing the pipeline.

       

        1. blocking1.PNG
          blocking1.PNG
          11 kB
        2. blocking2.PNG
          blocking2.PNG
          6 kB
        3. blocking3.PNG
          blocking3.PNG
          37 kB
        4. image-2024-04-19-05-04-00-587.png
          image-2024-04-19-05-04-00-587.png
          47 kB
        5. screenshot-1.png
          screenshot-1.png
          86 kB

          [JENKINS-72588] Support for folder properties

          Denis Mone added a comment - - edited

          It seems that repo.jenkins-ci.org is in maintenance mode and it hasn't recovered yet
          I haven't build Jenkins after the incremental changes on my machine and i can't download {}io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7{}

          I can't build and test out the feature until that issue is resolved.

          PS. Pasted wrong url.

          Denis Mone added a comment - - edited It seems that repo.jenkins-ci.org is in maintenance mode and it hasn't recovered yet I haven't build Jenkins after the incremental changes on my machine and i can't download { }io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7{ } I can't build and test out the feature until that issue is resolved. PS. Pasted wrong url.

          Which issue you are talking about ?

          I didn't saw anything on the infra list nor helpdesk 

           

          Valentin Delaye added a comment - Which issue you are talking about ? I didn't saw anything on the infra list nor helpdesk   

          Denis Mone added a comment - - edited

          In more details.
          I am facing the following error when i execute mvn hpi:run

          [22:29:21] ❯ mvn hpi:run
          Downloading from snapshots: https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom
          [ERROR] Error executing Maven.
          [ERROR] Extension io.jenkins.tools.incrementals:git-changelist-maven-extension:1.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7
          [ERROR] Caused by: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7
          [ERROR] Caused by: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7
          [ERROR] Caused by: Could not transfer artifact io.jenkins.tools.incrementals:git-changelist-maven-extension:pom:1.7 from/to snapshots (https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos): authorization failed for https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden
          [ERROR] Caused by: Could not transfer artifact io.jenkins.tools.incrementals:git-changelist-maven-extension:pom:1.7 from/to snapshots (https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos): authorization failed for https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden
          [ERROR] Caused by: authorization failed for https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden
          

          I know i can build the plugin -thus proving i have access to jenkins artifactory- since i did so when testing the above PR.
          Right now i face the above error and i can only assume that the issue is related to the repo.jenkins-ci.org maintenance.

          Plus searching for git-changelist-maven-extension artifact shows some pretty old artifacts circa 2020
          I don't know if this is related but i am pasting it as an additional information.

          Denis Mone added a comment - - edited In more details. I am facing the following error when i execute mvn hpi:run [22:29:21] ❯ mvn hpi:run Downloading from snapshots: https: //repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom [ERROR] Error executing Maven. [ERROR] Extension io.jenkins.tools.incrementals:git-changelist-maven-extension:1.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7 [ERROR] Caused by: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7 [ERROR] Caused by: Failed to read artifact descriptor for io.jenkins.tools.incrementals:git-changelist-maven-extension:jar:1.7 [ERROR] Caused by: Could not transfer artifact io.jenkins.tools.incrementals:git-changelist-maven-extension:pom:1.7 from/to snapshots (https: //repo.jenkins-ci.org/artifactory/remote-snapshot-repos): authorization failed for https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden [ERROR] Caused by: Could not transfer artifact io.jenkins.tools.incrementals:git-changelist-maven-extension:pom:1.7 from/to snapshots (https: //repo.jenkins-ci.org/artifactory/remote-snapshot-repos): authorization failed for https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden [ERROR] Caused by: authorization failed for https: //repo.jenkins-ci.org/artifactory/remote-snapshot-repos/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom, status: 403 Forbidden I know i can build the plugin -thus proving i have access to jenkins artifactory- since i did so when testing the above PR. Right now i face the above error and i can only assume that the issue is related to the repo.jenkins-ci.org maintenance . Plus searching for git-changelist-maven-extension artifact shows some pretty old artifacts circa 2020 I don't know if this is related but i am pasting it as an additional information.

          I think you have some issue with a maven settings you are using. I try from an empty cache and no settings and I can build as expected

          mvn clean hpi:run -Dport=8080 -Dhost=0.0.0.0                                                                     [0][pts/0][5:39:01]
          Downloading from central: https://repo.maven.apache.org/maven2/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom
          Downloaded from central: https://repo.maven.apache.org/maven2/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom
          ....
          
          Hit <enter> to redeploy:
          
          2024-04-05 03:56:16.042+0000 [id=102]   INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
          2024-04-05 03:56:16.325+0000 [id=105]   INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /home/vald/git/github/build-blocker-plugin/work/plugins/javax-mail-api.jpi
          2024-04-05 03:56:16.642+0000 [id=104]   INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
          2024-04-05 03:56:17.486+0000 [id=101]   INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
          2024-04-05 03:56:17.500+0000 [id=107]   INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
          2024-04-05 03:56:17.504+0000 [id=103]   INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
          2024-04-05 03:56:17.765+0000 [id=105]   INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
          2024-04-05 03:56:17.765+0000 [id=101]   INFO    jenkins.InitReactorRunner$1#onAttained: System config adapted
          2024-04-05 03:56:17.766+0000 [id=101]   INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
          2024-04-05 03:56:17.767+0000 [id=101]   INFO    jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
          2024-04-05 03:56:17.781+0000 [id=102]   INFO    jenkins.model.Jenkins#setInstallState: Install state transitioning from: null to : DEVELOPMENT
          2024-04-05 03:56:17.792+0000 [id=120]   INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
          2024-04-05 03:56:17.896+0000 [id=106]   INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
          2024-04-05 03:56:18.466+0000 [id=96]    INFO    hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
          2024-04-05 03:56:27.019+0000 [id=120]   INFO    h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
          2024-04-05 03:56:27.020+0000 [id=120]   INFO    hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
          

          The issue is probably you are trying to use repo.jenkins-ci.org as a mirror of maven central

          Valentin Delaye added a comment - I think you have some issue with a maven settings you are using. I try from an empty cache and no settings and I can build as expected mvn clean hpi:run -Dport=8080 -Dhost=0.0.0.0                                                                     [0][pts/0][5:39:01] Downloading from central: https: //repo.maven.apache.org/maven2/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom Downloaded from central: https: //repo.maven.apache.org/maven2/io/jenkins/tools/incrementals/git-changelist-maven-extension/1.7/git-changelist-maven-extension-1.7.pom .... Hit <enter> to redeploy: 2024-04-05 03:56:16.042+0000 [id=102] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization 2024-04-05 03:56:16.325+0000 [id=105] INFO hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /home/vald/git/github/build-blocker-plugin/work/plugins/javax-mail-api.jpi 2024-04-05 03:56:16.642+0000 [id=104] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins 2024-04-05 03:56:17.486+0000 [id=101] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins 2024-04-05 03:56:17.500+0000 [id=107] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins 2024-04-05 03:56:17.504+0000 [id=103] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions 2024-04-05 03:56:17.765+0000 [id=105] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded 2024-04-05 03:56:17.765+0000 [id=101] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted 2024-04-05 03:56:17.766+0000 [id=101] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs 2024-04-05 03:56:17.767+0000 [id=101] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated 2024-04-05 03:56:17.781+0000 [id=102] INFO jenkins.model.Jenkins#setInstallState: Install state transitioning from: null to : DEVELOPMENT 2024-04-05 03:56:17.792+0000 [id=120] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server 2024-04-05 03:56:17.896+0000 [id=106] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization 2024-04-05 03:56:18.466+0000 [id=96] INFO hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running 2024-04-05 03:56:27.019+0000 [id=120] INFO h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller 2024-04-05 03:56:27.020+0000 [id=120] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1 The issue is probably you are trying to use repo.jenkins-ci.org as a mirror of maven central

          Denis Mone added a comment -

          You are right.
          I started with a clean settings.xml and i managed to run the plugin locally.
          I'll keep you posted on the review.

          Denis Mone added a comment - You are right. I started with a clean settings.xml and i managed to run the plugin locally. I'll keep you posted on the review.

          Hi!

          Were you able to perform the necessary review on your side ?

          I'm quiet impatient to have this merged and released

          Thanks!

          Valentin Delaye added a comment - Hi! Were you able to perform the necessary review on your side ? I'm quiet impatient to have this merged and released Thanks!

          Denis Mone added a comment -

          I was caught up with work and personal issues the previous week.
          I have resumed the review process today.
          The code changes are good. I just want to run a couple some test pipeline jobs in order to verify the behaviour is correct.

          Denis Mone added a comment - I was caught up with work and personal issues the previous week. I have resumed the review process today. The code changes are good. I just want to run a couple some test pipeline jobs in order to verify the behaviour is correct.

          Denis Mone added a comment -

          Hi jonesbusy.
          I have been trying to test this change locally by spinning two docker containers and connecting them to Jenkins .
          Then i created two separate folder with one pipeline job on each.
          I have configured the folder to block on one another (I don't know if that's your actual use case) since this makes sense to me regarding your change proposal.
          When i trigger a job from the first folder and another from the second folder they don't block.
          Now as i said i may have misundrestood your use case, so could you please describe it in a bit more details here so that i understand correctly?

          Denis Mone added a comment - Hi jonesbusy . I have been trying to test this change locally by spinning two docker containers and connecting them to Jenkins . Then i created two separate folder with one pipeline job on each. I have configured the folder to block on one another (I don't know if that's your actual use case) since this makes sense to me regarding your change proposal. When i trigger a job from the first folder and another from the second folder they don't block. Now as i said i may have misundrestood your use case, so could you please describe it in a bit more details here so that i understand correctly?

          dmone The logic blocking strategy is the same. One job can block another.

          The only change is the job inherit the property from the folder

          Just create 2 folder with 2 pipeline

          folder1/pipeline1

          folder2/pipeline2

          And set blocking property per folder to

          folder1/.* on folder2

          folder2/.* on folder1

          You can see they block on each other. Really the only change there is the job inherit the property, there is no changes on the blocking logic

          No need to create complex test configuration. You can just test via

          mvn hpi:run -Dport=8080 -Dhost=0.0.0.0
          

          Create the 2 folder and set pipeline to 

          node {
             sleep 99999
          }
          

          See the evidence

          Thanks

          Valentin Delaye added a comment - dmone The logic blocking strategy is the same. One job can block another. The only change is the job inherit the property from the folder Just create 2 folder with 2 pipeline folder1/pipeline1 folder2/pipeline2 And set blocking property per folder to folder1/.* on folder2 folder2/.* on folder1 You can see they block on each other. Really the only change there is the job inherit the property, there is no changes on the blocking logic No need to create complex test configuration. You can just test via mvn hpi:run -Dport=8080 -Dhost=0.0.0.0 Create the 2 folder and set pipeline to  node { sleep 99999 } See the evidence Thanks

          Released on 165.v5ecb_fb_f61520

          Valentin Delaye added a comment - Released on 165.v5ecb_fb_f61520

            jonesbusy Valentin Delaye
            jonesbusy Valentin Delaye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: