BMC AMI DevX Code Pipeline-Git Integration
Summary
The purpose of this Test Drive is to highlight the integration between BMC AMI DevX Code Pipeline and Git, This integration for DevX Code Pipeline enables developers working in Topaz Workbench to clone mainframe source code stored in Git server (GitHub, BitBucket, etc.), make code changes, compile and test on the mainframe with the same tools and processes used on non-mainframe platforms.
Use Case
A developer,
- Creates a feature branch in BMC AMI DevX Workbench for Eclipse
- Makes a change to COBOL program
- Using tools in DevX Workbench for Eclipse, builds and tests the code
- Once successfully tested, commits the branch and the code changes to Git server (via EGit plugn)
- The commit triggers a webhook defined in Git server to run a rep-configured Jenkins multi-branch pipeline job
- The Jenkins job synchronizes between Git and DevX Code Pipeline, builds and tests the code again and runs the CI/CD pipeline
- In Git server, a Pull Request is created for the change against the MAIN branch
- Pull Request is merged with the MAIN, which triggers the Jenkins job again
- The Jenkins job synchronizes between Git and DevX Code Pipeline, builds and tests the code again and runs the CI/CD pipeline
- After a successful merge, the feature branch is deleted
- Finally, a promote of task in DevX Code Pipeline-Git perspective promotes the task to DevX Code Pipeline PROD level
The following diagram illustrates a possible DevOps toolchain which this script accomplishes.
DevOps Toolchain with DevX Code Pipeline-Git Integration
Instructions:
- This guide contains many screenshots to provide a visual reference
- Every action you must take is in "Do This..." info box
- Please note each place that you must enter your own specific ID or number
- You must complete each step before proceeding to the next to successfully follow the guide
Cleanup
This deletes the local git repositories as well as the local project from your local disk and you are ready to re-start the script from "Setup" or "Initialize" section.
Setup
Substitute your values in the screenshots
In this Test Drive the screen shots provided have used specific values that may differ from your assigned values. These were provided in your email notice.
Variable | Your Assigned Values |
Application | T<nnn> |
SubAppl | T<nnn> |
Assignment Prefix | T<nnn> |
* For the value of <nnn>, substitute the last three digits of your Test Drive username.
During this Test Drive you will encounter terms specific to DevX Code Pipeline. Here is a glossary for your convenience.
Term | Description |
Application | Business Area |
Stream | Development Life-Cycle used by one or more Applications |
Life-Cycle | Transitional Code States (DEV, QA, PROD) in the Development Life-Cycle |
Level | Instance of a Code State (DEV, QA, PROD) |
Component | SCM managed object such as a COBOL source member |
Component Version | An immutable version of a Component |
Task | An instance of a unit of work. For example, a change to a Component |
Part | A generated object such as a load module, or a Listing or a DBRM |
Warehouse | Storage location for inactive historical or overlaid Component Versions (source and parts) |
Assignment Container | A package of one or more, usually related, Tasks. A development container that is used to organize and manage development work |
Release Container | A package of Tasks from one or more Assignment Containers. An operational container that is used to organize and manage operational releases |
Set Container | A package of Tasks at an instance in time. A special DevX Code Pipeline container that is used internally to organize and manage work requests |
Add Task | Make a statement of intent, often because of some impact analysis |
Checkout Task | Copy source to development area |
Edit Task | Make a change to the source in the development area |
Generate Task | Execute Compile and Link processes |
Promote Task | Move Task forward to the next Level in the Life-Cycle |
Regress Task | Move Task backwards to the previous Level in the Life-Cycle |
Delete Task | Remove a Task from the development area |
Fallback Task | Restore previous version of Task |
Deploy Task | Implement Task in one or more Run Time environments |
Initialize
Clone Repository
In this step, you will be cloning a MAIN branch in Git server into your local repository in DevX Workbench.
Create a Feature Branch
In this step, you will create a feature branch locally for your work within Topaz workbench
You'll notice that the Project Explorer view got refreshed to the newly created feature branch.
Modify a program locally
In this step, you will be making a simple change to a COBOL program in your local feature branch.
Generate (Compile) the program locally
In this step, you will make sure the changes made to the program do not break the code by issuing an DevX Code Pipeline Generate command locally.
DevX Code Pipeline will automatically generate the program and switches to "Console" view where you can see that a new Assignment container got created and the task loaded to DEV level in DevX Code Pipeline.
Commit to Git Server
In this step, you will commit the new feature branch as well as the modified program into Git server.
A push branch dialog pops up
Push Results confirmation dialog pops up to confirm that commit was successful. Click Close.
Create Pull Request and Merge
In this step, you will take on multiple roles (developer, code reviewer, approver, etc.) in order to go through the process of creating a pull request for your feature branch, approving the pull request, merging your feature branch changes with your Main branch. Finally, after a successful merge, delete your feature branch.
This will launch Chrome browser with multiple pre-configured tabs
This will bring up the "Open a Pull Request" screen
Promote to PROD in DevX Code Pipeline
In this step, you can optionally promote the code from DevX Code Pipeline STG level to PROD level in case you want to use "fallback" feature of DevX Code Pipeline for emergency situations.
This will bring the "Assignment" view with tasks in it
A "Promotion Successful" dialog pops up. Click "OK".
Congratulations! This completes the BMC AMI DevX Code Pipeline-Git integration Test Drive script.
Next Steps