saagie / gradle-saagie-dataops-plugin

Saagie Gradle Plugin for the new version (2.0) of Saagie Dataops Orchestrator
Apache License 2.0
2 stars 0 forks source link

Add platformList #64

Closed sgokaram-saagie closed 4 years ago

sgokaram-saagie commented 4 years ago

https://github.com/saagie/gradle-saagie-dataops-plugin/wiki/platformList

youenchene commented 4 years ago

tested in 1.1.30 :

➜ test plugin gradle dataops gradle platformList

Task :platformList FAILED

FAILURE: Build failed with an exception.

BUILD FAILED in 954ms 1 actionable task: 1 executed

DecampsRenan commented 4 years ago

I found the issue For this request we need 2 more params: the jwtbecause the endpoint to call isn't in the graphql API and the realmto 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: image

youenchene commented 4 years ago

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.

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' }

DecampsRenan commented 4 years ago

ok, the realm token is optional (computed from the url); The error was the automatic uppercased realm (but it seems to work previously :/ )

youenchene commented 4 years ago

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.