Skip to content

Commit

Permalink
Update intergation-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-01 authored Nov 1, 2021
1 parent 0c6a6dd commit 780c9a6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/intergation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
- name: Trigger Test run
if: github.event.pull_request.base.ref == 'releases/v1' || steps.extract_branch.outputs.branchname == 'releases/v1' || github.event.pull_request.base.ref == 'master' || steps.extract_branch.outputs.branchname == 'master'
env:
token: ${{ secrets.L2_REPO_TOKEN }}
commit: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.repository }}
prnumber: ${{ github.event.pull_request.number }}
prsource: ${{ github.event.pull_request.head.ref }}
prtarget: ${{ github.event.pull_request.base.ref }}
username: ${{ secrets.L2_REPO_USER }}
prsourcerepository: ${{ github.event.pull_request.head.repo.full_name }}
run: |
response=$(curl -X POST -H "Authorization: token ${{ secrets.L2_REPO_TOKEN }}" https://api.github.com/repos/Azure/azure-actions-integration-tests/dispatches --data '{"event_type": "K8sCreateSecretReleasesPR", "client_payload": {"action": "CreateSecret", "commit": "${{ github.event.pull_request.head.sha }}", "repository": "${{ github.repository }}", "prNumber": "${{ github.event.pull_request.number }}", "tobranch": "${{ github.event.pull_request.base.ref }}", "frombranch": "${{ github.event.pull_request.head.ref }}" }}')
if [ "$response" == "" ]; then
echo "Integration tests triggered successfully";
else
echo "Triggering integration tests failed with: '$response'";
exit 1;
fi
bash ./IntegrationTests/.github/workflows/TriggerIntegrationTests.sh $token $commit $repository $prnumber $prsource $prtarget $username $prsourcerepository

0 comments on commit 780c9a6

Please sign in to comment.