This article shows how to design and setup an automated CI/CD process and framework for webMethods.io
using the inbuilt APIs (or CLI). Here we have used Azure DevOps as our orchestration platform,
GitHub as repository platform and Postman/Newman as test framework.
When organizations start using webMethods.io Integration for business use-cases, the need for having a continuous integration and delivery process becomes very important. These processes will enable the business to have a "Faster release rate", "More Test reliability" & "Faster to Market".
This use-case will highlight a solution utilizing webMethods.io import & export APIs (or CLI) and Azure Devops to extract and store the code assets in repository (GitHub). By integrating repository workflows and azure pipelines, this process will automate the promotion of assets to different stages/environment as per the organizations promotion workflow. This will also showcase how to automate the test framework for respective stages/environments.
The automation around webMethods.io Integration APIs have been implemented using scripts, which will make customization easier if the organization chooses to adopt an alternative orchestration platform.
- 4 Environments: Play/build, Dev, QA & Prod.
- Azure DevOps as Orchestration Platform
- GitHub: as the code repository
- GitHub Enterprise: For Pipelines/Scripts
- Postman/Newman as test framework
We will assume that the organization is following the below GIT Workflows.
- Initialize
- Developer starts by executing Initialize Pipeline (Automation)
- This checks if the request is for an existing asset or a new implementation
- If new, automation will
- Initialize a repository
- Create standardized branches, including requested Feature Branch
- Create a project in Play/Build environment
- If existing, automation will
- Clone the Prod branch to Feature branch
- Import asset to Play/Build environment
API's Used
- /projects/{{projectName}},
- /projects/{{projectName}}/workflow-import,
- /projects/{{projectName}}/flow-import,
- /ut-flow/referencedata/{{projectUID}}/{{referenceDataName}},
- /ut-flow/referencedata/create/{{projectUID}},
- /ut-flow/referencedata/update/{{projectUID}}/{{referenceDataName}},
- /projects/{{projectName}}/params/{{parameterUID}},
- /projects/{{projectName}}/params
- Develop & Commit
- Developer starts developing
- After completion they will execute synchronizeToFeature Pipeline (Automation)
- Automation will
- Export the asset
- Commit the asset to Feature Branch
API's Used
- /projects/{{projectName}}/workflows/{{assetID}}/export,
- /projects/{{projectName}}/flows/{{assetID}}/export,
- /projects/{{projectName}}/assets,
- /projects/{{projectName}}/accounts,
- /ut-flow/referencedata/{{projectUID}},
- /ut-flow/referencedata/{{projectUID}}/{{referenceDataName}},
- /projects/{{projectName}}/params/{{parameterUID}},
- /projects/{{projectName}}/params
- Deliver / Promote to DEV
- Once the implementation is finished, developer manually creates a Pull Request from Feature Branch to DEV
- This will trigger the synchronizeToDev pipeline (Automation)
- Automation will
- Checkout the DEV branch
- Import the asset to DEV environment
- And then kicks off automated test for the associated project/repo with data/assertions specific to DEV
- On failure, developer needs to fix/re-develop the asset (Step 2).
API's Used
- /projects/{{projectName}},
- /projects/{{projectName}}/workflow-import,
- /projects/{{projectName}}/flow-import,
- /ut-flow/referencedata/{{projectUID}}/{{referenceDataName}},
- /ut-flow/referencedata/create/{{projectUID}},
- /ut-flow/referencedata/update/{{projectUID}}/{{referenceDataName}},
- /projects/{{projectName}}/params/{{parameterUID}},
- /projects/{{projectName}}/params
- /projects/{{projectName}}/workflows/{{assetID}}/run
- /projects/{{projectName}}/flows/{{assetName}}/run
- Deliver / Promote to QA
- After Dev cycle is complete, developer manually creates a Pull Request from Feature Branch to QA.
- This will trigger the synchronizeToQA pipeline (Automation)
- Automation will
- Checkout the QA branch
- Import the asset to QA environment
- And then kicks off automated test for the associated project/repo with data/assertions specific to QA
- On failure, developer needs to fix/re-develop the asset (Step 2).
API's Used: SAME AS STEP 3
- Deliver / Promote to PROD
- Once the automated test and UAT is successfully finished, developer manually creates a Pull Request from Feature Branch to PROD. PROD deployment may have different approval cycle.
- Respective operations team will manually trigger the synchronizeToPROD pipeline (Automation)
- Automation will
- Checkout the PROD branch
- Create a release
- Import the asset to PROD environment
- And then kicks off automated Smoke test, if any for PROD.
- On failure, developer needs to fix/re-develop the asset (Step 2). And release will be rolled back.
API's Used: SAME AS STEP 3
- Repository for automation, scripts & sample assets. Github: https://github.softwareag.com/PS/webmethods_io_int_cicd
- Presentation: https://github.softwareag.com/PS/webmethods_io_int_cicd/blob/main/presentation/webMethodsIO_Integration_CICD.pptx
- Demo recording:
- API Documentation: https://docs.webmethods.io/integration/apis/webmethods_api_ref/#reference-data-apis
- CLI Repository: https://github.com/SoftwareAG/webmethods-io-integration-apicli
- Incorporate design for Hybrid use-case
- Extend testing framework
- Incorporate design for code review
- Clone / Fork the automation repo
- Adjust the environment configs
- Configure your Azure DevOps tenant
- Create Project
- Link automation repo to get the pipelines
- In project settings, create Service Connections for Automation repository and Code Repository
- Start the "Initialize" pipeline
- Check that the respective repo and webMethods.io project is created
- Import sample assets from automation repo
- Start "synchronizeToFeature" pipeline
- Check whether new assets have been committed to feature branch
- Adjust the test cases for each environment from automation repo and commit it code repo feature branch created above. Note: Follow the folder structure documented
- Create a Pull Request in code repository from Feature Branch to DEV
- Start "synchronizeToDev" pipeline. (This has been automated for Github, please refer to Github automation document).
- Check code has been Imported/Promoted to Dev environment
- Check whether Test has been automatically triggered.
📘 Explore the Knowledge Base
Dive into a wealth of webMethods tutorials and articles in our Tech Community Knowledge Base.
💡 Get Expert Answers
Stuck or just curious? Ask the webMethods experts directly on our Forum.
🚀 Try webMethods
See webMethods in action with a Free Trial.
✍️ Share Your Feedback
Your input drives our innovation. If you find a bug, please create an issue in the repository. If you’d like to share your ideas or feedback, please post them here.
More to discover
These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.