зеркало из https://github.com/Azure/k8s-deploy.git
Updated trigger for L2 tests. (#128)
This commit is contained in:
Родитель
202bacc71b
Коммит
4f6b70e29a
|
@ -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
|
||||
|
|
|
@ -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
|
Загрузка…
Ссылка в новой задаче