44 pull_request_target :
55 branches : [ main ]
66 types : [ opened, synchronize, reopened ]
7+ workflow_dispatch :
78
89permissions :
910 pull-requests : write
5758 run : cf8 login -a "${{ secrets.CF_API }}" -u "${{ secrets.CF_USERNAME }}" -p "${{ secrets.CF_PASSWORD }}" -o "${{ secrets.CF_ORG }}" -s "${{ secrets.CF_SPACE }}" --origin uaa
5859 - name : Deploy CloudFoundry sample apps
5960 run : cf8 push -f "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" --var domain=${{ secrets.CF_DOMAIN }} --var hostname_prefix="$HOSTNAME_PREFIX" --vars-file "${GITHUB_WORKSPACE}/http2/gradle.properties"
60- - name : Test Sample apps
61+ - name : Test HTTP/2 Sample apps
6162 run : |
6263 get_route() {
6364 echo "${HOSTNAME_PREFIX}${1}.${{ secrets.CF_DOMAIN }}"
@@ -72,13 +73,28 @@ jobs:
7273 grpcurl -proto http2/node-grpc/example.proto $(get_route node-grpc-test):443 Example.Run
7374 grpcurl -proto http2/python-grpc/example.proto $(get_route python-grpc-test):443 Example.Run
7475 grpcurl -proto http2/ruby-grpc/example.proto $(get_route ruby-grpc-test):443 Example.Run
76+ - name : Deploy IP Allow-List Sample App
77+ run : |
78+ cf8 push --var "domain=${{ secrets.CF_DOMAIN }}" --var "suffix=${HOSTNAME_PREFIX}" --manifest "${GITHUB_WORKSPACE}/ip-allow-listing-route-service/manifest.yml"
79+ cf8 create-user-provided-service "allow-list-${HOSTNAME_PREFIX}" -r "https://ip-allow-list-rs-${HOSTNAME_PREFIX}.${{ secrets.CF_DOMAIN }}"
80+ cf8 bind-route-service "${{ secrets.CF_DOMAIN }}" --hostname "ok-${HOSTNAME_PREFIX}" "allow-list-${HOSTNAME_PREFIX}"
81+ - name : Test IP Allow-List Sample App
82+ run : |
83+ echo "Test IPv4 is accesible"
84+ test "$(curl --silent --output /dev/null --write-out "%{http_code}" -4 "https://ok-${HOSTNAME_PREFIX}.cfapps.eu12.hana.ondemand.com")" -eq 200
7585 - name : Clean-up
7686 if : success() || failure()
7787 run : |
88+ echo "Deleting service instance"
89+ cf8 -f delete-service "allow-list-${HOSTNAME_PREFIX}" || true
7890 echo "Deleting apps and routes"
7991 yq e '.applications.[].name' "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" | while read -r app_name; do
8092 echo "Deleting app: $app_name"
81- cf8 delete "$app_name" -r -f
93+ cf8 delete "$app_name" -r -f || true
94+ done
95+ yq e '.applications.[].name' "${GITHUB_WORKSPACE}/ip-allow-listing-route-service/manifest.yml" | while read -r app_name; do
96+ echo "Deleting app: $app_name"
97+ cf8 delete "$app_name" -r -f || true
8298 done
8399 automerge :
84100 runs-on : ubuntu-latest
0 commit comments