Skip to Content
Author's profile photo Josh Jacob

SAP GITLAB CI PIPELINE

Introduction

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.

Configurations

GITLAB

  1. Configure GITLAB – Refer https://about.gitlab.com/installation/
  2. Configure Pipeline Triggers (GITLAB Project Settings -> CI/CD -> Pipeline triggers)
  3. Configure Runners – Use shared runners
  4. Create access tokens

Certificates (Perform in SAP)

  1. Go to STRUST transaction -> SSL client SSL Client (Standard).
  2. Certificate -> Import Certificate -> Add to Certificate List
  3. After uploading, you should be able to see the details in Certificate List and Own Certificate-> Subject. Select SAVE.

SAP RFC Connections

  1. Configure RFC Connection (SM59) -> HTTP connections to External Server. Also set the Target Host (GITLAB URL) and Prefix (Project Link).
  2. SM59 -> Logon & Security
    1. Logon with user – Select Do not use a user
    2. Logon with ticket – Do not send logon ticket
    3. Security Options – SSL : Active, SSL Certificate : Default SSL Client (Standard)
    4. Test the connection

POC Delivery

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.

 

 

 

Findings/Summary

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 !!

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Raphael Pacheco
      Raphael Pacheco

      Hi Josh Jacob !

      Cool initiative!

      This solution will be shared as open source?

      Best regards,

      Pacheco.

      Author's profile photo Josh Jacob
      Josh Jacob
      Blog Post Author

      Probably YES once ám done with the CD 🙂

      Author's profile photo Raphael Pacheco
      Raphael Pacheco

      Cool!

      If you need help with this, count on me 😉

       

      Author's profile photo Thomas Mundt
      Thomas Mundt

      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.