Expand my Community achievements bar.

SOLVED

How to migrate JTW to OAuth2 and use it in the Jenkins pipeline?

Avatar

Level 1

I have a pipeline in Jenkins that uses JWT to start AEM pipelines. Has anyone done this migration, could you help me?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 1

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. 

View solution in original post

4 Replies

Avatar

Community Advisor

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-t...

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

Avatar

Correct answer by
Level 1

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. 

Avatar

Community Advisor

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/ope....

 

Hope this helps



Esteban Bustamante

Avatar

Level 1

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