This commit is contained in:
Sundar 2021-03-31 17:30:09 +05:30 коммит произвёл GitHub
Родитель 202bacc71b
Коммит 4f6b70e29a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -4,14 +4,14 @@ repository=$3
prNumber=$4
frombranch=$5
tobranch=$6
patUser=$7
getPayLoad() {
cat <<EOF
{
"event_type": "K8sDeployActionPR",
"client_payload":
{
"action": "CreateSecret",
"action": "K8sDeploy",
"commit": "$commit",
"repository": "$repository",
"prNumber": "$prNumber",
@ -22,11 +22,11 @@ getPayLoad() {
EOF
}
response=$(curl -X POST -H "Authorization: token $token" https://api.github.com/repos/Azure/azure-actions-integration-tests/dispatches --data "$(getPayLoad)")
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
fi

6
.github/workflows/integration-tests.yml поставляемый
Просмотреть файл

@ -1,9 +1,5 @@
name: "Trigger Integration tests"
on:
# push:
# branches:
## - master
# - 'releases/*'
pull_request:
branches:
- main
@ -20,4 +16,4 @@ jobs:
- 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 }}
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 }}

Просмотреть файл

@ -1,4 +1,4 @@
name: "build-test"
name: "Run unit tests."
on: # rebuild any PRs and main branch changes
pull_request:
branches:
@ -16,5 +16,4 @@ jobs:
- uses: actions/checkout@v1
- run: |
npm install
npm build
npm test