Hi, my name is Denys van Kempen, SAP HANA Academy.
You are watching a video tutorial that is part of a series about the SAP Business Technology
Platform, SAP Extension Suite certification.
The topic of this tutorial is continuous integration and delivery
This video was recorded in June 2022.
For the latest tutorials on the topic, please check the playlist.
SAP Continuous Integration and Delivery is listed as topic with a weight of 9%, about
7 questions, minor topic.
In the training material, the topic is covered in the unit Automated Deployment,
covering connecting to a GitHub repository,
explaining the concepts,
enabling SAP Continous Integration and Delivery, which is a BTP service with a web interface,
an app, where we configure jobs and monitor.
In the trial environment, under Entitlements, Service Assignments
we can see the service listed.
In the regular enterprise environment, you would need to sign up for this service.
and add the service plan to the subaccount.
We have already covered how to assign entitlements to subaccounts,
assume you are familiar with the steps
We can then navigate to the subaccount, service marketplace
and find the service listed.
Here we can create a subscription,
but before doing so, let’s first take a brief look at the documentation
on the SAP Help Portal
There’s a guide, the introduction guide, explaining the principles.
Continous integration defined ... a software development process
frequent contributions to the main line, automated build testing
and continous delivery expanding the concept
the most current version of the software product is successfully built, tested, and provided
in shippable format
with the process flow illustrated
recommend to take a look at this guide
the CI principles are also covered in some detail
but this goes beyond what you are expected to know for the exam, out of scope
As with the other BTP services, there is entry in the service catalog for SAP Continuous
Integration and Delivery on the SAP Discovery Center.
Here we can find pricing information.
The available plans and regions.
With links to the documentation under Resources
Of course, continuous integration and delivery is not an SAP invention,
so apart from the BTP service, which lets you configure and run predefined pipelines,
SAP also provides Piper, an open-source project,
=
with preconfigured Jenkins pipelines which you can use in your own infrastructure, using
a shared library and Docker images,
plus, we just looked at this, a best practices guide,
with an illustration mapping how the solutions fit in terms of flexibility and required expertise
on the project-piper.io website you can find more information about Project Piper.
If you want to learn more about continuous delivery using SAP technologies, highly recommended,
but out-of-scope for the exam, the specifics, the small print that is.
back to the service
create subscription
takes a few seconds
as for most of the BTP services or subscriptions, they come with a couple of roles and role
collections
Administrator and Developer
which we then have to assign to our user account
either by editing the role collection
and adding the user or user group
or
by editing the user
and assign the desired role collections.
Then,
we can go to the application
simple UI
we have jobs, repositories, and credentials
here we can add our GitHub credentials, for example, in case our code respository is hosted
by Github
username, password, or username, access token
=
now, I going to assume this will be familiar to most of you
so very quickly, to just cover the steps
you can sign up for a free account on github.com
create a new repository
for the extension suite learning journey business case the name RiskManagement is used, but
you can use any name you want, of course
then go to your account
settings
developer settings
personal access tokens
generate new token
give it a name
expiration
with the scopes: repo, user, and admin: repo_hook
limited privileges
so, if we then return to our Continueous Integration and Delivery app
we can create a credential with a much more limited scope compared to full control with
username, password
next, also create credentials for your cloud foundry environment,
with your BTP account
Then we can add a repository
give it a name
the clone URL
you can get this from GitHub, Clone dialog
select the credentials we just created
and the rest we can leave as is
Next, we can add a job.
Click the plus
Give the job a name
select the repository
provide the branch
the pipeline
and here we can select the different pipeline kinds available, SAP Integration Suite, Fiori,
Cloud Application Programming model,
that’s the one we need here
under stages, configuration mode, select Source Repository
and create
back to the Repositories tab
add a webhook
this enables the repository to start builds
copy the payload URL
In GitHub, navigate to the repository and select Settings
under Code and Automation, select Webhooks
Add webhook
paste in the payload URL
content type is application/json
and for the secret,
go back to the Webhook Creation dialog
copy
paste
add webhook
done
Switching back to the Business Application Studio
Now we can run the ‘cds add pipeline’ command.
As with cds add hana, cds add mta,
cds add pipeline, adds the required files and configuration to support pipelines.
In this case, this concerns a Jenkinsfile
which requires a suitable Jenkins instance, and this is what the CI/CD BTP service provides.
There is nothing to configure here.
The CDS command also created a .pipeline folder, containing a config YAML file
This we need to configure, adding the cfTarget, the Cloud Foundry org, space, and apiEndpoint.
Here we have a working example
So we can now run our git commands
git add
git commit
git push
Now, we can return to our Continuous Integration and Delivery app
select the risk-management-job
and trigger a build
Now, in this case we did a bit of quick-and-dirty cloning of repositories, and for some reason,
the build takes a while,
we get an error, a failure, so we will have to do this properly.
However, as mentioned, you are not expected to have fully mastered git for this exam.
It can be a bit tricky.
What you do need to know is how the parts relate, Github, the CICD BTP service, and
Business Application Studio, how to set this up, and some general understading of the continous
integration, deployment, and delivery topic.
But again, it is a minor topic, don’t get bogged down in trying to master git.
Should you do want to learn more about git, see the git website, there is also a free
book
tutorials on GitHub.com
or on the SAP Developers website,
there are tutorials about Git, and CI/CD integration here as well.
You can find the links to the resources mentioned in the description of this video below.
This video tutorial was recorded by Denys van Kempen, SAP HANA Academy.
Any good?
Give us a like, and for updates, don’t forget to subscribe.
Thanks for watching.