-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
2.176.1
Its currently possible to use the following dsl below when checking out code in a declarative pipeline:
checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) )
It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like:
checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) )
This could be something i could help contribute if its acceptable?!
Implementation Process
- List existing symbol definitions from configuration as code matched with $Class samples for that symbol (create a checklist of symbols to create)
- Select a symbol and add a test for the symbol as a $Class form
- Add the symbol
- Add a test that uses the symbol instead of the $Class form
- Confirm symbol appears in Pipeline syntax generator
- Confirm symbol appears in Configuration as Code
- Confirm configuration as code can still read previous configuration files
- Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax
- Write documentation for the symbol in the plugin README so that it is available outside of Jenkins
Existing Symbol Definitions
JCasC Parent | JCasC Symbol | Class Sample | Symbol Sample |
---|---|---|---|
Col A0 | Col A1 | Col A2 | |
git | branches | branches | |
branches | name | branches: [[name: 'origin/master']] | branches: [[name: 'origin/master']] |
extensions | localBranch | [$class:'LocalBranch', localBranch: '**'] | localBranch('**') |
traits | localBranch | N/A (not in a Jenkinsfile) | localBranchTrait |
See the Karl Shultz pull request for progress.
- duplicates
-
JENKINS-62130 Add @Symbol annotations in git plugin Pipeline steps
-
- Closed
-
- is related to
-
JENKINS-62130 Add @Symbol annotations in git plugin Pipeline steps
-
- Closed
-
- relates to
-
JENKINS-37227 Metastep support for checkout step
-
- Open
-
[JENKINS-58503] Symbols for Extensions
Assignee | Original: Mark Waite [ markewaite ] |
Link | New: This issue relates to JENKINS-37227 [ JENKINS-37227 ] |
Assignee | New: Mark Waite [ markewaite ] |
Description |
Original:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! |
New:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax |
Description |
Original:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax |
New:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |Col A0 |Col A1 |Col A2 | | |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |
Description |
Original:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |Col A0 |Col A1 |Col A2 | | |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |
New:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |
Description |
Original:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |
New:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |Col A0 |Col A1 |Col A2 | | |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |traits |localBranchTrait |N/A (not in a Jenkinsfile) |localBranchTrait | |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Description |
Original:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |Col A0 |Col A1 |Col A2 | | |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |traits |localBranchTrait |N/A (not in a Jenkinsfile) |localBranchTrait | |
New:
Its currently possible to use the following dsl below when checking out code in a declarative pipeline: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ $class: 'RelativeTargetDirectory', relativeTargetDir: 'some-dir' ]] ) ){noformat} It would be nice if it could support a richer dsl rather than the current $class syntax for extensions. e.g. something like: {noformat} checkout( git( branches: [[name: '*/master']], extensions: [[ relativeTargetDir('some-dir') ]] ) ){noformat} This could be something i could help contribute if its acceptable?! h2. Implementation Process * List existing symbol definitions from configuration as code matched with {{$Class}} samples for that symbol (create a checklist of symbols to create) * Select a symbol and add a test for the symbol as a {{$Class}} form * Add the symbol * Add a test that uses the symbol instead of the {{$Class}} form * Confirm symbol appears in Pipeline syntax generator * Confirm symbol appears in Configuration as Code * Confirm configuration as code can still read previous configuration files * Write help for the symbol, assure it is clear, correct, complete, and visible in the online Pipeline syntax h3. Existing Symbol Definitions ||JCasC Parent ||JCasC Symbol ||Class Sample ||Symbol Sample || |Col A0 |Col A1 |Col A2 | | |git |branches |branches | | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |branches |name |branches: [[name: 'origin/master']] |branches: [[name: 'origin/master']] | |extensions |localBranch |[$class:'LocalBranch', localBranch: '**'] |localBranch('**') | |traits |localBranchTrait |N/A (not in a Jenkinsfile) |localBranchTrait | See my [working branch|https://github.com/MarkEWaite/git-plugin/tree/add-localbranch-symbol] for progress. |
Link |
New:
This issue is related to |