SAP GITLAB CI PIPELINE
The idea behind this blog is to explain the approach used for setting up a GITLAB CI pipeline from SAP ECC system. The technical Proof of Concept (POC) should not be confused with building complete solution and was done aiming to improve the speed of SAP software delivery, better visibility with quality intact.
- Configure GITLAB – Refer https://about.gitlab.com/installation/
- Configure Pipeline Triggers (GITLAB Project Settings -> CI/CD -> Pipeline triggers)
- Configure Runners – Use shared runners
- Create access tokens
Certificates (Perform in SAP)
- Go to STRUST transaction -> SSL client SSL Client (Standard).
- Certificate -> Import Certificate -> Add to Certificate List
- After uploading, you should be able to see the details in Certificate List and Own Certificate-> Subject. Select SAVE.
SAP RFC Connections
- Configure RFC Connection (SM59) -> HTTP connections to External Server. Also set the Target Host (GITLAB URL) and Prefix (Project Link).
- SM59 -> Logon & Security
- Logon with user – Select Do not use a user
- Logon with ticket – Do not send logon ticket
- Security Options – SSL : Active, SSL Certificate : Default SSL Client (Standard)
- Test the connection
As an initial step, a framework program was built in SAP which executes and captures the Unit Test, Code Coverage and Code Inspector results.
Based on the parameters, the framework program will start its execution and generates a report as shown below. This report in SAP, will display the Passed/Failed Unit Test Cases, Code Coverage Results and the Code Inspector Results.
The framework program will then share the Pass/Fail information to the GITLAB pipeline and accordingly the individual task is updated.
As mentioned above, POC was done to bring visibility to outside users (Non SAP). I was able to successfully update the GITLAB pipeline with the status of Unit Test results, Coverage Threshold and Code Inspector status. Once I have a SOLMAN instance, will continue with the Deployment Phase through GITLAB pipeline.
For the mentioned POC, the trigger was set in SAP itself as I did not find it useful in pushing the code to GitLab from Eclipse and then trigger the Build phase. SAP has its own version control system, transport, rollback mechanisms and setting up the trigger in GitLab will increase the pipeline complexity and in real-time, they do not prove to be useful.
Let me know your views… Thanks !!
Hi Josh Jacob !
This solution will be shared as open source?
Probably YES once ám done with the CD 🙂
If you need help with this, count on me 😉
Hi Josh Jacob any news on resolving the CD task? Altough project piper is out there, as Gitlab is lightweight and heavily used, I think a solution with Gitlab CI is still under demand.