Hi Team,
to trigger Adobe Cloud Manager CI/CD pipeline for a program/project via jenkins. i found there are two ways
- installing Adobe Cloud Manager plugin and configure AIO integration to access the pipelines and trigger it
- in Jenkins job - using bash script to run Adobe IO CLI commands to trigger the ACM pipeline after Adobe IO integration
Query 1 - which option is best suits in terms of implementation ? or any other way ?
Query 2 - i am able to execute configured Adobe Cloud Manager pipelines but unable get the response of success or failure even if Adobe IO events has been configured and webhook setting is enabled still events are not getting triggered to send response back to Jenkins
Solved! Go to Solution.
yes, you can generate the token on demand, let me share the postman collection
Hi @sonuk85184451
If I've understood the requirement correctly then you need to trigger cloud pipeline via Jenkins.
If so, instead of creating "Event" in cloud manager project in AIO, you can create API.
After doing so, you'd be able to generate "Token" that is required to trigger API.
Now, coming to the your options:
1. For sure, you can setup AIO via command line and that be used to trigger pipeline. On the another hand, you can trigger pipeline via bash as well. However, to trigger the pipeline you require to have "token". About token - it expires every 24 hours. So, you need to find a way to get the valid token to trigger pipeline. What I've seen is project developing pipeline not in just shell scripting but written in Python which provides much more flexibility and libraries. If you do so you need to find a way to get the valid token via python so it can be utilised to trigger pipeline. For that, you can have a look at following code snippet:
https://www.linkedin.com/pulse/generate-jwt-token-aem-cloud-manager-api-himanshu-singhal/?trackingId...
2. If instead of using "Event", you configure API and trigger pipeline via API, you'd get the response.
Here you find Cloud APIs' https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/
Hope this helps!
Thanks @Himanshu_Singhal for responding
I am new to this setup .
so you are saying better to create token using curl command everytime before triggering the pipeline execution using jenkins job ?
via API , how to call it via jenkins job ? curl command ? will API will able to revert the current pipeline execution after its completed or failed back to Jenkins job ?
possible for you to explain the end to end flow i.e triggering the pipeline using jenkins job and getting the execution status back to Jenkins job
you can call cloud manager http api or CLI to check execution, trigger execution from Jenkins.
you can find all possible command at
https://github.com/adobe/aio-cli-plugin-cloudmanager
cloud manager would not be returning anything by itself, you have to poll for the status and reflect same in the jenkins.
Example : The step and their status you can check using api/cli in every 30 sec.
Thanks @arunpatidar - one query.. for calling using API / CLI . in jenkins job only we need to generate JWT token using command line tool as JWT token expiry is 24 hrs?
apart from https://www.linkedin.com/pulse/generate-jwt-token-aem-cloud-manager-api-himanshu-singhal/?trackingId... via python script do we have any other way to do the same ? like using curl command or bash script ?
yes, you can generate the token on demand, let me share the postman collection
Views
Likes
Replies