Question about marathon deployment

8 views
Skip to first unread message

Samuel Mutel

unread,
Mar 2, 2018, 11:08:51 AM3/2/18
to Jenkins Users
Hello,

To start a docker container through marathon, I use this piece of code which is working fine:

withCredentials([
  string(credentialsId: '1d759531-1e0d-40b8-a434-911d97c58d36', variable: 'DCOS_PRIVATE_KEY')
]) {
  marathon(
    forceUpdate: true,
    credentialsId: '{"uid":"cicd","login_endpoint":"${env.DCOS_ENDPOINT}","scheme":"RS256","private_key":"$DCOS_PRIVATE_KEY"}',
    filename: 'Marathon.json'
  )
}

The variable env.DCOS_ENDPOINT contains https://qdcos.xit.rxcorp.com/acs/api/v1/auth/login.
We can see that I use the IP of the leader in the url field which is not good. If the leader is down or if the leader has changed, the deployment will fail.
So I tried to replace by the line below but it does not work:


I tried to connect with cicd account so I don't think that it's a issue on the account.
I think that it's work because the endpoint on the leader does not need any authentication. So in fact it works but the authentication is not mandatory.
Using the url https://qdcos.xit.rxcorp.com/marathon, the authentication seems to be mandatory. It's why it does not work.

Any help should be appreciated !
Thanks.
Reply all
Reply to author
Forward
0 new messages