Github Actions provides a way to Automate, customize, and execute your software development workflows right in your Github repository.
Github Actions is a continuous integration and continuous delivery (CI/CD) platform that automates build, test, and deployment pipelines. It also allows you to execute code in the repository when certain events occur, making it easy to extend and customize.
In this Blog we will showcase how to build GitHub Actions Workflow for deploying the integration flow using Integration Suite Piper Commands.
A workflow is a series of actions initiated once a triggering event occurs. For example, the triggering event can be some commit pushed to a GitHub repository, the creation of a pull request etc.
The set of instructions for a workflow is kept in a workflow file and written in YAML. The workflow file specifies what commands or scripts to run, the default settings, the environment for the commands, etc.
The workflow is divided into jobs, and each job performs a set of steps. Each step runs one or more commands and can also call self-contained units of commands called actions. Each step runs on computational resources called runners, and the default settings can specify it to be Windows or Linux.
Lets build a workflow which deploy the integration flow in to the SAP Cloud integration Tenant
Create a Workflow
1. Create a repository and name it .github/workflows inside the GitHub repository GithubActionsDemo.
2. Create a yml file and name it iflowDeploy.yml.
3. Paste the following code inside the iflowDeploy.yml file.
name: SAP Cloud Integration deploy IFlow Test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: integrationArtifactDeploy
uses: SAP/project-piper-action@main
with:
step-name: integrationArtifactDeploy
flags: --apiServiceKey ${{ secrets.CPIAPISERVICEKEYCREDENTIALSID }} --integrationFlowId PurchaseOrderHandlerDemo
4. Copy the SAP Cloud Integration Service Key for API Plan from SAP BTP Cockpit
5. Copy the JSON Content to the Text Editor and remove line breaks and spaces. make complete JSON appear in single line without any such line breaks or spaces.
For example: {"oauth":{"createdate":"2022-11-02T09:48:13.398Z","clientid":"sb-47bbf5d2-d764-45d7-ba46-d6bd540cc4c6!b17976|it!b2455","url":"https://XXX.it-cpi999.cfapps.us10.hana.ondemand.com","clientsecret":"c52bbcff-ca23-4f90-b01f-73b0f552ebb6$fXqdreVaI13WTn8cdgXNW5Tt83RfvFg9pyVYBAVz8WI=","tokenurl":"https://XXX.authentication.usXX.hana.ondemand.com/oauth/token"}}
6. Create repository secret and save above content by name CPIAPISERVICEKEYCREDENTIALSID
To test the workflow in the committed workflow file:
From the results you can see that integrationArtifactDeploy piper command successfully executed.
7. Verify the integration flow deployment in to SAP Cloud integration Tenant
As you see below integration flow PurchaseOrderHandlerDemo deployed in to SAP Cloud integration tenant runtime.
In this way you can use any of the Integration Suite piper commands referred in my earlier blog in the GitHub Actions project and implement you own CI/CD pipelines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 |