Skip to content

Commit

Permalink
Polish the sample cURL of repository_dispatch
Browse files Browse the repository at this point in the history
Signed-off-by: Zheng Chang <zhengchang@microsoft.com>
  • Loading branch information
Zheng Chang committed Nov 4, 2021
1 parent 6b394f4 commit cf79725
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildWlsAksArtifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
repository_dispatch:
types: [aks-package]
# Sample cURL
# curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-package"}'
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-package"}'

env:
refJavaee: 1a21a792d6bae6768b155945cf2703c3026ac691
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setupWlsAksDependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Setup DB and Storage Account
on:
workflow_dispatch:
# Sample cURL
# curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-deploy-dependency"}'
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-deploy-dependency"}'
repository_dispatch:
types: [aks-deploy-dependency]

Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
run: |
cat <<EOF >integration-test-data.txt
# sample request
curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '<request_data>'
curl --verbose -X POST https://api.github.com/repos/${{ github.repository_owner }}/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '<request_data>'
# copy the JSON as <request_data>
{"event_type": "aks-integration-test-without-dependency-creation", "client_payload": {"isForDemo": "false", "disambiguationSuffix": "${{ github.run_id }}", "storageAccountName": "${{ env.storageAccountName }}", "storageContainerName": "${{ env.storageContainerName }}", "dbName": "${{ env.dbName }}"}}
EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/syncupWithUpstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Merge upstream branches for WLS on AKS
on:
workflow_dispatch:
# Sample cURL
# curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-upstream-sync"}'
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-upstream-sync"}'
repository_dispatch:
types: [aks-upstream-sync]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testWlsAksWithDependencyCreation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
required: true
default: main
# sample cURL
# curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-integration-test-with-dependency-creation"}'
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-integration-test-with-dependency-creation"}'
repository_dispatch:
types: [aks-integration-test-with-dependency-creation]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testWlsAksWithoutDependencyCreation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
required: true
default: main
# sample cURL
# curl --verbose -X POST https://api.github.com/repos/mriccell/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '<request_data>'
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '<request_data>'
# sample <request_data>
# {"event_type": "aks-integration-test-without-dependency-creation", "client_payload": {"isForDemo": "false", "disambiguationSuffix": "1397121054", "storageAccountName": "wlsdsa13971210545", "storageContainerName": "wlsdcon13971210545", "dbName": "wlsdb13971210545"}}
# the request data can be get from setupWlsAksDependency pipeline, please checkout the summary page and download the generated artifact name 'integration-test-data'
Expand Down

0 comments on commit cf79725

Please sign in to comment.