Skip to content

Commit

Permalink
Added support for vm-manager-ci
Browse files Browse the repository at this point in the history
Signed-off-by: sjshweta <shweta.joshi@intel.com>
  • Loading branch information
sjshweta authored and sysopenci committed Mar 6, 2023
1 parent b4cad3b commit 3462f3c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pr-approved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Run VM-MANAGER-PR-MERGE-FLOW

on:
pull_request_review:
types: [submitted]
branches:
- master
- tmp/ci-testing

env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
BUILDTOKEN: test_issue
JENKINS_URL: https://cbjenkins-ba.devtools.intel.com/teams-satg-aee-android-ci/generic-webhook-trigger/invoke?token=

jobs:
if_merged:
if: github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'tmp/ci-testing'
runs-on: self-hosted
steps:
- run: |
echo The PR was merged
- name: converting object to json
env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
run: |
echo "$EVENT_CONTEXT"
- name: Triggering Jenkins job
run: |-
curl --location --request POST ${{ env.JENKINS_URL }}${{ env.BUILDTOKEN }} \
--header 'Content-Type: application/json' \
--data-raw '{
"action": ${{ env.EVENT_CONTEXT }}
}'
29 changes: 29 additions & 0 deletions .github/workflows/pr-raised.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Run VM-MANAGER-PR-FLOW

on:
pull_request:
types: [opened, synchronize, reopened, edited]
branches: "**"

env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
BUILDTOKEN: test_vmmanager
JENKINS_URL: https://cbjenkins-ba.devtools.intel.com/teams-satg-aee-android-ci/generic-webhook-trigger/invoke?token=

jobs:
Build:
runs-on: self-hosted
steps:
- name: converting object to json
env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
run: |
echo "$EVENT_CONTEXT"
- name: Triggering Jenkins job
run: |-
curl --location --request POST ${{ env.JENKINS_URL }}${{ env.BUILDTOKEN }} \
--header 'Content-Type: application/json' \
--data-raw '{
"action": ${{ env.EVENT_CONTEXT }}
}'

0 comments on commit 3462f3c

Please sign in to comment.