This repository contains an example of how a CI/CD approach can be achieved with an ABAP S4/ECC project.
- abapGit: Serializing objects and having a git approach for ABAP developments
- abapLint: Syntax check based on a defined rule set
- ADASH: Run ABAP unit tests
- TRM: Publish and distribute software ready for production environments
The source and target SAP systems are instances of ABAP Platform 1909 provided by Nuve Platform.
The source instance is where all the code changes are performed and committed to this repository; it's also where the TRM release will be generated.
When ready to distribute, a new ABAP Platform 1909 instance is generated but this time from a blank backup (a snapshot where this example package was never installed): this will simulate the first install of a TRM package.
The branching strategy of this repository is trunk-based:
the main branch is protected, only allowing merge from pull requests.
Merges to main are prevented (by pull request rules) if something wrong with the tests is detected.
abapLint will check for syntax errors on each commit.
Each commit to any branch other than main will trigger a workflow that checks all of the unit tests in the package (using ADASH).
Releases are generated with Github Releases.
When a Github Release is created, the TRM publish workflow will trigger.
The release can then be found on the registry here https://trmregistry.com/#/package/abapcicd.
As soon as the TRM release is completed, the TRM install workflow is triggered.
Steps:
- All code is written in a central development system
- Commits are done in a new branch
- Trigger abapLint syntax check
- Trigger ABAP Unit tests (ADASH executed on central development system)
- When ready, pull request from branch -> main
- If all checks ok, merge
- When ready, manually create a new Github release
- Trigger TRM Publish (from central development system)
- TRM Release published
- Trigger TRM Install (in this case, run and install on a new instance of ABAP Platform 1909 on Nuve Platform)