abapGit / abapgit-api-rfc

abapgit-api-rfc
MIT License
9 stars 1 forks source link

abapGit API

This API enables you to perform essential abapGit functions on a remote SAP system.

Overview

abapGit API can be used for building your CI tools and integrations.

It allows you to perform the following actions:

  1. Link the repository
  2. Pull the repository
  3. Switch the branch
  4. Unlink the repository

Requirements and installation

  1. Install the sapcli
  2. Install PyRFC
  3. Add a configuration file (as documented in the sapcli repository)
  4. The remote SAP system must have abapGit developer version and abapgit-api-rfc (this repo) installed

Usage

Create link

ZABAPGIT_API_RFC_LINK

example:

sapcli startrfc -c bapi ZABAPGIT_API_RFC_LINK -S=GIT_REPO_URL:https://github.com/abapGit/background_modes -S=GIT_USER:filak-sap -S=GIT_PASSWORD:${MY_GH_TOKEN} -S=ABAP_PACKAGE:'$BACKGROUND_MODES'

Pull Repo

ZABAPGIT_API_RFC_PULL

example:

sapcli startrfc -c bapi ZABAPGIT_API_RFC_PULL -S=ABAP_PACKAGE:'$BACKGROUND_MODES' -S=GIT_USER:filak-sap -S=GIT_PASSWORD:${MY_GH_TOKEN}

Switch branch

ZABAPGIT_API_RFC_SWITCHBRANCH

example:

sapcli startrfc -c bapi ZABAPGIT_API_RFC_SWITCHBRANCH -S=ABAP_PACKAGE:'$BACKGROUND_MODES' -S=GIT_USER:filak-sap -S=GIT_PASSWORD:${MY_GH_TOKEN} -S=BRANCH_NAME:main

Unlink

ZABAPGIT_API_RFC_UNLINK

example:

sapcli startrfc -c bapi ZABAPGIT_API_RFC_UNLINK -S=ABAP_PACKAGE:'$BACKGROUND_MODES'