Closed sgokaram-saagie closed 4 years ago
tested in 1.1.30 :
➜ test plugin gradle dataops gradle platformList
Task :platformList FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':platformList'.
Cannot invoke method toUpperCase() on null object
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 954ms 1 actionable task: 1 executed
I found the issue
For this request we need 2 more params:
the jwt
because the endpoint to call isn't in the graphql API
and the realm
to be able to forge the required cookie token (that was the "Cannot invoke method toUpperCase() on null object" problem).
So I add a check to know if these params are given or not :) we'll need to update the doc
TLDR; You need the following:
saagie {
server {
[...]
jwt = true
realm = "your realm"
}
}
Le realm a l'air de correspondre à cette valeur:
Ok i've update the doc and my test.
Not better :
➜ test plugin gradle dataops gradle platformList
Task :platformList FAILED Missing params in plugin configuration: https://github.com/saagie/gradle-saagie-dataops-plugin/wiki/projectsList
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':platformList'.
Missing params in plugin configuration: https://github.com/saagie/gradle-saagie-dataops-plugin/wiki/projectsList
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 957ms 1 actionable task: 1 executed
===> the help link is not good.
server { url = 'https://saagie-beta.prod.saagie.io' login = 'youen.chene' password = xxx jwt = true realm = 'saagie' }
ok, the realm token is optional (computed from the url); The error was the automatic uppercased realm (but it seems to work previously :/ )
Well : saagie { server { url = ’https://saagie-beta.prod.saagie.io' login = ‘youen.chene’ password = ‘xxx’ //environment = 4 jwt = true realm = ‘saagie’ } ==> environment cannot be empty Missing required params in plugin configuration, check that you have url, environment, login and password defined in your server object. You can’t know your envirnoment is you didn’t do a platformL.ist before.Well : saagie { server { url = ’https://saagie-beta.prod.saagie.io' login = ‘youen.chene’ password = ‘xxx’ //environment = 4 jwt = true realm = ‘saagie’ } ==> environment cannot be empty Missing required params in plugin configuration, check that you have url, environment, login and password defined in your server object. You can’t know your envirnoment is you didn’t do a platformList before.
https://github.com/saagie/gradle-saagie-dataops-plugin/wiki/platformList