Skip to content

Commit

Permalink
Add workflow for CI/CD pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
engswee committed Sep 24, 2024
1 parent ccbed18 commit ca54d93
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/sync-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: sync-and-deploy
on:
workflow_dispatch:
push:
branches:
- devtober-demo

jobs:
# Unit test
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: 'Local unit test with Maven'
run: mvn clean test

# Sync designtime artifact to tenant
sync:
runs-on: ubuntu-latest
needs: unit_test
container:
image: engswee/flashpipe:latest
steps:
- uses: actions/checkout@v4

- name: 'Update/Upload DemoFlow to design time'
uses: engswee/flashpipe-action/sync@v1
with:
tmn-host: equaliseit.it-cpi023.cfapps.eu20-001.hana.ondemand.com
oauth-host: equaliseit.authentication.eu20.hana.ondemand.com
oauth-clientid: ${{ secrets.DEV_CLIENT_ID }}
oauth-clientsecret: ${{ secrets.DEV_CLIENT_SECRET }}
target: tenant
package-id: FlashPipeDemo

# Deploy to runtime
deploy:
runs-on: ubuntu-latest
needs: sync
container:
image: engswee/flashpipe:latest
steps:
- uses: actions/checkout@v4

- name: 'Deploy DemoFlow to runtime'
uses: engswee/flashpipe-action/deploy@v1
with:
tmn-host: equaliseit.it-cpi023.cfapps.eu20-001.hana.ondemand.com
oauth-host: equaliseit.authentication.eu20.hana.ondemand.com
oauth-clientid: ${{ secrets.DEV_CLIENT_ID }}
oauth-clientsecret: ${{ secrets.DEV_CLIENT_SECRET }}
artifact-ids: DemoFlow

0 comments on commit ca54d93

Please sign in to comment.