30,350 questions
1
vote
1
answer
43
views
Casting in a collection iteration?
I'm not sure what these things are called in groovy, so please forgive the awkward phrasing . . .
I have a HashMap of HashMaps that I want to iterate over:
def h1 = ['one': ['first': 'foist', 'second':...
0
votes
0
answers
140
views
How to enforce a specific Java patch version (21.0.9-tem) across multiple Gradle projects?
I have a workspace with multiple independently-cloned Gradle repositories that all need to use the same exact Java patch version (21.0.9-tem) for reproducible builds:
workspace/
├── repo-a/
│ ├── ...
0
votes
1
answer
46
views
How to print or log from Groovy policy in Boomi API Gateway (Gravitee underlying gateway)?
I am using Boomi API Management, and the underlying API Gateway is Gravitee APIM Gateway 3.3.13 running in standalone mode.
I’m trying to print/log some debug values inside a Groovy policy.
In ...
1
vote
0
answers
55
views
How to use a local groovy class in the Jenkinsfile?
I am trying to load a class from my git repository (which is not a shared library), but I run into serialization problems. I have a class ProductData in src/com/mycode/ProductData.groovy. The class ...
0
votes
0
answers
52
views
Groovy SDK for ODI: Create and Map Logical Schema to Physical in Topology
In Oracle Data Integrator (ODI 12.2.1.4), I'm automating topology creation using Groovy SDK. I can create Data Servers and Physical Schemas, but stuck on creating Logical Schemas and mapping them to ...
0
votes
1
answer
76
views
Groovy script not working in Jenkins job, but it does on script console
I have the following Groovy/pipeline script I use as an "Active Choice Parameter." I run it in a Groovy sandbox or as an approved script. It gets a job's successful builds' display names and ...
0
votes
0
answers
65
views
Grails 3.3.10 to 4.0.4 validation problem
I have an old project in grails 3.3.10 and try to migrate to 4.0.4 (step by step, finally to 7)
I have problem with cmds
Caused by: groovy.lang.MissingMethodException: No signature of method: xxx....
0
votes
0
answers
91
views
How to create an atomic unabortable step in jenkins
I have a Jenkins pipeline with a critical stage that runs my custom .NET CLI performing important tasks. I want this stage to be fully atomic, meaning that if someone tries to abort the build while ...
Advice
1
vote
1
replies
31
views
How do Groovy (Jenkins pipeline) singletons work?
Say I have the following classes.
@Singleton
class EnvMgr {
private String environment = "default"
String getEnvironment() {
return environment
}
def setEnvironment(...
0
votes
0
answers
25
views
Jenkins Groovy list user login with Groovy script
I am Rajeswari
In the groovy script i have to filter who login in Jenkins but
I am able to filter the user list all in the manage/security Realm the user list So
How to use it
they is no direct method ...
0
votes
0
answers
54
views
Call GORM's .list() in trait with generic type
In my Grails 6 project, I'd like to add an additional feature to select domain classes, so I defined a custom trait.
trait MyDomainClassTrait<D> implements GormEntity<D> {}
// domain ...
2
votes
1
answer
76
views
How to escape 'properties' in JsonSlurper in Groovy 5?
In Groovy 4.x it was possible to escape the 'properties' keyword when using JsonSlurper using getAt('properties') like below:
import groovy.json.JsonSlurper
def json = new JsonSlurper().parseText(&...
0
votes
0
answers
57
views
TypeChecked extension for JetBrains GDSL files
I'm using JetBrains GDSL files which are a way to define extra methods and properties that are available at runtime to a Groovy script. My use case is for Jenkins pipeline steps but the GDSL ...
0
votes
1
answer
63
views
How to reuse method in loaded script from main script in Jenkins without using libraries
I have a main Groovy file with defined methods, and I've loaded a second Groovy script.
main-script.groovy
node('Node1'){
Method1()
Method2()
def loadedSecondScript = load('./second-...
0
votes
0
answers
102
views
How can I keep track of expired time in a timeout{} step?
Say I have this recursive function in a Jenkins pipeline. It's initially called by another function, but then calls itself recursively.
def recursiveFunction(final Integer timeout) {
static Integer ...