Croway opened a new pull request, #16773:
URL: https://github.com/apache/camel/pull/16773

   This PR adds two commands to Camel JBang that expose test-infra services via 
CLI
   
   `camel infra list` - Lists all the available services
   ```
   ➜  camel git:(execute-test-infra-camel-cli) CamelJBang infra list
   ---
   ignite: []
   azure-storage-queue:
   - "storage-queue"
   openldap: []
   event-bridge: []
   xmpp: []
   kinesis: []
   redis: []
   aws-lambda: []
   aws-config: []
   lambda: []
   elastic-search: []
   aws-secrets-manager: []
   elasticsearch: []
   hazelcast: []
   arangodb: []
   aws-kinesis: []
   chatscript: []
   azure:
   - "storage-queue"
   - "storage-blob"
   aws-dynamo-db: []
   ...
   ```
   
   `camel infra run $SERVICE` - Run any services available in the list
   ```
   ➜  camel git:(execute-test-infra-camel-cli) CamelJBang infra run redis
   Starting service redis
   ---
   port: 32771
   host: "localhost"
   getServiceAddress: "localhost:32771"
   
   To stop the execution press q
   ```
   
   In order to do so, after decoupling junit from test-infra, the following was 
done:
   
   - Added a new marker annotation @InfraService, the annotation is used to 
describe the services (ala google AutoService with more informations related to 
the test service)
   - A maven Mojo 
[CamelTestInfraGenerateMetadataMojo.java](https://github.com/apache/camel/compare/main...Croway:execute-test-infra-camel-cli?expand=1#diff-b5cdcfab9c50ae3a4c73e0c219f7f5979be580201feb0f727cdbfb3a5e63f78c)
 that gathers all the annotations via jandex index and create a json file 
containing all the information, service class, aliases, implementation class, 
and implementation alias
   - A new test-infra module, camel-test-infra-all that gathers all the 
test-infra dependencies and execute the Mojo to generate the json file
   - The actual implementation in Camel JBang that reads the generated JSON 
file and visualizes it (let's discuss how, right now aliases and 
implementationAliases are exposed as yaml) or, in case of run, uses the 
reflection to run the service and print the informations provided by the 
Service Interface


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to