├── .editorconfig
├── .github
├── CODEOWNERS
├── dependabot.yml
└── workflows
│ ├── cd.yaml
│ ├── crowdin.yml
│ └── jenkins-security-scan.yml
├── .gitignore
├── .gitpod.yml
├── .mvn
├── extensions.xml
└── maven.config
├── CHANGELOG.old.md
├── CONTRIBUTING.md
├── Jenkinsfile
├── LICENSE.txt
├── PULL_REQUEST_TEMPLATE.md
├── README.md
├── crowdin.yml
├── pom.xml
└── src
├── doc
└── examples
│ ├── lock-nodes.md
│ ├── locking-multiple-stages-in-declarative-pipeline.md
│ ├── locking-random-free-resource.md
│ ├── readme.md
│ └── scripted-vs-declarative-pipeline.md
├── main
├── java
│ └── org
│ │ └── jenkins
│ │ └── plugins
│ │ └── lockableresources
│ │ ├── BackwardCompatibility.java
│ │ ├── ExcludeFromJacocoGeneratedReport.java
│ │ ├── FreeDeadJobs.java
│ │ ├── LockStep.java
│ │ ├── LockStepExecution.java
│ │ ├── LockStepResource.java
│ │ ├── LockableResource.java
│ │ ├── LockableResourceProperty.java
│ │ ├── LockableResources.java
│ │ ├── LockableResourcesManager.java
│ │ ├── RequiredResourcesProperty.java
│ │ ├── ResourceSelectStrategy.java
│ │ ├── actions
│ │ ├── LockableResourcesRootAction.java
│ │ ├── LockedResourcesBuildAction.java
│ │ └── ResourceVariableNameAction.java
│ │ ├── nodes
│ │ └── NodesMirror.java
│ │ ├── queue
│ │ ├── LockRunListener.java
│ │ ├── LockableResourcesQueueTaskDispatcher.java
│ │ ├── LockableResourcesStruct.java
│ │ ├── QueuedContextStruct.java
│ │ └── Utils.java
│ │ └── util
│ │ ├── Constants.java
│ │ └── SerializableSecureGroovyScript.java
├── resources
│ ├── index.jelly
│ └── org
│ │ └── jenkins
│ │ └── plugins
│ │ └── lockableresources
│ │ ├── LockStep
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ ├── config_cs.properties
│ │ ├── config_de.properties
│ │ ├── config_fr.properties
│ │ ├── config_sk.properties
│ │ ├── help-inversePrecedence.html
│ │ ├── help-label.html
│ │ ├── help-priority.html
│ │ ├── help-quantity.html
│ │ ├── help-resource.html
│ │ ├── help-resourceSelectStrategy.html
│ │ ├── help-skipIfLocked.html
│ │ └── help-variable.html
│ │ ├── LockStepResource
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ ├── config_cs.properties
│ │ ├── config_de.properties
│ │ ├── config_fr.properties
│ │ ├── config_sk.properties
│ │ ├── help-label.html
│ │ ├── help-quantity.html
│ │ └── help-resource.html
│ │ ├── LockableResource
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ ├── config_cs.properties
│ │ ├── config_de.properties
│ │ ├── config_fr.properties
│ │ └── config_sk.properties
│ │ ├── LockableResourceProperty
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ └── config_fr.properties
│ │ ├── LockableResourcesManager
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ ├── config_cs.properties
│ │ ├── config_de.properties
│ │ ├── config_fr.properties
│ │ └── config_sk.properties
│ │ ├── Messages.properties
│ │ ├── Messages_cs.properties
│ │ ├── Messages_de.properties
│ │ ├── Messages_fr.properties
│ │ ├── Messages_sk.properties
│ │ ├── RequiredResourcesProperty
│ │ ├── config.jelly
│ │ ├── config.properties
│ │ ├── config_cs.properties
│ │ ├── config_de.properties
│ │ ├── config_fr.properties
│ │ ├── config_sk.properties
│ │ ├── help-labelName.html
│ │ ├── help-resourceMatchScript.html
│ │ ├── help-resourceNames.html
│ │ ├── help-resourceNamesVar.html
│ │ └── help-resourceNumber.html
│ │ └── actions
│ │ ├── LockableResourcesRootAction
│ │ ├── _api.jelly
│ │ ├── index.jelly
│ │ ├── index.properties
│ │ ├── index_cs.properties
│ │ ├── index_de.properties
│ │ ├── index_fr.properties
│ │ ├── index_sk.properties
│ │ ├── noteForm.jelly
│ │ ├── tableLabels
│ │ │ ├── table.jelly
│ │ │ ├── table.properties
│ │ │ ├── table_cs.properties
│ │ │ ├── table_de.properties
│ │ │ ├── table_fr.properties
│ │ │ └── table_sk.properties
│ │ ├── tableQueue
│ │ │ ├── queue-too-long.js
│ │ │ ├── table.jelly
│ │ │ └── table.properties
│ │ └── tableResources
│ │ │ ├── table.jelly
│ │ │ ├── table.properties
│ │ │ ├── table_cs.properties
│ │ │ ├── table_de.properties
│ │ │ ├── table_fr.properties
│ │ │ └── table_sk.properties
│ │ └── LockedResourcesBuildAction
│ │ ├── index.jelly
│ │ ├── index.properties
│ │ ├── index_cs.properties
│ │ ├── index_de.properties
│ │ ├── index_fr.properties
│ │ └── index_sk.properties
└── webapp
│ ├── css
│ └── style.css
│ └── js
│ └── lockable-resources.js
└── test
├── java
└── org
│ └── jenkins
│ └── plugins
│ └── lockableresources
│ ├── ConcurrentModificationExceptionTest.java
│ ├── ConfigurationAsCodeTest.java
│ ├── DeclarativePipelineTest.java
│ ├── FreeStyleProjectTest.java
│ ├── InteroperabilityTest.java
│ ├── LockStepHardKillTest.java
│ ├── LockStepTest.java
│ ├── LockStepTestBase.java
│ ├── LockStepTest_manualUnreserveUnblocksJob.java
│ ├── LockStepTest_reserveInsideLockHonoured.java
│ ├── LockStepTest_setReservedByInsideLockHonoured.java
│ ├── LockStepWithRestartTest.java
│ ├── LockableResourceApiTest.java
│ ├── LockableResourceManagerTest.java
│ ├── LockableResourceRootActionSEC1361Test.java
│ ├── LockableResourceTest.java
│ ├── NodesMirrorTest.java
│ ├── PressureTest.java
│ ├── TestHelpers.java
│ ├── actions
│ └── LockableResourcesRootActionTest.java
│ └── util
│ └── SerializableSecureGroovyScriptTest.java
└── resources
├── org
└── jenkins
│ └── plugins
│ └── lockableresources
│ ├── casc_expected_output.yml
│ └── configuration-as-code.yml
└── plugins
└── jobConfigHistory.hpi
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 | charset = utf-8
8 |
9 | [*.{html,java,jelly,xml}]
10 | indent_style = space
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @jenkinsci/lockable-resources-plugin-developers
2 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2 |
3 | version: 2
4 | updates:
5 | - package-ecosystem: "maven"
6 | directory: "/"
7 | schedule:
8 | interval: "weekly"
9 | - package-ecosystem: "github-actions"
10 | directory: "/"
11 | schedule:
12 | interval: "weekly"
13 |
--------------------------------------------------------------------------------
/.github/workflows/cd.yaml:
--------------------------------------------------------------------------------
1 | # Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
2 |
3 | name: cd
4 | on:
5 | workflow_dispatch:
6 | check_run:
7 | types:
8 | - completed
9 |
10 | jobs:
11 | maven-cd:
12 | uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
13 | secrets:
14 | MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
15 | MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
16 |
--------------------------------------------------------------------------------
/.github/workflows/crowdin.yml:
--------------------------------------------------------------------------------
1 | # This workflow requires additional setup, see: https://jenkins.io/doc/developer/crowdin/
2 |
3 | name: Crowdin
4 |
5 | on:
6 | schedule:
7 | - cron: '0 */24 * * *'
8 | workflow_dispatch:
9 |
10 | permissions:
11 | actions: write
12 | contents: write
13 | pull-requests: write
14 |
15 | jobs:
16 | synchronize-with-crowdin:
17 | runs-on: ubuntu-latest
18 | if: github.repository_owner == 'jenkinsci'
19 |
20 | steps:
21 |
22 | - name: Checkout
23 | uses: actions/checkout@v4
24 |
25 | - name: crowdin action
26 | uses: crowdin/github-action@v2.7.0
27 | with:
28 | upload_translations: false
29 | download_translations: true
30 | skip_untranslated_files: true
31 | push_translations: true
32 | export_only_approved: true
33 | commit_message: 'New Crowdin translations'
34 | create_pull_request: true
35 | pull_request_title: 'Update localization'
36 | pull_request_labels: 'localization'
37 | base_url: 'https://jenkins.crowdin.com'
38 | config: 'crowdin.yml'
39 | env:
40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 | CROWDIN_PROJECT_ID: 26
42 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
43 |
--------------------------------------------------------------------------------
/.github/workflows/jenkins-security-scan.yml:
--------------------------------------------------------------------------------
1 | # Jenkins Security Scan
2 | # For more information, see: https://www.jenkins.io/doc/developer/security/scan/
3 |
4 | name: Jenkins Security Scan
5 |
6 | on:
7 | push:
8 | branches:
9 | - master
10 | pull_request:
11 | types: [opened, synchronize, reopened]
12 | workflow_dispatch:
13 |
14 | permissions:
15 | security-events: write
16 | contents: read
17 | actions: read
18 |
19 | jobs:
20 | security-scan:
21 | uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2
22 | with:
23 | java-cache: 'maven' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.
24 | # java-version: 21 # Optionally specify what version of Java to set up for the build, or remove to use a recent default.
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .DS_Store
3 | /.idea/
4 | /target/
5 | /work/
6 |
--------------------------------------------------------------------------------
/.gitpod.yml:
--------------------------------------------------------------------------------
1 | tasks:
2 | - init: mvn clean verify
3 |
4 | vscode:
5 | extensions:
6 | - bierner.markdown-preview-github-styles
7 | - vscjava.vscode-java-pack
8 | - redhat.java
9 | - vscjava.vscode-java-debug
10 | - vscjava.vscode-java-dependency
11 | - vscjava.vscode-java-test
12 | - vscjava.vscode-maven
13 |
--------------------------------------------------------------------------------
/.mvn/extensions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | io.jenkins.tools.incrementals
4 | git-changelist-maven-extension
5 | 1.8
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.mvn/maven.config:
--------------------------------------------------------------------------------
1 | -Pconsume-incrementals
2 | -Pmight-produce-incrementals
3 | -Dchangelist.format=%d.v%s
4 |
--------------------------------------------------------------------------------
/CHANGELOG.old.md:
--------------------------------------------------------------------------------
1 | # Old Changelog
2 |
3 | This is the old changelog, see
4 | [GitHub Releases](https://github.com/jenkinsci/lockable-resources-plugin/releases)
5 | for recent versions.
6 |
7 | ## Release 2.5 (2019-03-25)
8 |
9 | - [Fix security issue](https://jenkins.io/security/advisory/2019-03-25/)
10 |
11 | ## Release 2.4 (2019-01-18)
12 |
13 | - [JENKINS-46555](https://issues.jenkins-ci.org/browse/JENKINS-46555) - Fix NPE
14 | on invalid entries.
15 |
16 | ## Release 2.3 (2018-06-26)
17 |
18 | - [JENKINS-34433](https://issues.jenkins-ci.org/browse/JENKINS-34433) - Signal
19 | queued Pipeline tasks on unreserve
20 |
21 | - Allow locking multiple resources in Pipeline
22 |
23 | ## Release 2.2 (2018-03-06)
24 |
25 | - [JENKINS-40997](https://issues.jenkins-ci.org/browse/JENKINS-40997) - New
26 | configuration option to get the name of the locked resource inside the lock
27 | block (Pipeline).
28 |
29 | - [JENKINS-49734](https://issues.jenkins-ci.org/browse/JENKINS-49734) -
30 | Add a PauseAction to the build when waiting for locking, so Pipeline
31 | representations in the UI are correctly shown.
32 | - [JENKINS-43574](https://issues.jenkins-ci.org/browse/JENKINS-43574) - Fixed
33 | the "empty" resources lock (message: "acquired lock on \[\]")
34 |
35 | ## Release 2.1 (2017-11-13)
36 |
37 | - [JENKINS-47235](https://issues.jenkins-ci.org/browse/JENKINS-47235) -
38 | Trim whitespace from resource names.
39 | - [JENKINS-47754](https://issues.jenkins-ci.org/browse/JENKINS-47754) -
40 | Fix broken Freestyle behavior.
41 |
42 | ## Release 1.11.2 (2017-03-15)
43 |
44 | - [JENKINS-40368](https://issues.jenkins-ci.org/browse/JENKINS-40368) - Locked
45 | resources are not always freed up on Pipeline hard kill when there
46 | are other pipelines waiting on the Resource
47 |
48 | ## Release 1.11.1 (2017-02-20)
49 |
50 | - [JENKINS-40879](https://issues.jenkins-ci.org/browse/JENKINS-40879) - Locked
51 | areas are executed multiple times in parallel
52 |
53 | ## Release 1.11 (2016-12-19)
54 |
55 | - [JENKINS-34268](https://issues.jenkins-ci.org/browse/JENKINS-34268) -
56 | lock multiple resources concurrently
57 | - [JENKINS-34273](https://issues.jenkins-ci.org/browse/JENKINS-34273) -
58 | add the number of resources to lock from a given label
59 |
60 | ## Release 1.10 (2016-07-12)
61 |
62 | - [JENKINS-36479](https://issues.jenkins-ci.org/browse/JENKINS-36479) -
63 | properly clean up resources locked by hard-killed or deleted while
64 | in progress Pipeline builds.
65 |
66 | ## Release 1.9 (2016-06-01)
67 |
68 | - Reserved resources parameter visibility in environment (related to
69 | SECURITY-170)
70 |
71 | ## Release 1.8 (2016-04-14)
72 |
73 | - Pipeline compatibility: lock step
74 |
75 | ## Release 1.2 (2014-02-05)
76 |
77 | - Manual reservation/un-reservation of resources now require specific
78 | permissions
79 |
80 | ## Release 1.1 (2014-02-03)
81 |
82 | - Allow jobs to require a subset of specified resources (the number of required
83 | resources is configurable)
84 | - Allow manual reservation/un-reservation of resources
85 |
86 | ## Release 1.0 (2013-12-12)
87 |
88 | - Initial release
89 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | # Contributing
3 |
4 | If you want to contribute to this plugin, you probably will need a Jenkins plugin development
5 | environment. This basically means a current version of Java (Java 11 should probably be okay for now)
6 | and [Apache Maven]. See the [Jenkins Plugin Tutorial] for details.
7 | You could also go the [GitPod](https://gitpod.io/#https://github.com/jenkinsci/lockable-resources-plugin) way.
8 |
9 | If you have the proper environment, typing:
10 |
11 | ```sh
12 | mvn verify
13 | ```
14 |
15 | should create a plugin as `target/*.hpi`, which you can install in your Jenkins instance. Running
16 |
17 | ```sh
18 | mvn hpi:run
19 | ```
20 |
21 | allows you to spin up a test Jenkins instance on [localhost] to test your
22 | local changes before committing.
23 |
24 | [Apache Maven]: https://maven.apache.org/
25 | [Jenkins Plugin Tutorial]: https://jenkins.io/doc/developer/tutorial/prepare/
26 | [localhost]: http://localhost:8080/jenkins/
27 |
28 | ## Code Style
29 |
30 | This plugin tries to migrate to [Google Java Code Style], please try to adhere to that style
31 | whenever adding new files or making big changes to existing files. If your IDE doesn't support
32 | this style, you can use the [fmt-maven-plugin], like this:
33 |
34 | ```sh
35 | mvn fmt:format -DfilesNamePattern=ChangedFile\.java
36 | ```
37 |
38 | to reformat Java code in the proper style.
39 |
40 | [Google Java Code Style]: https://google.github.io/styleguide/javaguide.html
41 | [fmt-maven-plugin]: https://github.com/coveo/fmt-maven-plugin
42 |
43 | ## Code coverage
44 |
45 | Test coverage is a percentage measure of the degree to which the source code of a program is executed when a test is run. A program with high test coverage has more of its source code executed during testing, which suggests it has a lower chance of containing undetected software bugs compared to a program with low test coverage. The best way to improve code coverage is writing of automated tests.
46 |
47 | To get local line-by-line coverage report execute this command
48 |
49 | ```sh
50 | mvn -P enable-jacoco clean verify jacoco:report
51 | ```
52 |
53 | The report is then located in *target/site/jacoco/index.html*.
54 |
55 | ## License
56 |
57 | The MIT License (MIT)
58 |
59 | - Copyright 2013-2015 6WIND
60 | - Copyright 2016-2018 Antonio Muñiz
61 | - Copyright 2019 TobiX
62 | - Copyright 2017-2022 Jim Klimov
63 |
64 | See [LICENSE](LICENSE.txt)
65 |
66 | ## Localization
67 |
68 | [](https://jenkins.crowdin.com/lockable-resources-plugin)
69 |
70 | Internationalization documentation for Jelly, Java and Groovy can be found [here](https://www.jenkins.io/doc/developer/internationalization/).
71 |
72 | To translate this plugin we recommend to use [Crowdin](https://jenkins.crowdin.com/lockable-resources-plugin).
73 |
74 | Read on [how to use the crowdin web interface](https://www.jenkins.io/doc/developer/crowdin/) to translate plugins.
75 |
76 | When you want to help us, please create a new [feature request](https://github.com/jenkinsci/lockable-resources-plugin/issues/new?assignees=&labels=enhancement&template=2-feature-request.yml) with following content
77 |
78 | Title:
79 | l10n: \
80 | Description
81 | I would provide new (or update) translations for \
82 |
83 | We will then add you to the Crowdin project.
84 |
85 | For short translations / updates we can also send you invitation (time limited)
86 |
87 | **Privacy policy notice**
88 | When you start translating via Crowdin service, your browsers will send cookies to Crowdin so that Crowdin can identify translators contributing to the project. You might need to update the privacy policy to reflect this aspect of cookies usage.
89 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | /*
2 | See the documentation for more options:
3 | https://github.com/jenkins-infra/pipeline-library/
4 | */
5 | buildPlugin(
6 | forkCount: '1C', // Run parallel tests on ci.jenkins.io for lower costs, faster feedback
7 | useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
8 | configurations: [
9 | [platform: 'linux', jdk: 21],
10 | [platform: 'windows', jdk: 17],
11 | ])
12 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright 2013-2015, 6WIND S.A. All rights reserved.
4 | Copyright 2016-2018, Antonio Muñiz
5 | Copyright 2019, TobiX
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | See [JENKINS-XXXXX](https://issues.jenkins.io/browse/JENKINS-XXXXX).
7 |
8 | See #XXXXX
9 |
10 |
11 |
18 |
19 | ### Testing done
20 |
21 |
30 |
31 | ### Proposed upgrade guidelines
32 |
33 | N/A
34 |
35 | ### Localizations
36 |
37 |
45 |
46 | - [ ] English
47 | - [ ] German
48 | - [ ] French
49 | - [ ] Slovak
50 | - [ ] Czech
51 | - [ ] ...
52 |
53 | ### Submitter checklist
54 |
55 | - [ ] The Jira / Github issue, if it exists, is well-described.
56 | - [ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see [examples](https://github.com/jenkins-infra/jenkins.io/blob/main/content/_data/changelogs/weekly.yml)).
57 | - The changelog generator for plugins uses the **pull request title as the changelog entry**.
58 | - Fill in the **Proposed upgrade guidelines** section only if there are breaking changes or changes that may require extra steps from users during the upgrade.
59 | - [ ] There is automated testing or an explanation that explains why this change has no tests.
60 | - [ ] New public functions for internal use only are annotated with `@NoExternalUse`. In case it is used by non java code the `Used by {@code .jelly}` Javadocs are annotated.
61 |
66 | - [ ] New or substantially changed JavaScript is not defined inline and does not call `eval` to ease the future introduction of Content Security Policy (CSP) directives (see [documentation](https://www.jenkins.io/doc/developer/security/csp/)).
67 | - [ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.
68 | - [ ] For new APIs and extension points, there is a link to at least one consumer.
69 | - [ ] Any localizations are transferred to *.properties files.
70 | - [ ] Changes in the interface are documented also as [examples](src/doc/examples/readme.md).
71 |
72 | ### Maintainer checklist
73 |
74 | Before the changes are marked as `ready-for-merge`:
75 |
76 | - [ ] There is at least one (1) approval for the pull request and no outstanding requests for change.
77 | - [ ] Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
78 | - [ ] Changelog entries in the **pull request title** and/or **Proposed changelog entries** are accurate, human-readable, and in the imperative mood.
79 | - [ ] Proper changelog labels are set so that the changelog can be generated automatically. See also [release-drafter-labels](https://github.com/jenkinsci/.github/blob/ce466227c534c42820a597cb8e9cac2f2334920a/.github/release-drafter.yml#L9-L50).
80 | - [ ] If the change needs additional upgrade steps from users, the `upgrade-guide-needed` label is set and there is a **Proposed upgrade guidelines** section in the pull request title (see [example](https://github.com/jenkinsci/jenkins/pull/4387)).
81 | - [ ] java code changes are tested by automated test.
82 |
--------------------------------------------------------------------------------
/crowdin.yml:
--------------------------------------------------------------------------------
1 | project_id_env: CROWDIN_PROJECT_ID
2 | api_token_env: CROWDIN_PERSONAL_TOKEN
3 | files:
4 | - source: /src/main/resources/org/jenkins/plugins/lockableresources/**/*.properties
5 | ignore_settings: 1
6 | ignore:
7 | - /src/main/resources/org/jenkins/plugins/lockableresources/**/%file_name%_%two_letters_code%.properties
8 | translation: /src/main/resources/org/jenkins/plugins/lockableresources/**/%file_name%_%two_letters_code%.properties
9 |
--------------------------------------------------------------------------------
/src/doc/examples/lock-nodes.md:
--------------------------------------------------------------------------------
1 | # Examples
2 |
3 | ## Node dependent resources
4 |
5 | Locking a resource that depends on a specific node can be very helpful in many cases.
6 | That means a job must pick a target node that has the requested resource available.
7 |
8 | ```groovy
9 | // allocate node
10 | node('some-build-node') {
11 | // Lock resource named *whatever-resource-some-build-node*
12 | lock("whatever-resource-${env.NODE_NAME}") {
13 | echo "Running on node ${env.NODE_NAME} with locked resource ${env.LOCKED_RESOURCE}"
14 | }
15 | }
16 | ```
17 |
18 | But much more useful is lock node first.
19 |
20 | ```groovy
21 | // Lock resource named *some-build-node*
22 | lock('some-build-node') {
23 | // allocate node
24 | node(env.LOCKED_RESOURCE) {
25 |
26 | echo "I am on node ${env.NODE_NAME} and locked resource ${env.LOCKED_RESOURCE}"
27 | }
28 | }
29 | ```
30 |
31 | Let explain in more complex use case.
32 |
33 | *Request:*
34 | Our job tests server-client integration. That means we need 2 nodes (1 server and 1 client).
35 | On every node must be test sources up-to-date.
36 | Tests are running only on client side.
37 |
38 | *Solution:*
39 | Create 2 nodes:
40 |
41 | - node-server
42 | - node-client
43 |
44 | and execute it parallel like this:
45 |
46 | ```groovy
47 | Map stages = [:];
48 | stages['server'] = {
49 | node('node-server') {
50 | prepareTests()
51 | startServer()
52 | }
53 | }
54 | stages['client'] = {
55 | node('node-client') {
56 | prepareTests()
57 | startClientTest()
58 | }
59 | }
60 | // execute all prepare stages synchronous
61 | parallel stages
62 |
63 | // Prepare tests on node
64 | void prepareTests() {
65 | checkout([$class: 'GitSCM',
66 | branches: [[name: 'master']]
67 | ])
68 | }
69 | // Start server
70 | void startServer() {
71 | echo 'Server will be started in few seconds'
72 | sh 'mvn clean hpi:run'
73 | echo 'Server is done'
74 | }
75 | // Start client
76 | void startClientTest() {
77 | sleep 20
78 | sh 'mvn clean verify'
79 | }
80 | ```
81 |
82 | It looks pretty fine and easy, but !!!.
83 |
84 | Executing all steps parallel might leads to timing issues, because checkout on server-node might takes much longer then on client-node. This is serious issue because the client starts before the server and can not connect to server.
85 |
86 | The solution is to synchronized parallel stages like this.
87 |
88 | ```groovy
89 | Map prepareStages = [:];
90 | prepareStages['server'] = {
91 | node('node-server') {
92 | prepareTests()
93 | }
94 | }
95 | prepareStages['client'] = {
96 | node('node-client') {
97 | startServer()
98 | }
99 | }
100 | // execute all prepare stages synchronous
101 | parallel prepareStages
102 |
103 | Map testStages = [:]
104 | testStages['server'] = {
105 | node('node-server') {
106 | prepareTests();
107 | }
108 | }
109 | testStages['client'] = {
110 | node('node-client') {
111 | sleep 20
112 | startClientTest();
113 | }
114 | }
115 |
116 | // execute all test stages at the same time
117 | testStages.failFast = true
118 | parallel testStages
119 |
120 | ...
121 | ```
122 |
123 | Ok we solve the timing issue, but what is wrong here?
124 |
125 | When the step *parallel prepareStages* is done then are on both nodes executors free. At this moment
126 | it might happen, that some other job allocate one of the nodes. This will leads to more side effects, like:
127 |
128 | - no body can grant, that currently checked out workspace will be untouched
129 | - no body can grant how long will be the node allocated
130 | - ... and many others
131 |
132 | Instead, we lock both nodes with a single call to `lock`.
133 |
134 | Create two resources:
135 | name | Labels |
136 | ---------------|--------|
137 | nodes-server-1 | server-node |
138 | nodes-client-1 | client-node |
139 |
140 |
141 | ```groovy
142 | lock(variable: 'locked_resources',
143 | extra: [
144 | [label: 'server-node', quantity: 1],
145 | [label: 'client-node', quantity: 1]
146 | ) {
147 | final String serverNodeName = env.LOCKED_RESOURCE0;
148 | final String clientNodeName = env.LOCKED_RESOURCE1;
149 | Map prepareStages = [:];
150 | prepareStages['server'] = {
151 | node(serverNodeName) {
152 | prepareTests()
153 | }
154 | }
155 | prepareStages['client'] = {
156 | node(clientNodeName) {
157 | startServer()
158 | }
159 | }
160 | // execute all prepare stages synchronous
161 | parallel prepareStages
162 |
163 | Map testStages = [:]
164 | testStages['server'] = {
165 | node(serverNodeName) {
166 | prepareTests();
167 | }
168 | }
169 | testStages['client'] = {
170 | node(clientNodeName) {
171 | sleep 20
172 | startClientTest();
173 | }
174 | }
175 |
176 | // execute all test stages at the same time
177 | testStages.failFast = true
178 | parallel testStages
179 |
180 | }
181 |
182 | ...
183 | ```
184 |
185 | Keep in mind, that `lock()` only helps when locks are consistently requested for resources.
186 |
--------------------------------------------------------------------------------
/src/doc/examples/locking-multiple-stages-in-declarative-pipeline.md:
--------------------------------------------------------------------------------
1 | # Locking multiple stages in declarative pipeline
2 |
3 | You can lock the entire job in the options block of the pipeline:
4 |
5 |
6 | ```groovy
7 | pipeline {
8 | options {
9 | lock 'lockable-resource'
10 | }
11 |
12 | agent any
13 |
14 | stages {
15 | stage('Build') {
16 | steps {
17 | sh 'make'
18 | }
19 | }
20 | stage('Test'){
21 | steps {
22 | sh 'make check'
23 | junit 'reports/**/*.xml'
24 | }
25 | }
26 | stage('Deploy') {
27 | steps {
28 | sh 'make publish'
29 | }
30 | }
31 | }
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/src/doc/examples/locking-random-free-resource.md:
--------------------------------------------------------------------------------
1 | ## Locking a random free resource
2 |
3 | In same cases, you want a random resource to be locked instead of always choosing the first one. For example,
4 | if resources like accounts could get rate limited if they are used too often by your pipelines.
5 |
6 | With the following resources created:
7 |
8 | | Name | Label |
9 | |-----------|---------|
10 | | account_1 | account |
11 | | account_2 | account |
12 |
13 | You can pick a single random available resource like in the following declarative pipeline:
14 |
15 | ```groovy
16 | pipeline {
17 | agent any
18 | stages {
19 | stage("Build") {
20 | steps {
21 | lock(label: "account", resourceSelectStrategy: 'random', resource: null, quantity: 1, variable: "account") {
22 | echo "Using account " + env.account
23 | // do your thing using the resource
24 | }
25 | }
26 | }
27 | }
28 | }
29 | ```
30 |
31 | The `quantity` can be changed to lock any amount of available resources with the given label. Not specifying the
32 | quantity will lock all resources, but still randomize the order of resources in the numbered environment variable.
33 |
34 | Not specifying `resourceSelectStrategy`, will fall back to the default behaviour of locking resources according to
35 | their order in the lockable resources list. You can also explicitly configure the default strategy
36 | with `resourceSelectStrategy: 'sequential'`.
37 |
--------------------------------------------------------------------------------
/src/doc/examples/readme.md:
--------------------------------------------------------------------------------
1 | # Examples
2 |
3 | Examples of lockable resources include:
4 |
5 | If you have an example to share, please create a [new documentation issue](https://github.com/jenkinsci/lockable-resources-plugin/issues/new?assignees=&labels=documentation&template=3-documentation.yml) and provide additional examples as a [pull request](https://github.com/jenkinsci/lockable-resources-plugin/pulls) to the repository.
6 | If you have a question, please open a [GitHub issue](https://github.com/jenkinsci/lockable-resources-plugin/issues/new/choose) with your question.
7 |
8 | - [Node depended resources](lock-nodes.md)
9 | - [Locking multiple stages in declarative pipeline](locking-multiple-stages-in-declarative-pipeline.md)
10 | - [Locking a random free resource](locking-random-free-resource.md)
11 | - [Scripted vs declarative pipeline](scripted-vs-declarative-pipeline.md)
12 |
--------------------------------------------------------------------------------
/src/doc/examples/scripted-vs-declarative-pipeline.md:
--------------------------------------------------------------------------------
1 | # Scripted vs declarative pipeline
2 |
3 | Due an historical reason is not possible to use exact same syntax in the declarative and scripted pipeline.
4 | In declarative pipeline you must so far set **resource : null**.
5 |
6 | ## Declarative
7 |
8 | ``` groovy
9 | pipeline {
10 | agent any
11 |
12 | stages {
13 | stage("Build") {
14 | steps {
15 | lock(label: 'printer', quantity: 1, resource : null) {
16 | echo 'printer locked'
17 | }
18 | }
19 | }
20 | }
21 | }
22 | ```
23 |
24 | ## Scripted
25 |
26 | ``` groovy
27 | node() {
28 | stage("Build") {
29 | lock(label: 'printer', quantity: 1) {
30 | echo 'printer locked'
31 | }
32 | }
33 | }
34 | ```
35 |
36 | ## Pitfalls
37 |
38 | Setting `quantity` to `null`, `0` or a smaller number, all available resources of that label are locked at once.
39 | See [#198 - Lock All resources by setting quantity to 0 is not documented](https://github.com/jenkinsci/lockable-resources-plugin/issues/198).
40 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/BackwardCompatibility.java:
--------------------------------------------------------------------------------
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 | * Copyright (c) 2016, Florian Hug. All rights reserved. *
3 | * *
4 | * This file is part of the Jenkins Lockable Resources Plugin and is *
5 | * published under the MIT license. *
6 | * *
7 | * See the "LICENSE.txt" file for more information. *
8 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
9 |
10 | package org.jenkins.plugins.lockableresources;
11 |
12 | import hudson.init.InitMilestone;
13 | import hudson.init.Initializer;
14 | import java.util.ArrayList;
15 | import java.util.Collections;
16 | import java.util.List;
17 | import java.util.logging.Level;
18 | import java.util.logging.Logger;
19 | import org.jenkins.plugins.lockableresources.queue.LockableResourcesStruct;
20 | import org.jenkinsci.plugins.workflow.steps.StepContext;
21 |
22 | /**
23 | * This class migrates "active" queuedContexts from LockableResource to LockableResourcesManager
24 | *
25 | * @deprecated Migration code for field introduced in 1.8 (since 1.11)
26 | */
27 | @Deprecated
28 | @ExcludeFromJacocoGeneratedReport
29 | public final class BackwardCompatibility {
30 | private static final Logger LOG = Logger.getLogger(BackwardCompatibility.class.getName());
31 |
32 | private BackwardCompatibility() {}
33 |
34 | @Initializer(after = InitMilestone.JOB_LOADED)
35 | public static void compatibilityMigration() {
36 | LockableResourcesManager lrm = LockableResourcesManager.get();
37 | synchronized (lrm.syncResources) {
38 | List resources = lrm.getResources();
39 | LOG.log(
40 | Level.FINE,
41 | "lockable-resources-plugin compatibility migration task run for " + resources.size()
42 | + " resources");
43 | for (LockableResource resource : resources) {
44 | List queuedContexts = resource.getQueuedContexts();
45 | if (!queuedContexts.isEmpty()) {
46 | for (StepContext queuedContext : queuedContexts) {
47 | List resourcesNames = new ArrayList<>();
48 | resourcesNames.add(resource.getName());
49 | LockableResourcesStruct resourceHolder = new LockableResourcesStruct(resourcesNames, "", 0);
50 | LockableResourcesManager.get()
51 | .queueContext(
52 | queuedContext,
53 | Collections.singletonList(resourceHolder),
54 | resource.getName(),
55 | null,
56 | false,
57 | 0);
58 | }
59 | queuedContexts.clear();
60 | }
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/ExcludeFromJacocoGeneratedReport.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR})
10 | public @interface ExcludeFromJacocoGeneratedReport {}
11 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/FreeDeadJobs.java:
--------------------------------------------------------------------------------
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 | * Copyright (c) 2016, Florian Hug. All rights reserved. *
3 | * *
4 | * This file is part of the Jenkins Lockable Resources Plugin and is *
5 | * published under the MIT license. *
6 | * *
7 | * See the "LICENSE.txt" file for more information. *
8 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
9 |
10 | package org.jenkins.plugins.lockableresources;
11 |
12 | import hudson.init.InitMilestone;
13 | import hudson.init.Initializer;
14 | import java.util.ArrayList;
15 | import java.util.List;
16 | import java.util.logging.Level;
17 | import java.util.logging.Logger;
18 |
19 | /**
20 | * Sometimes after re-starts (jenkins crashed or what ever) are resources still locked by build, but
21 | * the build is no more running. This script will 'unlock' all resource assigned to dead builds
22 | */
23 | @ExcludeFromJacocoGeneratedReport
24 | public final class FreeDeadJobs {
25 | private static final Logger LOG = Logger.getLogger(FreeDeadJobs.class.getName());
26 |
27 | private FreeDeadJobs() {}
28 |
29 | @Initializer(after = InitMilestone.JOB_LOADED)
30 | public static void freePostMortemResources() {
31 |
32 | LockableResourcesManager lrm = LockableResourcesManager.get();
33 | synchronized (lrm.syncResources) {
34 | List orphan = new ArrayList<>();
35 | LOG.log(Level.FINE, "lockable-resources-plugin free post mortem task run");
36 | for (LockableResource resource : lrm.getResources()) {
37 | if (resource.getBuild() != null && !resource.getBuild().isInProgress()) {
38 | orphan.add(resource);
39 | }
40 | }
41 |
42 | for (LockableResource resource : orphan) {
43 | LOG.log(
44 | Level.INFO,
45 | "lockable-resources-plugin reset resource "
46 | + resource.getName()
47 | + " due post mortem job: "
48 | + resource.getBuildName());
49 | resource.recycle();
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/LockableResourceProperty.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import edu.umd.cs.findbugs.annotations.NonNull;
4 | import hudson.Extension;
5 | import hudson.model.AbstractDescribableImpl;
6 | import hudson.model.Descriptor;
7 | import java.io.Serializable;
8 | import org.kohsuke.stapler.DataBoundConstructor;
9 | import org.kohsuke.stapler.DataBoundSetter;
10 | import org.kohsuke.stapler.export.Exported;
11 | import org.kohsuke.stapler.export.ExportedBean;
12 |
13 | @ExportedBean(defaultVisibility = 999)
14 | public class LockableResourceProperty extends AbstractDescribableImpl
15 | implements Serializable {
16 |
17 | private String name;
18 | private String value;
19 |
20 | @DataBoundConstructor
21 | public LockableResourceProperty() {}
22 |
23 | @DataBoundSetter
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | @DataBoundSetter
29 | public void setValue(String value) {
30 | this.value = value;
31 | }
32 |
33 | @Exported
34 | public String getName() {
35 | return name;
36 | }
37 |
38 | @Exported
39 | public String getValue() {
40 | return value;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | return name;
46 | }
47 |
48 | @Extension
49 | public static class DescriptorImpl extends Descriptor {
50 |
51 | @NonNull
52 | @Override
53 | public String getDisplayName() {
54 | return "Property";
55 | }
56 | }
57 |
58 | private static final long serialVersionUID = 1L;
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/LockableResources.java:
--------------------------------------------------------------------------------
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 | * Copyright (c) 2015, 6WIND S.A. All rights reserved. *
3 | * *
4 | * This file is part of the Jenkins Lockable Resources Plugin and is *
5 | * published under the MIT license. *
6 | * *
7 | * See the "LICENSE.txt" file for more information. *
8 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
9 | package org.jenkins.plugins.lockableresources;
10 |
11 | import hudson.Plugin;
12 | import hudson.model.Api;
13 | import java.util.List;
14 | import org.kohsuke.stapler.export.Exported;
15 | import org.kohsuke.stapler.export.ExportedBean;
16 |
17 | @ExportedBean
18 | public class LockableResources extends Plugin {
19 |
20 | public Api getApi() {
21 | return new Api(this);
22 | }
23 |
24 | @Exported
25 | public List getResources() {
26 | return LockableResourcesManager.get().getReadOnlyResources();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/ResourceSelectStrategy.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | public enum ResourceSelectStrategy {
4 | SEQUENTIAL,
5 | RANDOM
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/actions/ResourceVariableNameAction.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources.actions;
2 |
3 | import edu.umd.cs.findbugs.annotations.NonNull;
4 | import hudson.EnvVars;
5 | import hudson.Extension;
6 | import hudson.model.EnvironmentContributor;
7 | import hudson.model.InvisibleAction;
8 | import hudson.model.Run;
9 | import hudson.model.StringParameterValue;
10 | import hudson.model.TaskListener;
11 | import java.util.List;
12 | import org.kohsuke.accmod.Restricted;
13 | import org.kohsuke.accmod.restrictions.NoExternalUse;
14 |
15 | @Restricted(NoExternalUse.class)
16 | public class ResourceVariableNameAction extends InvisibleAction {
17 |
18 | private final List resourceNameParameter;
19 |
20 | public ResourceVariableNameAction(List r) {
21 | this.resourceNameParameter = r;
22 | }
23 |
24 | List getParameter() {
25 | return resourceNameParameter;
26 | }
27 |
28 | @Extension
29 | public static final class ResourceVariableNameActionEnvironmentContributor extends EnvironmentContributor {
30 |
31 | @Override
32 | public void buildEnvironmentFor(@NonNull Run r, @NonNull EnvVars envs, @NonNull TaskListener listener) {
33 | ResourceVariableNameAction a = r.getAction(ResourceVariableNameAction.class);
34 | if (a != null && a.getParameter() != null) {
35 | for (StringParameterValue envToSet : a.getParameter()) {
36 | envs.override(envToSet.getName(), envToSet.getValue());
37 | }
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/nodes/NodesMirror.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import hudson.Extension;
4 | import hudson.init.InitMilestone;
5 | import hudson.init.Initializer;
6 | import hudson.model.Node;
7 | import hudson.slaves.ComputerListener;
8 | import java.util.Iterator;
9 | import java.util.logging.Logger;
10 | import java.util.stream.Collectors;
11 | import jenkins.model.Jenkins;
12 | import jenkins.util.SystemProperties;
13 | import org.jenkins.plugins.lockableresources.util.Constants;
14 |
15 | // -----------------------------------------------------------------------------
16 | /** Mirror Jenkins nodes to lockable-resources */
17 | @Extension
18 | public class NodesMirror extends ComputerListener {
19 |
20 | private static final Logger LOGGER = Logger.getLogger(NodesMirror.class.getName());
21 | private static LockableResourcesManager lrm;
22 |
23 | // ---------------------------------------------------------------------------
24 | private static boolean isNodeMirrorEnabled() {
25 | return SystemProperties.getBoolean(Constants.SYSTEM_PROPERTY_ENABLE_NODE_MIRROR);
26 | }
27 |
28 | // ---------------------------------------------------------------------------
29 | @Initializer(after = InitMilestone.JOB_LOADED)
30 | public static void createNodeResources() {
31 | LOGGER.info("lockable-resources-plugin: configure node resources");
32 | mirrorNodes();
33 | }
34 |
35 | // ---------------------------------------------------------------------------
36 | @Override
37 | public final void onConfigurationChange() {
38 | mirrorNodes();
39 | }
40 |
41 | // ---------------------------------------------------------------------------
42 | private static void mirrorNodes() {
43 | if (!isNodeMirrorEnabled()) {
44 | return;
45 | }
46 |
47 | LOGGER.info("lockable-resources-plugin: start nodes mirroring");
48 | lrm = LockableResourcesManager.get();
49 | synchronized (lrm.syncResources) {
50 | for (Node n : Jenkins.get().getNodes()) {
51 | mirrorNode(n);
52 | }
53 | // please do not remove it, From time to time is necessary for developer debugs
54 | // thx
55 | // lrm.printResources();
56 | deleteNotExistingNodes();
57 | // lrm.printResources();
58 | }
59 | LOGGER.info("lockable-resources-plugin: nodes mirroring finished");
60 | }
61 |
62 | // ---------------------------------------------------------------------------
63 | private static void deleteNotExistingNodes() {
64 | Iterator resourceIterator = lrm.getResources().iterator();
65 | while (resourceIterator.hasNext()) {
66 | LockableResource resource = resourceIterator.next();
67 | if (!resource.isNodeResource() || (Jenkins.get().getNode(resource.getName()) != null)) {
68 | continue;
69 | }
70 | if (resource.isFree()) {
71 | // we can remove this resource. Is newer used currently
72 | LOGGER.config("lockable-resources-plugin: remove node resource '" + resource.getName() + "'.");
73 | resourceIterator.remove();
74 | } else {
75 | LOGGER.warning("lockable-resources-plugin: can not remove node-resource '"
76 | + resource.getName()
77 | + "'. The resource is currently used (not free).");
78 | }
79 | }
80 | }
81 |
82 | // ---------------------------------------------------------------------------
83 | private static void mirrorNode(Node node) {
84 | if (node == null) {
85 | return;
86 | }
87 |
88 | LockableResource nodeResource = lrm.fromName(node.getNodeName());
89 | boolean exist = nodeResource != null;
90 | if (!exist) {
91 | nodeResource = new LockableResource(node.getNodeName());
92 | LOGGER.config("lockable-resources-plugin: Node-resource '" + nodeResource.getName() + "' will be added.");
93 | } else {
94 | LOGGER.fine("lockable-resources-plugin: Node-resource '" + nodeResource.getName() + "' will be updated.");
95 | }
96 | nodeResource.setLabels(
97 | node.getAssignedLabels().stream().map(Object::toString).collect(Collectors.joining(" ")));
98 | nodeResource.setNodeResource(true);
99 | nodeResource.setEphemeral(false);
100 | nodeResource.setDescription(node.getNodeDescription());
101 |
102 | if (!exist) {
103 | lrm.addResource(nodeResource);
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/queue/Utils.java:
--------------------------------------------------------------------------------
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 | * Copyright (c) 2013, 6WIND S.A. All rights reserved. *
3 | * *
4 | * This file is part of the Jenkins Lockable Resources Plugin and is *
5 | * published under the MIT license. *
6 | * *
7 | * See the "LICENSE.txt" file for more information. *
8 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
9 | package org.jenkins.plugins.lockableresources.queue;
10 |
11 | import edu.umd.cs.findbugs.annotations.CheckForNull;
12 | import edu.umd.cs.findbugs.annotations.NonNull;
13 | import hudson.EnvVars;
14 | import hudson.matrix.MatrixConfiguration;
15 | import hudson.model.Job;
16 | import hudson.model.Queue;
17 | import hudson.model.Run;
18 | import org.jenkins.plugins.lockableresources.RequiredResourcesProperty;
19 |
20 | public final class Utils {
21 | private Utils() {}
22 |
23 | @CheckForNull
24 | public static Job, ?> getProject(@NonNull Queue.Item item) {
25 | if (item.task instanceof Job) return (Job, ?>) item.task;
26 | return null;
27 | }
28 |
29 | @NonNull
30 | public static Job, ?> getProject(@NonNull Run, ?> build) {
31 | return build.getParent();
32 | }
33 |
34 | @CheckForNull
35 | public static LockableResourcesStruct requiredResources(@NonNull Job, ?> project) {
36 | EnvVars env = new EnvVars();
37 |
38 | if (project instanceof MatrixConfiguration) {
39 | env.putAll(((MatrixConfiguration) project).getCombination());
40 | project = (Job, ?>) project.getParent();
41 | }
42 |
43 | RequiredResourcesProperty property = project.getProperty(RequiredResourcesProperty.class);
44 | if (property != null) return new LockableResourcesStruct(property, env);
45 |
46 | return null;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/util/Constants.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources.util;
2 |
3 | public class Constants {
4 | /// Enable mirror nodes to lockable-resources
5 | public static final String SYSTEM_PROPERTY_ENABLE_NODE_MIRROR =
6 | "org.jenkins.plugins.lockableresources.ENABLE_NODE_MIRROR";
7 | /// Disable saving lockable resources states, properties ... into local file system.
8 | /// This option makes the plugin much faster (everything is in cache) but
9 | /// **Keep in mind, that you will lost all your manual changed properties**
10 | /// The best way is to use it with JCaC plugin.
11 | public static final String SYSTEM_PROPERTY_DISABLE_SAVE = "org.jenkins.plugins.lockableresources.DISABLE_SAVE";
12 | /// Enable to print lock causes. Keep in mind, that the log output may grove depends on count of
13 | /// blocked resources.
14 | public static final String SYSTEM_PROPERTY_PRINT_BLOCKED_RESOURCE =
15 | "org.jenkins.plugins.lockableresources.PRINT_BLOCKED_RESOURCE";
16 | public static final String SYSTEM_PROPERTY_PRINT_QUEUE_INFO =
17 | "org.jenkins.plugins.lockableresources.PRINT_QUEUE_INFO";
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (c) 2017 Oleg Nenashev.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 | package org.jenkins.plugins.lockableresources.util;
25 |
26 | import edu.umd.cs.findbugs.annotations.CheckForNull;
27 | import edu.umd.cs.findbugs.annotations.NonNull;
28 | import edu.umd.cs.findbugs.annotations.Nullable;
29 | import hudson.model.Descriptor;
30 | import hudson.util.FormValidation;
31 | import java.io.Serializable;
32 | import java.net.MalformedURLException;
33 | import java.util.ArrayList;
34 | import java.util.List;
35 | import java.util.logging.Level;
36 | import java.util.logging.Logger;
37 | import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript;
38 | import org.jenkinsci.plugins.scriptsecurity.scripts.ClasspathEntry;
39 | import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval;
40 | import org.kohsuke.accmod.Restricted;
41 | import org.kohsuke.accmod.restrictions.NoExternalUse;
42 |
43 | /**
44 | * Wrapper for a {@link SecureGroovyScript}.
45 | *
46 | * @author Oleg Nenashev
47 | */
48 | @Restricted(NoExternalUse.class)
49 | public class SerializableSecureGroovyScript implements Serializable {
50 |
51 | private static final long serialVersionUID = 1L;
52 |
53 | @CheckForNull
54 | private final String script;
55 |
56 | private final boolean sandbox;
57 | /** {@code null} if and only if the {@link #script is null}. */
58 | @Nullable
59 | private final ArrayList classPathEntries;
60 |
61 | private static final Logger LOGGER = Logger.getLogger(SerializableSecureGroovyScript.class.getName());
62 |
63 | public SerializableSecureGroovyScript(@CheckForNull SecureGroovyScript secureScript) {
64 | if (secureScript == null) {
65 | script = null;
66 | sandbox = false;
67 | classPathEntries = null;
68 | } else {
69 | this.script = secureScript.getScript();
70 | this.sandbox = secureScript.isSandbox();
71 |
72 | List classpath = secureScript.getClasspath();
73 | classPathEntries = new ArrayList<>(classpath.size());
74 | for (ClasspathEntry e : classpath) {
75 | classPathEntries.add(new SerializableClassPathEntry(e));
76 | }
77 | }
78 | }
79 |
80 | @CheckForNull
81 | public String getScript() {
82 | return script;
83 | }
84 |
85 | @CheckForNull
86 | public SecureGroovyScript rehydrate() throws Descriptor.FormException {
87 | if (script == null) {
88 | return null;
89 | }
90 |
91 | ArrayList p = new ArrayList<>(classPathEntries.size());
92 | for (SerializableClassPathEntry e : classPathEntries) {
93 | ClasspathEntry entry = e.rehydrate();
94 | if (entry != null) {
95 | p.add(entry);
96 | }
97 | }
98 |
99 | return new SecureGroovyScript(script, sandbox, p);
100 | }
101 |
102 | private static class SerializableClassPathEntry implements Serializable {
103 |
104 | private static final long serialVersionUID = 1L;
105 |
106 | private final String url;
107 |
108 | private SerializableClassPathEntry(@NonNull ClasspathEntry entry) {
109 | this.url = entry.getPath();
110 | }
111 |
112 | @CheckForNull
113 | private ClasspathEntry rehydrate() {
114 | try {
115 | ClasspathEntry entry = new ClasspathEntry(url);
116 | if (ScriptApproval.get().checking(entry).kind.equals(FormValidation.Kind.OK)) {
117 | return entry;
118 | } else {
119 | return null;
120 | }
121 | } catch (MalformedURLException ex) {
122 | // Unrealistic
123 | LOGGER.log(Level.SEVERE, "Failed to rehydrate the URL " + url + ". It will be skipped", ex);
124 | return null;
125 | }
126 | }
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/src/main/resources/index.jelly:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 | This plugin allows to define external resources (such as printers, phones,
14 | computers) that can be locked by builds. If a build requires an external
15 | resource which is already locked, it will wait for the resource to be free.
16 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Resource
24 | entry.label.title=Label
25 | entry.quantity.title=Quantity
26 | entry.variable.title=Result variable
27 | entry.inversePrecedence.checkbox.title=Inverse precedence
28 | entry.skipIfLocked.title=Skip if locked
29 | entry.priority.title=Queue priority
30 | entry.resourceSelectStrategy.title=Strategy for resource selection
31 | entry.extra.title=Extra resources
32 | entry.extra.add=Add Resource
33 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/config_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Zdroj
24 | entry.label.title=Popisek
25 | entry.quantity.title=Mno\u017estv\u00ed
26 | entry.variable.title=Prom\u011bnn\u00e1 v\u00fdsledk\u016f
27 | entry.inversePrecedence.checkbox.title=Obr\u00e1cen\u00e9 po\u0159ad\u00ed
28 | entry.skipIfLocked.title=P\u0159esko\u010dit frontu
29 | entry.resourceSelectStrategy.title=Strategie v\u00fdb\u011bru zdroj\u016f
30 | entry.extra.title=Dodate\u010dn\u00e9 zdroje
31 | entry.extra.add=P\u0159idat zdroj
32 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/config_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Ressource
24 | entry.label.title=Label
25 | entry.quantity.title=Anzahl
26 | entry.variable.title=Ergebnisvariable
27 | entry.inversePrecedence.checkbox.title=Umgekehrter Vorrang
28 | entry.skipIfLocked.title=Warteschlange \u00fcberspringen
29 | entry.resourceSelectStrategy.title=Strategie f\u00fcr Ressourcenauswahl
30 | entry.extra.title=Zus\u00e4tzliche Ressourcen
31 | entry.extra.add=Ressource hinzuf\u00fcgen
32 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Ressource
24 | entry.label.title=Libell\u00e9
25 | entry.quantity.title=Quantit\u00e9
26 | entry.variable.title=Variable r\u00e9sultat
27 | entry.inversePrecedence.checkbox.title=Priorit\u00e9 invers\u00e9e
28 | entry.skipIfLocked.title=Sauter la file d'attente
29 | entry.extra.title=Ressources suppl\u00e9mentaires
30 | entry.extra.add=Ajouter une ressource
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/config_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Zdroj
24 | entry.label.title=\u0160t\u00edtok
25 | entry.quantity.title=Po\u010det
26 | entry.variable.title=Pramenn\u00e1 s v\u00fdsledkami
27 | entry.inversePrecedence.checkbox.title=Opa\u010dn\u00e9 poradie
28 | entry.skipIfLocked.title=Predbehn\u00fa\u0165 rad
29 | entry.resourceSelectStrategy.title=Strat\u00e9gia v\u00fdberu zdrojov
30 | entry.extra.title=Dodato\u010dn\u00e9 zdroje
31 | entry.extra.add=Prida\u0165 zdroj
32 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStep/help-inversePrecedence.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | By default waiting builds get the lock in the same order they requested to acquire it.
4 |
5 |
6 | By checking this option the newest build in the waiting queue will get the lock first.
7 |
6 | which takes an integer number that defines the order in which concurrent jobs waiting for the same resource are served.
7 | The job with the highest number would get the resource first. If the priority is equal, the current precedence (first comes first) would be applied.
8 |
3 | The resource name to lock as defined in Global settings.
4 |
5 |
6 | If the resource does not exist in Global Settings it will be automatically created on build execution.
7 | Either a resource or a label need to be specified.
8 |
3 | The strategy used to chose which available resources get locked.
4 | By default, the strategy will be "sequential" and resources are locked following the order in the lockable resources list.
5 | Set the strategy to "random" to randomize the order in which resources are locked.
6 |
12 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Resource
24 | entry.label.title=Label
25 | entry.quantity.title=Quantity
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Zdroj
24 | entry.label.title=Popisek
25 | entry.quantity.title=Po\u010det
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Ressource
24 | entry.label.title=Label
25 | entry.quantity.title=Menge
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Ressource
24 | entry.label.title=Libell\u00e9
25 | entry.quantity.title=Quantit\u00e9
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/config_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.resource.title=Zdroj
24 | entry.label.title=\u0160t\u00edtok
25 | entry.quantity.title=Po\u010det
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockStepResource/help-label.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The label of the resources to be locked as defined in Global settings.
4 |
5 |
6 | Either a resource or a label need to be specified.
7 |
3 | The resource name to lock as defined in Global settings.
4 |
5 |
6 | If the resource does not exist in Global Settings it will be automatically created on build execution.
7 | Either a resource or a label need to be specified.
8 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResource/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Name
24 | entry.description.title=Description
25 | entry.labels.title=Labels
26 | entry.reservedBy.title=Reserved by
27 | entry.properties.title=Properties
28 | entry.properties.add=Add Property
29 | entry.properties.delete=Delete Property
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResource/config_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Jm\u00e9no
24 | entry.description.title=Popis
25 | entry.labels.title=Popisky
26 | entry.reservedBy.title=Rezervace u\u017eivatelem
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResource/config_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Name
24 | entry.description.title=Beschreibung
25 | entry.labels.title=Labels
26 | entry.reservedBy.title=Reserviert durch
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResource/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Nom
24 | entry.description.title=Description
25 | entry.labels.title=Libell\u00e9s
26 | entry.reservedBy.title=R\u00e9serv\u00e9e par
27 | entry.properties.title=Propri\u00e9t\u00e9s
28 | entry.properties.add=Ajouter une propri\u00e9t\u00e9
29 | entry.properties.delete=Supprimer une propri\u00e9t\u00e9
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResource/config_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Meno
24 | entry.description.title=Popis
25 | entry.labels.title=\u0160t\u00edtky
26 | entry.reservedBy.title=Rezervovan\u00e9 u\u017e\u00edvate\u013eom
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourceProperty/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourceProperty/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Name
24 | entry.value.title=Value
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourceProperty/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | entry.name.title=Nom
24 | entry.value.title=Valeur
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | section.title=Lockable Resources Manager
24 | entry.title=Lockable Resources
25 | field.header=Resource
26 | field.add=Add Lockable Resource
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | section.title=Spr\u00e1vce uzamykateln\u00fdch zdroj\u00fa
24 | entry.title=Uzamykateln\u00e9 zdroje
25 | field.header=Zdroj
26 | field.add=P\u0159idat uzamykateln\u00fd zdroj
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | section.title=Sperrbare Ressourcen verwalten
24 | entry.title=Sperrbare Ressourcen
25 | field.header=Ressource
26 | field.add=Sperrbare Ressource hinzuf\u00fcgen
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | section.title=Gestionnaire des ressources verrouillables
24 | entry.title=Ressources verrouillables
25 | field.header=Ressource
26 | field.add=Ajouter une ressource verrouillable
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/LockableResourcesManager/config_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | section.title=Spr\u00e1vca uzamykate\u013en\u00fdch zdrojov
24 | entry.title=Uzamykate\u013en\u00e9 zdroje
25 | field.header=Zdroj
26 | field.add=Prida\u0165 uzamykate\u013en\u00fd zdroj
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/Messages.properties:
--------------------------------------------------------------------------------
1 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
2 | # Copyright (c) 2014, 6WIND S.A. All rights reserved. #
3 | # #
4 | # This file is part of the Jenkins Lockable Resources Plugin and is #
5 | # published under the MIT license. #
6 | # #
7 | # See the "LICENSE.txt" file for more information. #
8 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
9 |
10 | LockableResourcesRootAction.PermissionGroup=Lockable Resources
11 | LockableResourcesRootAction.UnlockPermission=Unlock
12 | LockableResourcesRootAction.UnlockPermission.Description=This permission grants the ability to manually \
13 | unlock resources that have been locked by builds.
14 | LockableResourcesRootAction.ReservePermission=Reserve
15 | LockableResourcesRootAction.ReservePermission.Description=This permission grants the ability to manually \
16 | reserve lockable resources outside of a build.
17 | LockableResourcesRootAction.StealPermission=Steal
18 | LockableResourcesRootAction.StealPermission.Description=This permission grants the ability to manually \
19 | "steal" resources that have been locked by builds or "reassign" those reserved by users.
20 | LockableResourcesRootAction.ViewPermission=View
21 | LockableResourcesRootAction.ViewPermission.Description=This permission grants the ability to view \
22 | lockable resources.
23 | LockableResourcesRootAction.QueueChangeOrderPermission=Queue
24 | LockableResourcesRootAction.QueueChangeOrderPermission.Description=This permission grants the ability to \
25 | manually manipulate the lockable resources queue..
26 | LockedResourcesBuildAction.displayName=Lockable resources
27 | # Java errors
28 | error.labelDoesNotExist=The resource label does not exist: {0}.
29 | error.resourceDoesNotExist=The resource does not exist: {0}.
30 | error.labelOrNameMustBeSpecified=Either resource label or resource name must be specified.
31 | error.labelAndNameSpecified=Resource label and resource name cannot be specified simultaneously.
32 | error.labelAndNameOrGroovySpecified=Only resource label, groovy expression, or resource names can be defined, not more than one.
33 | error.couldNotParseToint=Could not parse the given value as integer.
34 | error.givenAmountIsGreaterThatResourcesAmount=Given amount %d is greater than amount of resources: %d.
35 | error.resourceAlreadyLocked=Resource {0} already reserved or locked!
36 | error.invalidResourceSelectionStrategy=The strategy "{0}" is not supported. Valid options are {1}.
37 | error.isNotANumber=The queue position must be a number. Given: {0}
38 | error.queuePositionOutOfRange=The queue position {0} is out of range (1 - {1})!
39 | error.queueDoesNotExist=The queue {0} does not (anymore) exist.
40 | error.inversePrecedenceAndPriorityAreSet=The "inverse precedence" option is not compatible with "queue priority" option!
41 | # display-names
42 | LockStep.displayName=Lock shared resource
43 | LockStepResource.displayName=Resource
44 | LockableResource.displayName=Resource
45 | LockableResourcesManager.displayName=External Resources
46 | RequiredResourcesProperty.displayName=Required Lockable Resources
47 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/Messages_cs.properties:
--------------------------------------------------------------------------------
1 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
2 | # Copyright (c) 2014, 6WIND S.A. All rights reserved. #
3 | # #
4 | # This file is part of the Jenkins Lockable Resources Plugin and is #
5 | # published under the MIT license. #
6 | # #
7 | # See the "LICENSE.txt" file for more information. #
8 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
9 |
10 | LockableResourcesRootAction.PermissionGroup=Uzamykateln\u00e9 zdroje
11 | LockableResourcesRootAction.UnlockPermission=Odemknout
12 | LockableResourcesRootAction.UnlockPermission.Description=Toto opr\u00e1vn\u011bn\u00ed ud\u011bluje mo\u017enost ru\u010dn\u011b odemknout zdroje, kter\u00e9 byly uzam\u010deny sestaven\u00edmi.
13 | LockableResourcesRootAction.ReservePermission=Rezervovat
14 | LockableResourcesRootAction.ReservePermission.Description=Toto opr\u00e1vn\u011bn\u00ed poskytuje mo\u017enost ru\u010dn\u011b rezervovat uzamykateln\u00e9 zdroje mimo sestaven\u00ed.
15 | LockableResourcesRootAction.StealPermission=Ukradnout
16 | LockableResourcesRootAction.StealPermission.Description=Toto opr\u00e1vn\u011bn\u00ed ud\u011bluje mo\u017enost manu\u00e1ln\u011b "ukradnout" zdroje, kter\u00e9 byly uzam\u010deny sestaven\u00edm nebo "p\u0159e\u0159adit" polo\u017eky rezervovan\u00e9 u\u017eivateli.
17 | LockableResourcesRootAction.ViewPermission=Zobrazit
18 | LockableResourcesRootAction.ViewPermission.Description=Toto opr\u00e1vn\u011bn\u00ed ud\u011bluje mo\u017enost zobrazit uzamykateln\u00e9 zdroje.
19 |
20 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/Messages_de.properties:
--------------------------------------------------------------------------------
1 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
2 | # Copyright (c) 2014, 6WIND S.A. All rights reserved. #
3 | # #
4 | # This file is part of the Jenkins Lockable Resources Plugin and is #
5 | # published under the MIT license. #
6 | # #
7 | # See the "LICENSE.txt" file for more information. #
8 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
9 |
10 | LockableResourcesRootAction.PermissionGroup=Sperrbare Ressourcen
11 | LockableResourcesRootAction.UnlockPermission=Entsperren
12 | LockableResourcesRootAction.UnlockPermission.Description=Diese Berechtigung gew\u00e4hrt die M\u00f6glichkeit, Ressourcen manuell freizuschalten, die durch Builds gesperrt wurden.
13 | LockableResourcesRootAction.ReservePermission=Reservieren
14 | LockableResourcesRootAction.ReservePermission.Description=Diese Berechtigung gew\u00e4hrt die M\u00f6glichkeit, verschlie\u00dfbare Ressourcen au\u00dferhalb eines Build manuell zu reservieren.
15 | LockableResourcesRootAction.StealPermission=Stehlen
16 | LockableResourcesRootAction.StealPermission.Description=Diese Berechtigung gew\u00e4hrt die M\u00f6glichkeit, Ressourcen manuell zu stehlen, die durch Builds gesperrt oder von Benutzern reserviert wurden.
17 | LockableResourcesRootAction.ViewPermission=Ansicht
18 | LockableResourcesRootAction.ViewPermission.Description=Diese Berechtigung gew\u00e4hrt die M\u00f6glichkeit, gesperrte Ressourcen zu sehen.
19 |
20 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/Messages_fr.properties:
--------------------------------------------------------------------------------
1 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
2 | # Copyright (c) 2014, 6WIND S.A. All rights reserved. #
3 | # #
4 | # This file is part of the Jenkins Lockable Resources Plugin and is #
5 | # published under the MIT license. #
6 | # #
7 | # See the "LICENSE.txt" file for more information. #
8 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
9 |
10 | LockableResourcesRootAction.PermissionGroup=Ressources verrouillables
11 | LockableResourcesRootAction.UnlockPermission=D\u00e9verrouiller
12 | LockableResourcesRootAction.UnlockPermission.Description=Cette permission accorde la possibilit\u00e9 de d\u00e9verrouiller manuellement les ressources qui ont \u00e9t\u00e9 verrouill\u00e9es par les builds.
13 | LockableResourcesRootAction.ReservePermission=R\u00e9server
14 | LockableResourcesRootAction.ReservePermission.Description=Cette permission accorde la possibilit\u00e9 de r\u00e9server manuellement les ressources verrouillables \u00e0 l'ext\u00e9rieur d'un build.
15 | LockableResourcesRootAction.StealPermission=Voler
16 | LockableResourcesRootAction.StealPermission.Description=Cette permission permet de "voler" manuellement les ressources qui ont \u00e9t\u00e9 verrouill\u00e9es par les builds ou de "r\u00e9assigner" celles r\u00e9serv\u00e9es par les utilisateurs.
17 | LockableResourcesRootAction.ViewPermission=Voir
18 | LockableResourcesRootAction.ViewPermission.Description=Cette permission accorde la possibilit\u00e9 de voir les ressources verrouillables.
19 |
20 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/Messages_sk.properties:
--------------------------------------------------------------------------------
1 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
2 | # Copyright (c) 2014, 6WIND S.A. All rights reserved. #
3 | # #
4 | # This file is part of the Jenkins Lockable Resources Plugin and is #
5 | # published under the MIT license. #
6 | # #
7 | # See the "LICENSE.txt" file for more information. #
8 | # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
9 |
10 | LockableResourcesRootAction.PermissionGroup=Uzamykate\u013en\u00e9 zdroje
11 | LockableResourcesRootAction.UnlockPermission=Odomkn\u00fa\u0165
12 | LockableResourcesRootAction.UnlockPermission.Description=Toto opr\u00e1vnenie ude\u013euje mo\u017enos\u0165 ru\u010dne odomkn\u00fa\u0165 zdroje, ktor\u00e9 boli uzamknut\u00e9 zostaveniami.
13 | LockableResourcesRootAction.ReservePermission=Rezervova\u0165
14 | LockableResourcesRootAction.ReservePermission.Description=Toto opr\u00e1vnenie poskytuje mo\u017enos\u0165 ru\u010dne rezervova\u0165 uzamykate\u013en\u00e9 zdroje mimo zostavenia.
15 | LockableResourcesRootAction.StealPermission=Ukradn\u00fa\u0165
16 | LockableResourcesRootAction.StealPermission.Description=Toto opr\u00e1vnenie umo\u017e\u0148uje manu\u00e1lne "ukradn\u00fa\u0165" zdroj, ktor\u00fd bol uzamknut\u00fd zostaven\u00edm alebo "preradi\u0165" zdroje rezervovan\u00e9 u\u017e\u00edvate\u013eom.
17 | LockableResourcesRootAction.ViewPermission=Zobrazi\u0165
18 | LockableResourcesRootAction.ViewPermission.Description=Toto opr\u00e1vnenie ude\u013euje mo\u017enos\u0165 zobrazi\u0165 zamykate\u013en\u00e9 zdroje.
19 |
20 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | optionalBlock.title=This build requires lockable resources
24 | entry.resourceNames.title=Resources
25 | entry.labelName.title=Label
26 | optionalProperty.resourceMatchScript.title=Groovy Expression
27 | entry.resourceNamesVar.title=Reserved resources variable name
28 | entry.resourceNumber.title=Number of resources to request
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | optionalBlock.title=Toto sestaven\u00ed vy\u017eaduje uzamykateln\u00e9 zdroje
24 | entry.resourceNames.title=Zdroje
25 | entry.labelName.title=Popisek
26 | optionalProperty.resourceMatchScript.title=Groovy k\u00f3d
27 | entry.resourceNamesVar.title=N\u00e1zev prom\u011bnn\u00e9 pro rezervovan\u00e9 zdroje
28 | entry.resourceNumber.title=Po\u010det zdroj\u016f na vy\u017e\u00e1d\u00e1n\u00ed
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | optionalBlock.title=Dieses Build erfordert sperrbare Ressourcen
24 | entry.resourceNames.title=Ressourcen
25 | entry.labelName.title=Label
26 | optionalProperty.resourceMatchScript.title=Groovy Expression
27 | entry.resourceNamesVar.title=Variablenname mit reservierten Ressourcen
28 | entry.resourceNumber.title=Anzahl der anzufordernden Ressourcen
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | optionalBlock.title=Ce job n\u00e9cessite des ressources verrouillables
24 | entry.resourceNames.title=Ressources
25 | entry.labelName.title=Libell\u00e9
26 | optionalProperty.resourceMatchScript.title=Expression Groovy
27 | entry.resourceNamesVar.title=Nom de la variable des ressources r\u00e9serv\u00e9es
28 | entry.resourceNumber.title=Nombre de ressources \u00e0 demander
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/config_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | optionalBlock.title=Toto zostavenie vy\u017eaduje uzamykate\u013en\u00e9 zdroje
24 | entry.resourceNames.title=Zdroje
25 | entry.labelName.title=\u0160t\u00edtok
26 | optionalProperty.resourceMatchScript.title=Groovy k\u00f3d
27 | entry.resourceNamesVar.title=N\u00e1zov pramennej obsahuj\u00facej rezervovan\u00e9 zdroje
28 | entry.resourceNumber.title=Po\u010det zdrojov na vy\u017eiadanie
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/RequiredResourcesProperty/help-labelName.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | If you have created a pool of resources, i.e. a label, you can take it into use
4 | here. The build will select the resource(s) from the pool that includes all
5 | resources sharing the given label.
6 | Only one of Label, Groovy Expression or Resources fields may be specified.
7 |
3 | You can specify a groovy expression to be evaluated each time a resource is checked
4 | to be appropriate for a build. The expression must result into a boolean value. The
5 | following variables are available, in addition to optional arguments of the currently
6 | evaluated build:
7 |
8 |
9 |
resourceName
10 |
as per resource configuration
11 |
resourceDescription
12 |
as per resource configuration
13 |
resourceLabels
14 |
java.util.List<String> of labels as per resource configuration
15 |
16 |
17 | For matrix jobs, axis names and axis values can be referenced as well. Examples:
18 |
3 | When a build is scheduled, it will attempt to lock the specified resources. If
4 | some (or all) the resources are already locked by another build, the build will
5 | be queued until they are released. It is possible to specify an amount for
6 | requested resources below.
7 |
3 | Number of resources to request, empty value or 0 means all.
4 |
5 | This is useful, if you have a pool of similar resources, from which you want
6 | one or more to be reserved.
7 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/index.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #headers
24 | header.resources=Lockable Resources
25 | # tabs
26 | tab.resources=Resources
27 | tab.labels=Labels
28 | tab.queue=Queue
29 | #warning resources not configured
30 | resources.not_configured=There are no resources configured at the moment.
31 | resources.configure.here=You can configure it here.
32 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/index_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #headers
24 | header.resources=Uzamykateln\u00e9 zdroje
25 | #warnig resources not configured
26 | resources.not_configured=V tuto chv\u00edli nejsou nakonfigurov\u00e1ny \u017e\u00e1dn\u00e9 zdroje.
27 | resources.configure.here=M\u016f\u017eete jej nastavit zde.
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/index_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #headers
24 | header.resources=Sperrbare Ressourcen
25 | #warnig resources not configured
26 | resources.not_configured=Derzeit sind keine Ressourcen konfiguriert.
27 | resources.configure.here=Sie k\u00f6nnen es hier konfigurieren.
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/index_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #headers
24 | header.resources=Ressources verrouillables
25 | #warnig resources not configured
26 | resources.not_configured=Il n'y a aucune ressource configur\u00e9e pour le moment.
27 | resources.configure.here=Vous pouvez le configurer ici.
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/index_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #headers
24 | header.resources=Uzamykate\u013en\u00e9 zdroje
25 | #warnig resources not configured
26 | resources.not_configured=Moment\u00e1lne nie s\u00fa nakonfigurovan\u00e9 \u017eiadne zdroje.
27 | resources.configure.here=M\u00f4\u017eete ich nakonfigurova\u0165 tu.
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/noteForm.jelly:
--------------------------------------------------------------------------------
1 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table.jelly:
--------------------------------------------------------------------------------
1 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | labels.table.column.labels=Labels
24 | labels.table.column.free=Free
25 | labels.table.column.assigned=Assigned resources
26 | labels.table.column.percentage=Free in %
27 | labels.free.tooltip={0} % free
28 |
29 | # Table settings
30 | table.settings.page.length.all=ALL
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.labels=Popisky
24 |
25 | labels.table.column.labels=Popisky
26 | labels.table.column.free=Voln\u00e9
27 | labels.table.column.assigned=P\u0159i\u0159azen\u00e9 zdroje
28 | labels.table.column.percentage=Voln\u00fdch v %
29 | labels.free.tooltip={0} % voln\u00fdch
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.labels=Labels
24 |
25 | labels.table.column.labels=Labels
26 | labels.table.column.free=Frei
27 | labels.table.column.assigned=Zugewiesene Ressourcen
28 | labels.table.column.percentage=Frei in %
29 | labels.free.tooltip={0} % frei
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.labels=Libell\u00e9s
24 |
25 | labels.table.column.labels=Libell\u00e9s
26 | labels.table.column.free=Libre
27 | labels.table.column.assigned=Ressources affect\u00e9es
28 | labels.table.column.percentage=Libre in %
29 | labels.free.tooltip={0} % libre
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableLabels/table_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.labels=\u0160t\u00edtky
24 |
25 | labels.table.column.labels=\u0160t\u00edtok
26 | labels.table.column.free=Vo\u013en\u00e9 zdroje
27 | labels.table.column.assigned=Priraden\u00e9 zdroje
28 | labels.table.column.percentage=Vo\u013en\u00fdch v %
29 | labels.free.tooltip={0} % vo\u013en\u00fdch
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableQueue/queue-too-long.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | notificationBar.show(
3 | document.querySelector(".lockable-resources-queue-too-long-message").dataset.warningMessage,
4 | notificationBar.WARNING,
5 | );
6 | });
7 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableQueue/table.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2023 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | queue.isEmpty=The queue is currently empty.
24 | queue.warning.count=The queue has {0} item(s). The oldest one was inserted {1} ago!
25 | queue.warning.count.detail=\
26 | In many cases, users forget to un-reserve the resource (or an external API has died). \
27 | Sometimes the build does not release the resource. \
28 | This can happen when Jenkins crashes and the builds are no longer executable after restart. \
29 | Please check the status and manually release the resource if necessary.
30 | If you do not have permission to release the resource, contact your administrator.
31 |
32 | queue.table.column.index=Position
33 | queue.table.column.request.type=Request type
34 | queue.table.column.request.info=Request
35 | queue.table.column.requested.by=Requested by
36 | queue.table.column.requested.at=Requested at
37 | queue.table.column.reason=Reason
38 | queue.table.column.priority=Queue priority
39 | queue.table.column.action=Action
40 | queue.table.column.id=Queue ID
41 |
42 | #status
43 | resource.status.free=FREE
44 | resource.status.locked=LOCKED by {1}
45 | resource.status.reservedBy=RESERVED by {0}
46 | resource.status.queuedBy=QUEUED by {0} {1}
47 | ago={0} ago
48 | label.requiredNumber={0} label(s) are required.
49 | label.requiredAll=All possible labels are required.
50 | label.status=Found {1} free resource(s) from {0} possible.
51 |
52 |
53 | resource.status.locked=Locked by {1}
54 | resource.status.reservedBy=Reserved by {0}
55 | resource.status.queuedBy=Queued by {0} {1}
56 | resource.status.free=Free
57 | label.requiredNumber=Requested {0} label(s).
58 | label.requiredAll=Requested ALL possible labels.
59 | label.status= There are {1} resource(s) matched, but only {0} free.
60 | groovy.status=!!!Groovy expression is currently not supported!!!
61 | resources.ephemeral=Ephemeral
62 | groovy.code=!!!Groovy expression is currently not supported!!!
63 | type.resources=Resources
64 | type.label=Label
65 | type.groovy=Groovy expression
66 |
67 | # Table settings
68 | table.settings.page.length.all=ALL
69 |
70 | # Change queue position
71 | queue.change.title=Change queue position ({0})
72 | queue.change.message=Type new queue position
73 | queue.change.on.success=Queue position successful changed
74 | queue.change.on.fail=Change queue ({0}) position failed!
75 |
76 | action.on.success=The action '{0}' was successfully performed on '{1}'
77 | action.on.fail=The action '{0}' on resource '{1}' failed!
78 |
79 | btn.changeOrder=Change position
80 | btn.changeOrder.detail=Reorder queue position
81 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableResources/table.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #table resources
24 | resources.table.column.index=Index
25 | resources.table.column.resource=Resource
26 | resources.table.column.status=Status
27 | resources.table.column.labels=Labels
28 | resources.table.column.properties=Properties
29 | resources.table.column.timestamp=Timestamp
30 | resources.table.column.action=Action
31 |
32 | resources.table.column.properties.name=Name
33 | resources.table.column.properties.value=Value
34 |
35 | resources.ephemeral=Ephemeral
36 |
37 | #status
38 | resource.status.free=FREE
39 | resource.status.locked=LOCKED by {1}
40 | resource.status.reservedBy=RESERVED by {0}
41 | resource.status.queuedBy=QUEUED by {0} {1}
42 | ago={0} ago
43 | #button copy name
44 | btn.copy.message=Resource name copied to clipboard
45 | btn.copy.detail=Copy resource name to clipboard
46 | #actions
47 | btn.unlock=Unlock
48 | btn.unlock.detail=Unlocks a resource that may be or not be locked by some job (or reserved by some user) already.
49 | btn.steal=Steal lock
50 | btn.steal.detail=Reserves a resource that may be or not be locked by some job (or reserved by some user) already. \
51 | Giving it away to currently logged user indefinitely \
52 | (until that person, or some explicit scripted action, later decides to release the resource).
53 | btn.reset=Reset
54 | btn.reset.detail=Reset a resource that may be reserved, locked or queued.
55 | btn.reserve=Reserve
56 | btn.reserve.detail=Reserves an available resource for currently logged user indefinitely \
57 | (until that person, or some explicit scripted action, decides to release the resource).
58 | btn.unReserve=Unreserve
59 | btn.unReserve.detail=Un-reserves a resource that may be reserved by some person already. \
60 | The user can unreserve only own resource. Administrator can unreserve any resource.
61 | btn.reassign=Reassign
62 | btn.reassign.detail=Reserves a resource that may be or not be reserved by some person already. \
63 | Giving it away to currently logged user indefinitely \
64 | (until that person, or some explicit scripted action, decides to release the resource).
65 | btn.editNote=Note
66 | btn.editNote.detail=Edit resource note.
67 |
68 | # Table settings
69 | table.settings.page.length.all=ALL
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableResources/table_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #table resources
24 | resources.table.column.index=Index
25 | resources.table.column.resource=Zdroj
26 | resources.table.column.status=Stav
27 | resources.table.column.labels=Popisky
28 | resources.table.column.timestamp=Timestamp
29 | resources.table.column.action=Akce
30 |
31 | resources.ephemeral=Pominuteln\u00ed
32 |
33 | #status
34 | resource.status.free=VOLN\u00dd
35 | resource.status.locked=ZAM\u010cEN\u00cd{1}
36 | resource.status.reservedBy=REZERVOV\u00c1NO u\u017eivatelem {0}
37 | resource.status.queuedBy=VE FRON\u0164E sestaven\u00edm {0} {1}
38 | ago=pred {0}
39 | #button copy name
40 | btn.copy.message=N\u00e1zev zdroje zkop\u00edrov\u00e1n do schr\u00e1nky
41 | btn.copy.detail=Zkop\u00edrovat n\u00e1zev zdroje do schr\u00e1nky
42 | #actions
43 | btn.unlock=Odemknout
44 | btn.unlock.detail=Odemkne zdroj, kter\u00fd ji\u017e m\u016f\u017ee b\u00fdt nebo nemus\u00ed b\u00fdt uzam\u010den n\u011bjak\u00fdm sestaven\u00edm (nebo rezervov\u00e1n n\u011bkter\u00fdm u\u017eivatelem).
45 | btn.steal=Ukradnout z\u00e1mek
46 | btn.steal.detail=Rezervuje zdroj, kter\u00fd m\u016f\u017ee b\u00fdt nebo nemus\u00ed b\u00fdt uzam\u010den n\u011bjak\u00fdm sestaven\u00edm (nebo rezervov\u00e1n n\u011bkter\u00fdm u\u017eivatelem). P\u0159iraden\u00edm ku aktu\u00e1ln\u011b p\u0159ihl\u00e1\u0161en\u00e9ho u\u017eivatele na neur\u010dito (dokud se tato osoba nebo n\u011bjak\u00e1 explicitn\u00ed skriptovac\u00ed akce pozd\u011bji rozhodne uvolnit zdroje).
47 | btn.reset=Resetovat
48 | btn.reset.detail=Obnov\u00ed zdroj, kter\u00fd m\u016f\u017ee b\u00fdt rezervov\u00e1n, uzam\u010den nebo ve front\u011b.
49 | btn.reserve=Rezervovat
50 | btn.reserve.detail=Rezervuje dostupn\u00fd zdroj pro aktu\u00e1ln\u011b p\u0159ihl\u00e1\u0161en\u00e9ho u\u017eivatele na neur\u010dito (dokud se tato osoba nebo n\u011bjak\u00e1 explicitn\u00ed skriptovan\u00e1 akce nerozhodne uvolnit zdroje).
51 | btn.unReserve=Zru\u0161it rezervu
52 | btn.unReserve.detail=Zru\u0161\u00ed rezervaci, kter\u00e1 m\u016f\u017ee b\u00fdt ji\u017e rezervov\u00e1na n\u011bjakou osobou. U\u017eivatel m\u016f\u017ee zru\u0161it pouze vlastn\u00ed rezervaci. Administr\u00e1tor m\u016f\u017ee zru\u0161it jak\u00fdkoli rezervaci.
53 | btn.reassign=P\u0159e\u0159adit
54 | btn.reassign.detail=Rezervuje zdroj, kter\u00fd m\u016f\u017ee nebo nemus\u00ed b\u00fdt vyhrazen ji\u017e jednou osobou. P\u0159iraden\u00edm aktu\u00e1ln\u011b p\u0159ihl\u00e1\u0161en\u00e9ho u\u017eivatele na neur\u010dito (dokud se tato osoba nebo n\u011bjak\u00e1 explicitn\u00ed skriptovan\u00e1 akce nerozhodne uvolnit zdroje). Tuto akci m\u016f\u017ee prov\u00e9st pouze spr\u00e1vce.
55 | btn.editNote=Pozn\u00e1mka
56 | btn.editNote.detail=Upravit pozn\u00e1mku.
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableResources/table_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #table resources
24 | resources.table.column.index=Index
25 | resources.table.column.resource=Ressource
26 | resources.table.column.status=Status
27 | resources.table.column.labels=Labels
28 | resources.table.column.timestamp=Zeitstempel
29 | resources.table.column.action=Aktion
30 |
31 | resources.ephemeral=Ephemisch
32 |
33 | #status
34 | resource.status.free=FREI
35 | resource.status.locked=GESPERRT durch {1}
36 | resource.status.reservedBy=RESERVIERT von {0}
37 | resource.status.queuedBy=IN WARTESCHLANGE von {0} {1}
38 | ago=vor {0}
39 | #button copy name
40 | btn.copy.message=Ressourcenname in Zwischenablage kopiert
41 | btn.copy.detail=Ressourcenname in die Zwischenablage kopieren
42 | #actions
43 | btn.unlock=Entsperren
44 | btn.unlock.detail=Schaltet eine Ressource frei, die bereits von einem Job gesperrt ist (oder von einem Benutzer reserviert wurde).
45 | btn.steal=Sperre stehlen
46 | btn.steal.detail=Reserviert eine Ressource, die bereits von einem Job gesperrt ist (oder von einem Benutzer reserviert wurde). Wird es an derzeit angemeldete Benutzer auf unbestimmte Zeit vergeben (bis diese Person oder eine explizite Skript-Aktion sp\u00e4ter beschlie\u00dft, die Ressource freizugeben).
47 | btn.reset=Zur\u00fccksetzen
48 | btn.reset.detail=Eine Ressource zur\u00fccksetzen, die reserviert, gesperrt oder in der Warteschlange steht.
49 | btn.reserve=Reservieren
50 | btn.reserve.detail=Reserviert eine verf\u00fcgbare Ressource f\u00fcr derzeit angemeldete Benutzer auf unbestimmte Zeit (bis diese Person oder eine explizite Skript-Aktion beschlie\u00dft, die Ressource freizugeben).
51 | btn.unReserve=Freischalten
52 | btn.unReserve.detail=Schaltet eine Ressource frei, die m\u00f6glicherweise bereits von einer Person reserviert wird. Der Benutzer kann nur eigene Ressourcen freigeben. Administrator kann jede Ressource freigeben.
53 | btn.reassign=Neu zuweisen
54 | btn.reassign.detail=Reserviert eine Ressource. Wird es an derzeit angemeldete Benutzer auf unbestimmte Zeit vergeben (bis diese Person oder eine explizite Skript-Aktion beschlie\u00dft, die Ressource freizugeben). Diese Aktion kann nur vom Administrator durchgef\u00fchrt werden.
55 | btn.editNote=Notiz
56 | btn.editNote.detail=Ressourcennotiz.
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableResources/table_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #table resources
24 | resources.table.column.index=Index
25 | resources.table.column.resource=Ressource
26 | resources.table.column.status=Statut
27 | resources.table.column.labels=Libell\u00e9s
28 | resources.table.column.timestamp=Horodatage
29 | resources.table.column.action=Action
30 |
31 | resources.ephemeral=\u00c9ph\u00e9m\u00e8re
32 |
33 | #status
34 | resource.status.free=LIBRE
35 | resource.status.locked=VERROUILL\u00c9 par {1}
36 | resource.status.reservedBy=RESERV\u00c9 par {0}
37 | resource.status.queuedBy=MIS EN FILE D''ATTENTE par {0} {1}
38 | ago=Il ya {0}
39 | #button copy name
40 | btn.copy.message=Nom de la ressource copi\u00e9 dans le presse-papiers
41 | btn.copy.detail=Copier le nom de la ressource dans le presse-papiers
42 | #actions
43 | btn.unlock=D\u00e9verrouiller
44 | btn.unlock.detail=D\u00e9verrouille une ressource qui peut \u00eatre ou non verrouill\u00e9e par un job (ou r\u00e9serv\u00e9e par un utilisateur).
45 | btn.steal=Voler le verrou
46 | btn.steal.detail=R\u00e9serve une ressource qui peut d\u00e9j\u00e0 \u00eatre ou non verrouill\u00e9e par un job (ou r\u00e9serv\u00e9e par un utilisateur). Le donne \u00e0 l'utilisateur actuellement connect\u00e9 ind\u00e9finiment (jusqu'\u00e0 ce que cette personne, ou une action script\u00e9e explicite, d\u00e9cide ensuite de lib\u00e9rer la ressource).
47 | btn.reset=R\u00e9initialiser
48 | btn.reset.detail=R\u00e9initialiser une ressource qui peut \u00eatre r\u00e9serv\u00e9e, verrouill\u00e9e ou mise en file d'attente.
49 | btn.reserve=R\u00e9server
50 | btn.reserve.detail=R\u00e9serve ind\u00e9finiment une ressource disponible pour l'utilisateur actuellement connect\u00e9 (jusqu'\u00e0 ce que cette personne ou une action script\u00e9e explicite, d\u00e9cide de lib\u00e9rer la ressource).
51 | btn.unReserve=Annuler la r\u00e9servation
52 | btn.unReserve.detail=Annuler la r\u00e9servation d'une ressource qui peut \u00eatre r\u00e9serv\u00e9e par une personne d\u00e9j\u00e0. L'utilisateur ne peut annuler la r\u00e9servation que de sa propre ressource. L'administrateur peut annuler la r\u00e9servation de n'importe quelle ressource.
53 | btn.reassign=R\u00e9affecter
54 | btn.reassign.detail=R\u00e9serve une ressource qui peut d\u00e9j\u00e0 \u00eatre ou non r\u00e9serv\u00e9e par un utilisateur. La donne ind\u00e9finiment \u00e0 l'utilisateur actuellement connect\u00e9 (jusqu'\u00e0 ce que cette personne, ou une action script\u00e9e explicite, d\u00e9cide ensuite de lib\u00e9rer la ressource). Cette action ne peut \u00eatre effectu\u00e9e que par un administrateur.
55 | btn.editNote=Note
56 | btn.editNote.detail=Modifier la note de la ressource.
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockableResourcesRootAction/tableResources/table_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | #table resources
24 | resources.table.column.index=Index
25 | resources.table.column.resource=Zdroj
26 | resources.table.column.status=Stav
27 | resources.table.column.labels=\u0160t\u00edtky
28 | resources.table.column.timestamp=Timestamp
29 | resources.table.column.action=Akcia
30 |
31 | resources.ephemeral=Pominute\u013en\u00fd
32 |
33 | #status
34 | resource.status.free=VO\u013dN\u00dd
35 | resource.status.locked=UZAMKNUT\u00dd zostaven\u00edm{1}
36 | resource.status.reservedBy=REZERVOVAN\u00dd pou\u017e\u00edvate\u013eom {0}
37 | resource.status.queuedBy=V RADE zostavenia {0} {1}
38 | ago=pred {0}
39 | #button copy name
40 | btn.copy.message=N\u00e1zov zdroja bol skop\u00edrovan\u00fd do schr\u00e1nky
41 | btn.copy.detail=Skop\u00edrova\u0165 n\u00e1zov zdroja do schr\u00e1nky
42 | #actions
43 | btn.unlock=Odomkn\u00fa\u0165
44 | btn.unlock.detail=Odomkne zdroj, ktor\u00fd u\u017e m\u00f4\u017ee by\u0165 alebo nemus\u00ed by\u0165 uzamknut\u00fd nejak\u00fdm zostaven\u00edm (alebo rezervovan\u00fd nejak\u00fdm u\u017e\u00edvate\u013eom).
45 | btn.steal=Ukradn\u00fa\u0165 z\u00e1mok
46 | btn.steal.detail=Rezervuje zdroj, ktor\u00fd m\u00f4\u017ee by\u0165 alebo nemus\u00ed by\u0165 uzamknut\u00fd nejak\u00fdm zostaven\u00edm (alebo rezervovan\u00fd niektor\u00fdm u\u017e\u00edvate\u013eom). Prirad\u00ed aktu\u00e1lne prihl\u00e1sen\u00e9ho u\u017e\u00edvate\u013ea na neur\u010dito (pokia\u013e ss t\u00e1to osoba alebo nejak\u00e1 explicitn\u00e1 skriptov\u00e1 akcia nesk\u00f4r rozhodne uvolni\u0165 zdroje).
47 | btn.reset=Obnovi\u0165
48 | btn.reset.detail=Obnov\u00ed zdroj, ktor\u00fd m\u00f4\u017ee by\u0165 rezervovan\u00fd, uzamknut\u00fd alebo v rade.
49 | btn.reserve=Rezervova\u0165
50 | btn.reserve.detail=Rezervuje dostupn\u00fd zdroj pre aktu\u00e1lne prihl\u00e1sen\u00e9ho u\u017e\u00edvate\u013ea na neur\u010dito (pokia\u013e se t\u00e1to osoba alebo nejak\u00e1 explicitn\u00e1 skriptovacia akcia nerozhodne uvolni\u0165 zdroj).
51 | btn.unReserve=Zru\u0161i\u0165 rezerv\u00e1ciu
52 | btn.unReserve.detail=Zru\u0161\u00ed rezerv\u00e1ciu, ktor\u00e1 m\u00f4\u017ee by\u0165 u\u017e rezervovan\u00e1 nejakou osobou. U\u017e\u00edvate\u013e m\u00f4\u017ee zru\u0161i\u0165 iba vlastn\u00fa rezerv\u00e1ciu. Administr\u00e1tor m\u00f4\u017ee zru\u0161i\u0165 ak\u00fako\u013evek rezerv\u00e1ciu.
53 | btn.reassign=Prideli\u0165
54 | btn.reassign.detail=Rezervuje zdroj, ktor\u00fd m\u00f4\u017ee by\u0165 alebo nemus\u00ed by\u0165 rezervovan\u00fd niektor\u00fdm u\u017e\u00edvate\u013eom. Prirad\u00ed aktu\u00e1lne prihl\u00e1sen\u00e9ho u\u017e\u00edvate\u013ea na neur\u010dito (pokia\u013e sa t\u00e1to osoba alebo nejak\u00e1 explicitn\u00e1 skriptovacia akcia nesk\u00f4r rozhodne uvolni\u0165 zdroje) T\u00fato akciu m\u00f4\u017ee vykona\u0165 iba administr\u00e1tor.
55 | btn.editNote=Pozn\u00e1mka
56 | btn.editNote.detail=Upravi\u0165 pozn\u00e1mku.
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index.jelly:
--------------------------------------------------------------------------------
1 |
24 |
25 |
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | ${%app.bar.resources}
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
69 |
70 |
${%table.column.index}
71 |
${%table.column.timeStamp}
72 |
${%table.column.action}
73 |
${%table.column.step}
74 |
${%table.column.name}
75 |
76 |
77 |
78 |
79 |
80 |
${idx.index + 1}
81 |
82 |
88 |
89 |
${loEntry.action}
90 |
${loEntry.step}
91 |
${loEntry.name}
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2023 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | app.bar.used.resources=Lockable resources
24 | app.bar.resources=Lockable resources
25 |
26 | table.column.index=Index
27 | table.column.name=Resource Name
28 | table.column.step=Step
29 | table.column.timeStamp=Timestamp
30 | table.column.action=Action
31 | table.settings.page.length.all=ALL
32 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index_cs.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.resources=Uzamykateln\u00e9 zdroje
24 | header.resources.list=Toto sestaven\u00ed uzamklo n\u00e1sleduj\u00edc\u00ed zdroje\:
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index_de.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.resources=Sperrbare Ressourcen
24 | header.resources.list=Dieses Build hat folgende Ressourcen gesperrt\:
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index_fr.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.resources=Ressources verrouillables
24 | header.resources.list=Ce job a verrouill\u00e9 les ressources suivantes\u00a0\:
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins/plugins/lockableresources/actions/LockedResourcesBuildAction/index_sk.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2022 Martin Pokorny.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | header.resources=Uzamykate\u013en\u00e9 zdroje
24 | header.resources.list=Toto zostavenie uzamklo n\u00e1sleduj\u00face zdroje\:
--------------------------------------------------------------------------------
/src/main/webapp/css/style.css:
--------------------------------------------------------------------------------
1 | span.static-label {
2 | border: 1px solid #666;
3 | border-radius: 4px;
4 | color: var(--orange);
5 | display: inline-block;
6 | font-size: 0.75rem;
7 | font-weight: 500;
8 | margin: 0.25rem 0.5rem;
9 | padding: 0 0.5rem;
10 | text-align: center;
11 | text-decoration: none;
12 | vertical-align: baseline;
13 | white-space: nowrap;
14 | }
15 |
16 | .note-wrapper {
17 | max-height: 300px;
18 | color: darkgray;
19 | font-size: small;
20 | flex-grow: 1;
21 | }
22 |
23 | .dataTable .jenkins-button {
24 | margin: 2px;
25 | }
26 |
27 | .dataTable.jenkins-table > tbody > tr > td {
28 | vertical-align: top;
29 | }
30 |
31 | table.dataTable {
32 | border-spacing: 0 2px;
33 | }
34 |
35 | table.dataTable > tbody > tr {
36 | background-color: var(--table-body-background);
37 | }
38 |
39 | table.dataTable td, table.dataTable th {
40 | -webkit-box-sizing: inherit;
41 | box-sizing: content-inherit;
42 | }
43 |
44 |
45 | .table-properties {
46 | border-width: 0px;
47 | -webkit-border-vertical-spacing: unset;
48 | }
49 |
50 | .table-properties>tbody>tr>td {
51 | height: 1rem;
52 | }
53 |
54 | .width-100 {
55 | width: 100%;
56 | }
57 |
58 | .queuebar:empty {
59 | display: none;
60 | }
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/ConfigurationAsCodeTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import static org.hamcrest.MatcherAssert.assertThat;
4 | import static org.hamcrest.Matchers.is;
5 | import static org.junit.jupiter.api.Assertions.assertEquals;
6 |
7 | import io.jenkins.plugins.casc.ConfigurationContext;
8 | import io.jenkins.plugins.casc.ConfiguratorRegistry;
9 | import io.jenkins.plugins.casc.misc.ConfiguredWithCode;
10 | import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
11 | import io.jenkins.plugins.casc.misc.Util;
12 | import io.jenkins.plugins.casc.misc.junit.jupiter.WithJenkinsConfiguredWithCode;
13 | import io.jenkins.plugins.casc.model.CNode;
14 | import java.util.List;
15 | import org.jenkins.plugins.lockableresources.util.Constants;
16 | import org.junit.jupiter.api.BeforeEach;
17 | import org.junit.jupiter.api.Test;
18 |
19 | @WithJenkinsConfiguredWithCode
20 | class ConfigurationAsCodeTest {
21 |
22 | // ---------------------------------------------------------------------------
23 | @BeforeEach
24 | void setUp() {
25 | // to speed up the test
26 | System.setProperty(Constants.SYSTEM_PROPERTY_DISABLE_SAVE, "true");
27 | }
28 |
29 | @Test
30 | @ConfiguredWithCode("configuration-as-code.yml")
31 | void should_support_configuration_as_code(JenkinsConfiguredWithCodeRule r) {
32 | LockableResourcesManager LRM = LockableResourcesManager.get();
33 | List declaredResources = LRM.getDeclaredResources();
34 | assertEquals(
35 | 1,
36 | declaredResources.size(),
37 | "The number of declared resources is wrong. Check your configuration-as-code.yml");
38 |
39 | LockableResource declaredResource = declaredResources.get(0);
40 | assertEquals("Resource_A", declaredResource.getName());
41 | assertEquals("Description_A", declaredResource.getDescription());
42 | assertEquals("Label_A", declaredResource.getLabels());
43 | assertEquals("Reserved_A", declaredResource.getReservedBy());
44 | assertEquals("Note A", declaredResource.getNote());
45 |
46 | assertEquals(
47 | 1, LRM.getResources().size(), "The number of resources is wrong. Check your configuration-as-code.yml");
48 |
49 | LockableResource resource = LRM.getFirst();
50 | assertEquals("Resource_A", resource.getName());
51 | assertEquals("Description_A", resource.getDescription());
52 | assertEquals("Label_A", resource.getLabels());
53 | assertEquals("Reserved_A", resource.getReservedBy());
54 | assertEquals("Note A", resource.getNote());
55 | }
56 |
57 | @Test
58 | @ConfiguredWithCode("configuration-as-code.yml")
59 | void should_support_configuration_export(JenkinsConfiguredWithCodeRule r) throws Exception {
60 | ConfiguratorRegistry registry = ConfiguratorRegistry.get();
61 | ConfigurationContext context = new ConfigurationContext(registry);
62 | CNode yourAttribute = Util.getUnclassifiedRoot(context).get("lockableResourcesManager");
63 | String exported = Util.toYamlString(yourAttribute);
64 | String expected = Util.toStringFromYamlFile(this, "casc_expected_output.yml");
65 |
66 | assertThat(exported, is(expected));
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/InteroperabilityTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import hudson.Launcher;
4 | import hudson.model.AbstractBuild;
5 | import hudson.model.BuildListener;
6 | import hudson.model.FreeStyleBuild;
7 | import hudson.model.FreeStyleProject;
8 | import java.util.concurrent.Semaphore;
9 | import java.util.logging.Logger;
10 | import org.jenkins.plugins.lockableresources.util.Constants;
11 | import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
12 | import org.jenkinsci.plugins.workflow.job.WorkflowJob;
13 | import org.jenkinsci.plugins.workflow.job.WorkflowRun;
14 | import org.junit.jupiter.api.BeforeEach;
15 | import org.junit.jupiter.api.Test;
16 | import org.jvnet.hudson.test.JenkinsRule;
17 | import org.jvnet.hudson.test.TestBuilder;
18 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
19 |
20 | @WithJenkins
21 | class InteroperabilityTest extends LockStepTestBase {
22 |
23 | private static final Logger LOGGER = Logger.getLogger(InteroperabilityTest.class.getName());
24 |
25 | // ---------------------------------------------------------------------------
26 | @BeforeEach
27 | void setUp() {
28 | // to speed up the test
29 | System.setProperty(Constants.SYSTEM_PROPERTY_DISABLE_SAVE, "true");
30 | }
31 |
32 | @Test
33 | void interoperability(JenkinsRule j) throws Exception {
34 | final Semaphore semaphore = new Semaphore(1);
35 | LockableResourcesManager.get().createResource("resource1");
36 | WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p");
37 | p.setDefinition(new CpsFlowDefinition(
38 | """
39 | lock('resource1') {
40 | echo 'Locked'
41 | }
42 | echo 'Finish'""",
43 | true));
44 |
45 | FreeStyleProject f = j.createFreeStyleProject("f");
46 | f.addProperty(new RequiredResourcesProperty("resource1", null, null, null, null));
47 | f.getBuildersList().add(new TestBuilder() {
48 |
49 | @Override
50 | public boolean perform(AbstractBuild, ?> build, Launcher launcher, BuildListener listener)
51 | throws InterruptedException {
52 | semaphore.acquire();
53 | return true;
54 | }
55 | });
56 | semaphore.acquire();
57 | FreeStyleBuild f1 = f.scheduleBuild2(0).waitForStart();
58 |
59 | WorkflowRun b1 = p.scheduleBuild2(0).waitForStart();
60 | LOGGER.info("wait for: [resource1] is locked by build " + f1.getFullDisplayName());
61 | j.waitForMessage("[resource1] is locked by build " + f1.getFullDisplayName(), b1);
62 | isPaused(b1, 1, 1);
63 | semaphore.release();
64 |
65 | // Wait for lock after the freestyle finishes
66 | LOGGER.info("wait for2: Lock released on resource [Resource: resource1]");
67 | j.waitForMessage("Lock released on resource [Resource: resource1]", b1);
68 | isPaused(b1, 1, 0);
69 | j.assertBuildStatusSuccess(j.waitForCompletion(f1));
70 | j.assertBuildStatusSuccess(j.waitForCompletion(b1));
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/LockStepTestBase.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 |
5 | import org.jenkinsci.plugins.workflow.graph.FlowGraphWalker;
6 | import org.jenkinsci.plugins.workflow.graph.FlowNode;
7 | import org.jenkinsci.plugins.workflow.job.WorkflowRun;
8 | import org.jenkinsci.plugins.workflow.support.actions.PauseAction;
9 |
10 | public class LockStepTestBase {
11 |
12 | protected static void isPaused(WorkflowRun run, int count, int effectivePauses) {
13 | int pauseActions = 0, pausedActions = 0;
14 | for (FlowNode node : new FlowGraphWalker(run.getExecution())) {
15 | for (PauseAction pauseAction : PauseAction.getPauseActions(node)) {
16 | ++pauseActions;
17 | if (pauseAction.isPaused()) {
18 | ++pausedActions;
19 | }
20 | }
21 | }
22 | assertEquals(count, pauseActions);
23 | assertEquals(effectivePauses, pausedActions);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/LockStepTest_manualUnreserveUnblocksJob.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import static org.hamcrest.MatcherAssert.assertThat;
4 | import static org.hamcrest.Matchers.hasEntry;
5 | import static org.junit.jupiter.api.Assertions.assertEquals;
6 | import static org.junit.jupiter.api.Assertions.assertNotNull;
7 | import static org.junit.jupiter.api.Assertions.assertNull;
8 | import static org.junit.jupiter.api.Assertions.assertTrue;
9 |
10 | import net.sf.json.JSONObject;
11 | import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
12 | import org.jenkinsci.plugins.workflow.job.WorkflowJob;
13 | import org.jenkinsci.plugins.workflow.job.WorkflowRun;
14 | import org.junit.jupiter.api.Test;
15 | import org.jvnet.hudson.test.Issue;
16 | import org.jvnet.hudson.test.JenkinsRule;
17 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
18 |
19 | @WithJenkins
20 | class LockStepTest_manualUnreserveUnblocksJob extends LockStepTestBase {
21 |
22 | @Issue("JENKINS-34433")
23 | @Test
24 | void manualUnreserveUnblocksJob(JenkinsRule j) throws Exception {
25 | LockableResourcesManager.get().createResource("resource1");
26 |
27 | TestHelpers testHelpers = new TestHelpers();
28 | testHelpers.clickButton("reserve", "resource1");
29 | LockableResource resource1 = LockableResourcesManager.get().fromName("resource1");
30 | assertNotNull(resource1);
31 | resource1.setReservedBy("someone");
32 | assertEquals("someone", resource1.getReservedBy());
33 | assertTrue(resource1.isReserved());
34 | assertNull(resource1.getReservedTimestamp());
35 |
36 | JSONObject apiRes = TestHelpers.getResourceFromApi(j, "resource1", false);
37 | assertThat(apiRes, hasEntry("reserved", true));
38 | assertThat(apiRes, hasEntry("reservedBy", "someone"));
39 |
40 | WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p");
41 | p.setDefinition(new CpsFlowDefinition(
42 | """
43 | lock('resource1') {
44 | echo('I am inside')
45 | }
46 | """,
47 | true));
48 |
49 | WorkflowRun r = p.scheduleBuild2(0).waitForStart();
50 | j.waitForMessage("[resource1] is not free, waiting for execution ...", r);
51 | j.assertLogNotContains("I am inside", r);
52 | testHelpers.clickButton("unreserve", "resource1");
53 | j.waitForMessage("I am inside", r);
54 | j.assertLogContains("I am inside", r);
55 | j.assertBuildStatusSuccess(j.waitForCompletion(r));
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/LockableResourceApiTest.java:
--------------------------------------------------------------------------------
1 | /* SPDX-License-Identifier: MIT
2 | * Copyright (c) 2020, Tobias Gruetzmacher
3 | */
4 | package org.jenkins.plugins.lockableresources;
5 |
6 | import static org.hamcrest.MatcherAssert.assertThat;
7 | import static org.hamcrest.Matchers.is;
8 | import static org.junit.jupiter.api.Assertions.assertThrows;
9 |
10 | import hudson.security.FullControlOnceLoggedInAuthorizationStrategy;
11 | import org.htmlunit.FailingHttpStatusCodeException;
12 | import org.jenkins.plugins.lockableresources.util.Constants;
13 | import org.junit.jupiter.api.BeforeEach;
14 | import org.junit.jupiter.api.Test;
15 | import org.jvnet.hudson.test.Issue;
16 | import org.jvnet.hudson.test.JenkinsRule;
17 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
18 |
19 | @WithJenkins
20 | class LockableResourceApiTest {
21 |
22 | // ---------------------------------------------------------------------------
23 | @BeforeEach
24 | void setUp() {
25 | // to speed up the test
26 | System.setProperty(Constants.SYSTEM_PROPERTY_DISABLE_SAVE, "true");
27 | }
28 |
29 | @Test
30 | void reserveUnreserveApi(JenkinsRule j) throws Exception {
31 | LockableResourcesManager.get().createResource("a1");
32 |
33 | j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
34 | j.jenkins.setAuthorizationStrategy(new FullControlOnceLoggedInAuthorizationStrategy());
35 |
36 | JenkinsRule.WebClient wc = j.createWebClient();
37 | wc.login("user");
38 | TestHelpers testHelpers = new TestHelpers();
39 | testHelpers.clickButton("reserve", "a1");
40 | assertThat(LockableResourcesManager.get().fromName("a1").isReserved(), is(true));
41 | testHelpers.clickButton("unreserve", "a1");
42 | assertThat(LockableResourcesManager.get().fromName("a1").isReserved(), is(false));
43 | }
44 |
45 | @Test
46 | @Issue("SECURITY-1958")
47 | void apiUsageHttpGet(JenkinsRule j) {
48 | JenkinsRule.WebClient wc = j.createWebClient();
49 | FailingHttpStatusCodeException e = assertThrows(
50 | FailingHttpStatusCodeException.class, () -> wc.goTo("lockable-resources/reserve?resource=resource1"));
51 | assertThat(e.getStatusCode(), is(405));
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/LockableResourceRootActionSEC1361Test.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (c) 2019, CloudBees, Inc.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 | package org.jenkins.plugins.lockableresources;
25 |
26 | import static org.hamcrest.CoreMatchers.not;
27 | import static org.hamcrest.CoreMatchers.nullValue;
28 | import static org.hamcrest.MatcherAssert.assertThat;
29 | import static org.hamcrest.Matchers.greaterThanOrEqualTo;
30 |
31 | import hudson.security.FullControlOnceLoggedInAuthorizationStrategy;
32 | import java.util.List;
33 | import java.util.concurrent.atomic.AtomicReference;
34 | import org.htmlunit.FailingHttpStatusCodeException;
35 | import org.htmlunit.html.HtmlElement;
36 | import org.htmlunit.html.HtmlElementUtil;
37 | import org.htmlunit.html.HtmlPage;
38 | import org.junit.jupiter.api.Test;
39 | import org.jvnet.hudson.test.Issue;
40 | import org.jvnet.hudson.test.JenkinsRule;
41 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
42 |
43 | @WithJenkins
44 | class LockableResourceRootActionSEC1361Test {
45 |
46 | @Test
47 | void regularCase(JenkinsRule j) throws Exception {
48 | checkXssWithResourceName(j, "resource1");
49 | }
50 |
51 | @Test
52 | @Issue("SECURITY-1361")
53 | void noXssOnClick(JenkinsRule j) throws Exception {
54 | checkXssWithResourceName(j, "\"); alert(123);//");
55 | }
56 |
57 | private static void checkXssWithResourceName(JenkinsRule j, String resourceName) throws Exception {
58 | LockableResourcesManager.get().createResource(resourceName);
59 |
60 | j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
61 | j.jenkins.setAuthorizationStrategy(new FullControlOnceLoggedInAuthorizationStrategy());
62 |
63 | JenkinsRule.WebClient wc = j.createWebClient();
64 | wc.login("user");
65 |
66 | final AtomicReference lastAlertReceived = new AtomicReference<>();
67 | wc.setAlertHandler((page, s) -> lastAlertReceived.set(s));
68 |
69 | // disable exceptions, otherwise it will not parse jQuery scripts (used ba DataTable plugin)
70 | wc.getOptions().setThrowExceptionOnScriptError(false);
71 | HtmlPage htmlPage = wc.goTo("lockable-resources");
72 | assertThat(lastAlertReceived.get(), nullValue());
73 |
74 | // currently only one button but perhaps in future version of the core/plugin,
75 | // other buttons will be added to the layout
76 | List allButtons = htmlPage.getDocumentElement().getElementsByTagName("button");
77 | assertThat(allButtons.size(), greaterThanOrEqualTo(1));
78 |
79 | HtmlElement reserveButton = null;
80 | for (HtmlElement b : allButtons) {
81 | String action = b.getAttribute("data-action");
82 | if (action != null && action.contains("reserve")) {
83 | reserveButton = b;
84 | }
85 | }
86 | assertThat(reserveButton, not(nullValue()));
87 |
88 | try {
89 | HtmlElementUtil.click(reserveButton);
90 | } catch (FailingHttpStatusCodeException e) {
91 | // only happen if we have a XSS, but it's managed using the AlertHandler to ensure it's a XSS
92 | // and not just an invalid page
93 | }
94 | assertThat(lastAlertReceived.get(), nullValue());
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/LockableResourceTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 | import static org.junit.jupiter.api.Assertions.assertFalse;
5 | import static org.junit.jupiter.api.Assertions.assertNotEquals;
6 | import static org.junit.jupiter.api.Assertions.assertNotNull;
7 | import static org.junit.jupiter.api.Assertions.assertNull;
8 |
9 | import java.util.Date;
10 | import org.junit.jupiter.api.Test;
11 |
12 | class LockableResourceTest {
13 |
14 | private final LockableResource instance = new LockableResource("r1");
15 |
16 | // Not sure how useful this is...
17 | @Test
18 | void testGetters() {
19 | assertEquals("r1", instance.getName());
20 | assertEquals("", instance.getDescription());
21 | assertEquals("", instance.getLabels());
22 | assertEquals("", instance.getNote());
23 | assertNull(instance.getReservedBy());
24 | assertNull(instance.getReservedTimestamp());
25 | assertFalse(instance.isReserved());
26 | assertFalse(instance.isQueued());
27 | assertFalse(instance.isQueued(0));
28 | assertFalse(instance.isQueuedByTask(1));
29 | assertFalse(instance.isLocked());
30 | assertNull(instance.getBuild());
31 | assertEquals(0, instance.getQueueItemId());
32 | assertNull(instance.getQueueItemProject());
33 | }
34 |
35 | @Test
36 | void testNote() {
37 | final LockableResource resource = new LockableResource("Name 1");
38 |
39 | assertEquals("", resource.getNote());
40 |
41 | resource.setNote("Note 1");
42 | assertEquals("Note 1", resource.getNote());
43 |
44 | resource.setNote("Note B");
45 | assertEquals("Note B", resource.getNote());
46 |
47 | resource.setNote("");
48 | assertEquals("", resource.getNote());
49 | }
50 |
51 | @Test
52 | void testUnqueue() {
53 | instance.unqueue();
54 | }
55 |
56 | @Test
57 | void testSetBuild() {
58 | instance.setBuild(null);
59 | }
60 |
61 | @Test
62 | void testSetReservedBy() {
63 | instance.setReservedBy("");
64 | }
65 |
66 | @Test
67 | void testReservedTimestamp() {
68 | instance.setReservedTimestamp(null);
69 | assertNull(instance.getReservedTimestamp());
70 |
71 | final Date date = new Date();
72 | instance.setReservedTimestamp(date);
73 | assertEquals(date, instance.getReservedTimestamp());
74 | }
75 |
76 | @Test
77 | void testReserve() {
78 | instance.reserve("testUser1");
79 | assertEquals("testUser1", instance.getReservedBy());
80 | assertNotNull(instance.getReservedTimestamp());
81 | }
82 |
83 | @Test
84 | void testUnReserve() {
85 | instance.unReserve();
86 | assertNull(instance.getReservedBy());
87 | assertNull(instance.getReservedTimestamp());
88 | }
89 |
90 | @Test
91 | void testReset() {
92 | instance.reset();
93 | }
94 |
95 | @Test
96 | void testToString() {
97 | assertEquals("r1", instance.toString());
98 | }
99 |
100 | @Test
101 | void testEquals() {
102 | assertNotEquals(null, instance);
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/NodesMirrorTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 | import static org.junit.jupiter.api.Assertions.assertNotNull;
5 | import static org.junit.jupiter.api.Assertions.assertNull;
6 |
7 | import java.util.logging.Logger;
8 | import org.jenkins.plugins.lockableresources.util.Constants;
9 | import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
10 | import org.jenkinsci.plugins.workflow.job.WorkflowJob;
11 | import org.jenkinsci.plugins.workflow.job.WorkflowRun;
12 | import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep;
13 | import org.junit.jupiter.api.Test;
14 | import org.jvnet.hudson.test.JenkinsRule;
15 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
16 |
17 | @WithJenkins
18 | class NodesMirrorTest {
19 |
20 | private static final Logger LOGGER =
21 | Logger.getLogger(org.jenkins.plugins.lockableresources.NodesMirror.class.getName());
22 |
23 | @Test
24 | void mirror_few_nodes(JenkinsRule j) throws Exception {
25 | System.setProperty(Constants.SYSTEM_PROPERTY_ENABLE_NODE_MIRROR, "true");
26 |
27 | LOGGER.info("add agent: FirstAgent");
28 | j.createSlave("FirstAgent", "label label2", null);
29 | LOGGER.info("add agent: SecondAgent");
30 | j.createSlave("SecondAgent", null, null);
31 |
32 | // this is asynchronous operation, so wait until resources are created.
33 | LOGGER.info("wait for resources");
34 | for (int i = 1;
35 | !LockableResourcesManager.get().resourceExist("FirstAgent")
36 | && !LockableResourcesManager.get().resourceExist("SecondAgent")
37 | && i <= 10;
38 | i++) {
39 | Thread.sleep(100);
40 | }
41 |
42 | LOGGER.info("check agent: FirstAgent");
43 | LockableResource firstAgent = LockableResourcesManager.get().fromName("FirstAgent");
44 |
45 | assertEquals("FirstAgent", firstAgent.getName());
46 | // ! jenkins add always the node name as a label
47 | assertEquals("FirstAgent label label2", firstAgent.getLabels());
48 |
49 | LockableResource secondAgent = LockableResourcesManager.get().fromName("SecondAgent");
50 | assertEquals("SecondAgent", secondAgent.getName());
51 | assertEquals("SecondAgent", secondAgent.getLabels());
52 |
53 | // delete agent
54 | j.jenkins.removeNode(j.jenkins.getNode("FirstAgent"));
55 |
56 | for (int i = 1; LockableResourcesManager.get().fromName("FirstAgent") == null && i <= 10; i++) {
57 | Thread.sleep(100);
58 | }
59 | assertNull(LockableResourcesManager.get().fromName("FirstAgent"));
60 | assertNotNull(LockableResourcesManager.get().fromName("SecondAgent"));
61 | }
62 |
63 | @Test
64 | void mirror_locked_nodes(JenkinsRule j) throws Exception {
65 | System.setProperty(Constants.SYSTEM_PROPERTY_ENABLE_NODE_MIRROR, "true");
66 |
67 | j.createSlave("FirstAgent", "label label2", null);
68 | // this is asynchronous operation, so wait until resources has been created.
69 | for (int i = 1; LockableResourcesManager.get().fromName("FirstAgent") != null && i <= 10; i++) {
70 | Thread.sleep(100);
71 | }
72 | assertNotNull(LockableResourcesManager.get().fromName("FirstAgent"));
73 |
74 | WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p");
75 | p.setDefinition(new CpsFlowDefinition(
76 | """
77 | lock(label: 'label && label2', variable : 'lockedNode') {
78 | echo 'wait for node: ' + env.lockedNode
79 | semaphore 'wait-inside'
80 | }
81 | echo 'Finish'""",
82 | true));
83 | WorkflowRun b1 = p.scheduleBuild2(0).waitForStart();
84 | j.waitForMessage("wait for node: FirstAgent", b1);
85 | SemaphoreStep.waitForStart("wait-inside/1", b1);
86 | j.jenkins.removeNode(j.jenkins.getNode("FirstAgent"));
87 | SemaphoreStep.success("wait-inside/1", null);
88 | // this resource is not removed, because it was locked.
89 | Thread.sleep(1000);
90 | assertNotNull(LockableResourcesManager.get().fromName("FirstAgent"));
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/TestHelpers.java:
--------------------------------------------------------------------------------
1 | /* SPDX-License-Identifier: MIT
2 | * Copyright (c) 2020, Tobias Gruetzmacher
3 | */
4 | package org.jenkins.plugins.lockableresources;
5 |
6 | import static org.hamcrest.MatcherAssert.assertThat;
7 | import static org.hamcrest.Matchers.hasEntry;
8 | import static org.hamcrest.Matchers.is;
9 | import static org.hamcrest.Matchers.not;
10 | import static org.hamcrest.Matchers.nullValue;
11 | import static org.mockito.Mockito.when;
12 |
13 | import hudson.model.FreeStyleProject;
14 | import hudson.model.Queue;
15 | import java.io.IOException;
16 | import java.util.logging.Logger;
17 | import jenkins.model.Jenkins;
18 | import net.sf.json.JSONArray;
19 | import net.sf.json.JSONObject;
20 | import org.jenkins.plugins.lockableresources.actions.LockableResourcesRootAction;
21 | import org.jvnet.hudson.test.JenkinsRule;
22 | import org.kohsuke.stapler.StaplerRequest2;
23 | import org.kohsuke.stapler.StaplerResponse2;
24 | import org.mockito.Mock;
25 | import org.mockito.MockitoAnnotations;
26 |
27 | public final class TestHelpers {
28 |
29 | private static final Logger LOGGER = Logger.getLogger(TestHelpers.class.getName());
30 |
31 | private static final int SLEEP_TIME = 100;
32 | private static final int MAX_WAIT = 5000;
33 |
34 | @Mock
35 | private StaplerRequest2 req;
36 |
37 | @Mock
38 | private StaplerResponse2 rsp;
39 |
40 | private final AutoCloseable mocks;
41 |
42 | // Utility class
43 | public TestHelpers() {
44 | this.mocks = MockitoAnnotations.openMocks(this);
45 | }
46 |
47 | public static void waitForQueue(Jenkins jenkins, FreeStyleProject job) throws InterruptedException {
48 | waitForQueue(jenkins, job, Queue.Item.class);
49 | }
50 |
51 | /** Schedule a build and make sure it has been added to Jenkins' queue. */
52 | public static void waitForQueue(Jenkins jenkins, FreeStyleProject job, Class> itemType)
53 | throws InterruptedException {
54 | LOGGER.info("Waiting for job to be queued...");
55 | int waitTime = 0;
56 | while (!itemType.isInstance(jenkins.getQueue().getItem(job)) && waitTime < MAX_WAIT) {
57 | Thread.sleep(SLEEP_TIME);
58 | waitTime += SLEEP_TIME;
59 | if (waitTime % 1000 == 0) {
60 | LOGGER.info(" " + waitTime / 1000 + "s");
61 | }
62 | }
63 | }
64 |
65 | /**
66 | * Get a resource from the JSON API and validate some basic properties. This allows to verify that
67 | * the API returns sane values while running other tests.
68 | */
69 | public static JSONObject getResourceFromApi(JenkinsRule rule, String resourceName, boolean isLocked)
70 | throws IOException {
71 | JSONObject data = getApiData(rule);
72 | JSONArray resources = data.getJSONArray("resources");
73 | assertThat(resources, is(not(nullValue())));
74 | JSONObject res = (JSONObject) resources.stream()
75 | .filter(e -> resourceName.equals(((JSONObject) e).getString("name")))
76 | .findAny()
77 | .orElseThrow(() -> new AssertionError("Could not find '" + resourceName + "' in API."));
78 | assertThat(res, hasEntry("locked", isLocked));
79 | return res;
80 | }
81 |
82 | public static JSONObject getApiData(JenkinsRule rule) throws IOException {
83 | return rule.getJSON("plugin/lockable-resources/api/json").getJSONObject();
84 | }
85 |
86 | /** Simulate the click on the button in the LRM page
87 | * note: Currently does not click on the button. Just simulate the doAction (stapler request)
88 | * on the given resource.
89 | * We shall provide some better solution like selenium tests. But for now it is fine.
90 | */
91 | public void clickButton(String action, String resourceName) throws Exception {
92 | LOGGER.info(action + " on " + resourceName);
93 | LockableResourcesRootAction doAction = new LockableResourcesRootAction();
94 | when(req.getMethod()).thenReturn("POST");
95 | when(req.getParameter("resource")).thenReturn(resourceName);
96 |
97 | switch (action) {
98 | case "reserve": {
99 | doAction.doReserve(req, rsp);
100 | break;
101 | }
102 | case "unreserve": {
103 | doAction.doUnreserve(req, rsp);
104 | break;
105 | }
106 | case "unlock": {
107 | LOGGER.info("doUnlock");
108 | doAction.doUnlock(req, rsp);
109 | break;
110 | }
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScriptTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkins.plugins.lockableresources.util;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 | import static org.junit.jupiter.api.Assertions.assertNull;
5 |
6 | import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript;
7 | import org.junit.jupiter.api.Test;
8 | import org.jvnet.hudson.test.JenkinsRule;
9 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
10 |
11 | @WithJenkins
12 | class SerializableSecureGroovyScriptTest {
13 |
14 | @Test
15 | void testRehydrate(JenkinsRule r) throws Exception {
16 | SerializableSecureGroovyScript nullCheck = new SerializableSecureGroovyScript(null);
17 | assertNull(nullCheck.rehydrate(), "SerializableSecureGroovyScript null check");
18 |
19 | // SecureGroovyScript(@NonNull String script, boolean sandbox, @CheckForNull
20 | // List classpath)
21 | SecureGroovyScript emptyGroovy = new SecureGroovyScript("", false, null);
22 | SerializableSecureGroovyScript emptyCode = new SerializableSecureGroovyScript(emptyGroovy);
23 | assertEquals("", emptyCode.rehydrate().getScript(), "SerializableSecureGroovyScript empty check");
24 |
25 | SecureGroovyScript someGroovy = new SecureGroovyScript("echo 'abc'", false, null);
26 | SerializableSecureGroovyScript someCode = new SerializableSecureGroovyScript(someGroovy);
27 | assertEquals(
28 | "echo 'abc'", someCode.rehydrate().getScript(), "SerializableSecureGroovyScript some script check");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/test/resources/org/jenkins/plugins/lockableresources/casc_expected_output.yml:
--------------------------------------------------------------------------------
1 | declaredResources:
2 | - description: "Description_A"
3 | labels: "Label_A"
4 | name: "Resource_A"
5 | note: "Note A"
6 | reservedBy: "Reserved_A"
7 |
--------------------------------------------------------------------------------
/src/test/resources/org/jenkins/plugins/lockableresources/configuration-as-code.yml:
--------------------------------------------------------------------------------
1 | ---
2 | ####################################################
3 | # Configuration as Code config file for unit tests #
4 | ####################################################
5 | jenkins:
6 | systemMessage: "Welcome to the Lockable Resource Jenkins Server"
7 | unclassified:
8 | lockableResourcesManager:
9 | declaredResources:
10 | - description: "Description_A"
11 | labels: "Label_A"
12 | name: "Resource_A"
13 | reservedBy: "Reserved_A"
14 | note: "Note A"
15 |
--------------------------------------------------------------------------------
/src/test/resources/plugins/jobConfigHistory.hpi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jenkinsci/lockable-resources-plugin/624189eb942fe88bf63c53625940c630e5fcd437/src/test/resources/plugins/jobConfigHistory.hpi
--------------------------------------------------------------------------------