Más contenido relacionado
La actualidad más candente (20)
Similar a #SitBERN modern abap development with abapgit (20)
#SitBERN modern abap development with abapgit
- 2. 2© emineo AG
whoami
Christian Günter
emineo AG
• based in Zürich
• ~80 employees
• IT Consulting
• Software Engineering
• SAP, Java and Webtechnologies
@chris_guenter
christian.guenter@emineo.ch
- 4. 4© emineo AG
What is git?
What is git?
Version control system
decentral and file based
Created 2005 by Linus Torvalds
Open Source
De facto standard in non SAP software development
Git hosting services: GitHub, GitLab, BitBucket, SCP…
- 5. 5© emineo AG
What is git?
Source: OpenSAP - SAP Cloud Platform Version Control with Git by Arnaldo Cavazos
- 6. 6© emineo AG
Git client implemented in ABAP
Open source project
Started in 2014 by Lars Hvam Petersen
MIT license
Hosted on GitHub
http://abapgit.org
What is abapGit?
What is abapGit?
- 7. 7© emineo AG
What is abapGit?
49 Cotributors et.al.
Alexander Tsybulsky Eduardo Copat
Oliver Jägle Svitlana Shlapak
Andrei Vishnevsky Bohdan Petrushchak
Graham Robinson Gregor Wolf
Nuno Godinho Fabio Zuber
Fabian Lupa Christian Günter
Christian Tapia Sabogal Domi Bigl
Giovanni Degani Kasper Vilhelm Torp
Christian Pfaller Alex Chan
Lars Hvam Petersen Pascal
Jakub Filak Johannes Konings
- 8. 8© emineo AG
What is abapGit?
What is abapGit?
Online and offline repositories
~62 000 lines of code
Min. release 7.02
3 000 commits
82 supported object types (CLAS, PROG, etc.)
- 9. 9© emineo AG
What is abapGit?
Design goals of abapGit
Easy to install
Easy to update
Small system footprint
Code in the repository is readable
- 10. 10© emineo AG
Why abapGit?
Why abapGit?
Lack of features in SAP version control
Versions are written during transport release
Temporary versions are deleted
Limited control for the developer
No easy undo mechanism
Some objects without proper version control
e.g. Smartforms
- 11. 11© emineo AG
Why abapGit?
Why abapGit?
Limited traceability
What changed during the last two weeks?
What changed since last release/transport?
How did the code base look like three months ago?
- 13. 13© emineo AG
Why abapGit?
Why abapGit?
abapGit as backup
Simplified and riskless experiments
More transparency
Enabler for DevOps
Enabler for code reviews
No substitute for SAP transport and release management
abapGit as code archive or grave yard
- 14. 14© emineo AG
Why abapGit?
Why abapGit?
Install and contribute to open source projects
http://dotabap.org/ - overview of ABAP projects
Inofficial successor of SAPLink
- 19. 19© emineo AG
abapGit @emineo
abapGit @emineo
Two ABAP based products
Two SAP development teams
01/2018: Start with abapGit in one team
One development system each product
BitBucket git server
Git is default in non SAP teams
- 22. 22© emineo AG
abapGit @emineo
Offline repositories
Custom development
Export zip
Commit and push with local git client
Usually no import
Backup
Central ABAP knowledge database
- 23. 23© emineo AG
abapGit @emineo
Migration of custom development
Migrations
Zip file is exported
Search and replace because of naming conventions
Import Zip file in Offline repository
Lots of repetitions – missing objects
Objects are collected in a dummy transport request
- 24. 24© emineo AG
abapGit @emineo
It works
Lessons learned
KISS
Pratice with demo repos
Keep your packages small
Do experiments
Steep learning curve of git -> good online ressources
- 25. 25© emineo AG
abapGit @emineo
Communication is important
Lessons learned
Ongoing process of learning and improvement
abapGit is improved steadily
You can fix bugs yourself – and publish them
Trust is important
You can develop new features
- 26. 26© emineo AG
abapGit @emineo
Develop both products with abapGit
Goals
Optimize our git workflow – more branches?
Use pull requests in BitBucket
Do code reviews in BitBucket
All ABAP development is in a git repo
- 27. 27© emineo AG
abapGit on SCP
”For code exchange, ABAP PaaS uses the well-known open
source solution abapGit (http://docs.abapgit.org).”
Source: https://blogs.sap.com/2018/09/04/sap-cloud-platform-abap-environment/
“We know that up to now, version control in ABAP is rather limited, and there is
little support for branching, merging or CI/CD (continuous integration/delivery)
tool chains. The goal is to renovate the ABAP step by step using a version
control system like Git without sacrificing the benefits of the ABAP change and
transport system.”
- 33. 33© emineo AG
How does abapGit work?
One package (+ subpackages) = one git repository
Paket: $DSAG_DEMO
- 39. 39© emineo AG
How does abapGit work?
https://github.com/christianguenter2/DSAG_DEMO.git
DSAG_DEMO repository on GitHub