2 Commits

Author SHA1 Message Date
Tauhid Anjum
88944439bd Update README.md 2021-08-30 16:45:39 +05:30
Tauhid Anjum
b2acc157b8 Integration tests added to releases/v1 (#33) 2021-06-28 16:49:13 +05:30
3 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
token=$1
commit=$2
repository=$3
prNumber=$4
frombranch=$5
tobranch=$6
patUser=$6
getPayLoad() {
cat <<EOF
{
"event_type": "SetupKubectlActionPR",
"client_payload":
{
"action": "SetupKubectl",
"commit": "$commit",
"repository": "$repository",
"prNumber": "$prNumber",
"tobranch": "$tobranch",
"frombranch": "$frombranch"
}
}
EOF
}
response=$(curl -u $patUser:$token -X POST https://api.github.com/repos/Azure/azure-actions-integration-tests/dispatches --data "$(getPayLoad)")
if [ "$response" == "" ]; then
echo "Integration tests triggered successfully"
else
echo "Triggering integration tests failed with: '$response'"
exit 1
fi

19
.github/workflows/integration-tests.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: "Trigger Integration tests"
on:
pull_request:
branches:
- main
- 'releases/*'
jobs:
trigger-integration-tests:
name: Trigger Integration tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
path: IntegrationTests
- name: Trigger Test run
run: |
bash ./IntegrationTests/.github/workflows/TriggerIntegrationTests.sh ${{ secrets.L2_REPO_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} ${{ secrets.L2_REPO_USER }}

View File

@@ -1,5 +1,5 @@
# Setup Kubectl
#### Install a specific version of kubectl binary on the runner.
#### Sample workflow to install a specific version of kubectl binary on the runner.
Acceptable values are latest or any semantic version string like 1.15.0. Use this action in workflow to define which version of kubectl will be used.