How to migrate JTW to OAuth2 and use it in the Jenkins pipeline? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Luis_Thiagodo

Hi, @estebanbustamante 

Thanks for the reply, I have already followed these steps. I am thinking about the best way to write the script in the jenkins pipeline. 

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 18, 2024

Hi, 

You need to update your configuration in Adobe Developer Console https://developer.adobe.com/console/home to connect to Cloud Manager Pipelines. You can follow these guides:

https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/authentication/jwt-to-oauth-migration

https://experienceleague.adobe.com/en/docs/experience-cloud-kcs/kbarticles/ka-22080 

 

After that you will get a token, you need to use that token in your Jenkins Pipeline, I imagine your Jenkins pipeline is currently using a JWT token, so you need to update the credentials to Oauth, and it should work.

 

Hope this helps

Esteban Bustamante
Luis_ThiagodoAuthorAccepted solution
November 18, 2024

Hi, @estebanbustamante 

Thanks for the reply, I have already followed these steps. I am thinking about the best way to write the script in the jenkins pipeline. 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 18, 2024

Well, once you have the token, you just need to trigger an HTTP request from Jenkins. There are various ways to do this: you can explore the Http_request plugin at https://www.jenkins.io/doc/pipeline/steps/http_request/ for that, or directly use a "curl" command. Check out this post: https://dzone.com/articles/streamlining-your-workflow-with-the-jenkins-http-r-1.

This is the reference for the type of request you need to trigger using the CloudManager API: https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/#tag/Pipeline-Execution/operation/startPipeline.

 

Hope this helps

Esteban Bustamante
November 25, 2024

@estebanbustamante Thank you for support! I followed your instructions and was successful.