Continuous delivery is a method to develop software with short feedback cycles. It is applicable to projects both for SAP Cloud Platform and SAP on-premise platforms. SAP implements tooling for continuous delivery in project "Piper".
This repository contains a GitHub Action to integrate with project "Piper". It allows you to use project "Piper" in a convinient way with GitHub Actions. You might also manually download the cli and use it in a shell script, if the action does not what you need.
Please refer to the GitHub Actions documentation for general information on how to use actions.
As an example, if your projects uses Maven you can run it like this:
name: CI
on:
push:
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: mavenBuild
uses: SAP/project-piper-action@master
with:
command: mavenBuild
- name: mavenExecuteStaticCodeChecks
uses: SAP/project-piper-action@master
with:
command: mavenExecuteStaticCodeChecks
The key command
needs to be replaced with the command you want to use.
The help
command shows which commands are available.
Optionally you may use flags
to provide command line arguments.
Configuration is done in .pipeline/config.yml
in your project's repository.
See here for information on configuration.
For example, if you use Karma, you might need to configure it differently based on how your project is set up. An example might be:
steps:
karmaExecuteTests:
installCommand: npm install --quiet --no-audit
runCommand: npm test
First, install the dependencies and build the distributable:
npm install
npm run prepare
You'll get a distributable file in dest
.
Make sure the distributable is up-to-date before you push.
To try it out locally, you may use Docker:
docker build . -f DevEnv.Dockerfile -t project-piper-action
docker run -it --rm project-piper-action bash
$ node index.js
For convinience those steps are wrapped into startDevEnv.sh
.
To provide inputs, you may set environment variables with the right names as in this example:
INPUT_COMMAND=version INPUT_FLAGS='-v' node index.js
This software runs on GitHub Actions with Linux hosts.
No known issues as of now.
Feel free to open new issues for feature requests, bugs or general feedback on the GitHub issues page of this project.