6

Touchless Deployment 🚀- CI/CD Process using Github Actions | SAP Blogs

 1 year ago
source link: https://blogs.sap.com/2022/06/29/touchless-deployment-ci-cd-process-using-github-actions/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Touchless Deployment - CI/CD Process using Github Actions

10 9 354

Previous Article : Introducing Touchless Deployment  & Working Session

Dear All,

In this article, describes how you can automate your SQL deployments to SAP Commission database automatically using Touchless Deployment API’s through CI/CD Process from Github Actions.

Every customer adheres to the CI/CD Process to ensure that their deployment code is compatible, uses version control, and maintains an approval process for deployment because technology is developing quickly.

github actions

Continuous integration and continuous deployment (CI/CD) is defined as a set of operating principles and capabilities that enables software changes to be delivered to users in a timely, repeatable, and secure manner by introducing automation into software development processes

https://s33168.pcdn.co/wp-content/uploads/2018/11/word-image-128.png

Benefits of continuous integration:

  • Prevent integration errors
  • Committing code frequently
  • Continuous feedback mechanisms
  • Catch bugs early
  • and many more

Tools for continuous integration:

There are many tools for CI. Some of the popular tools are:

  • SAP Continuous Integration and Deployment
  • Jenkins
  • Bitbucket Pipelines
  • AWS CodePipeline
  • CircleCI
  • GitHub Actions

1325-code-fork-outline.gifQuickstart using GitHub Actions to deploy your DB Objects

Try out the features of GitHub Actions in 5 minutes or less to deploy your SQL DB Objects automatically using Touchless API’s provided by SAP Commissions

Introduction

You only need a GitHub repository to create and run a GitHub Actions workflow. In this article, you’ll see a workflow that demonstrates some of the essential features of GitHub Actions.

The following example shows you how GitHub Actions jobs can be automatically triggered, where they run, and how they can interact with the code in your repository.

Viewing your workflow results

  • On GitHub.com, navigate to the main page of your repository. (Sample repo of my project)
    2022-06-28_22-56-56.png
  • Under your repository name, click    Actions.
    2022-06-28_22-56-56-1.png
  • In the left sidebar, click the workflow you want to see.  As you see in the screenshot, I have 3 ways to execute the workflow – Curl, Nodejs and Python to deploy. so whichever you know the programming language,, you can prefer to write it.
    2022-06-28_23-13-31.png
  • From the list of workflow runs, click the name of the run you want to see.
    2022-06-28_23-16-15.png
  • Under Jobs , click the Explore-GitHub-Actions job.
    2022-06-28_23-17-09.png
    Once Jobs is successful, you can see the information in the database with all the details related to sql statement is executed which was in my Folder1 in github repo.
    2022-06-28_23-19-47.png
  • The log shows you how each of the steps was processed. Expand any of the steps to view its details.

encryption.gifAdd a repository secret

you need to add your SAP Commissions Rest API credentials to secret, so that its secured and nobody can see from your repository code.  Below example is provided.

Secrets in GitHub Actions - Octopus Deploy
  1. Open your project’s repository in GitHub and click Settings in the top menu.
  2. Click Secrets in the left menu.
  3. Click New repository secret.
  4. Complete the following fields and click Add secret:
    • Name – give your secret a suitable name. You can’t use spaces or special characters other than underscores.
    • Value – enter the secret, such as your API key.

You can update the value of your secret at any time. Return to Secrets in the repository menu and click Update on the secret you need to change.

2022-06-28_23-02-08.png

References

Git Flow : https://steven-giesel.com/blogPost/ff50f268-c0bf-44d8-a5b8-41554ab50ba8

Closing Thoughts for Developers motivation

EtpYeiXVkAEF_Xv.jpg

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK