Skip to content

Commit

Permalink
ci/demos cleanup (#6305)
Browse files Browse the repository at this point in the history
* ci: replace two old instances with new hosted on gcp
* fix: change credentials used to DEMO_CLOUD_USERNAME
* add: canary ct deployment
* cicd: add vsf-next-demo on GCP
* fix: change github ref for vsf-next-demo deployment
  • Loading branch information
byakku committed Oct 13, 2021
1 parent ce12b2c commit f921706
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/deploy-storefrontcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Deploy on vsf-next-demo.storefrontcloud.io
if: github.ref == 'refs/heads/release/next'
run: |
if curl -s -u ${{ secrets.CLOUD_USERNAME }}:${{ secrets.CLOUD_PASSWORD }} -H 'Content-Type: application/json' -X POST -d '{"code":"vsf-next-demo","frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
if curl -s -H 'X-User-Id: ${{ secrets.DEMO_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DEMO_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"vsf-next-demo","frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
echo "Instance updated"
else
echo "Something went wrong during the update process..."
Expand All @@ -59,7 +59,25 @@ jobs:
- name: Deploy on vsf-next-demo.europe-west1.gcp.storefrontcloud.io
if: github.ref == 'refs/heads/test/next'
run: |
if curl -s -H 'X-User-Id: ${{ secrets.DOCS_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DOCS_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"vsf-next-demo","region":"europe-west1.gcp","frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
if curl -s -H 'X-User-Id: ${{ secrets.DEMO_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DEMO_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"vsf-next-demo","region":"europe-west1.gcp","frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
echo "Instance updated"
else
echo "Something went wrong during the update process..."
exit 1
fi
- name: Deploy on demo-ct.europe-west1.gcp.storefrontcloud.io
if: github.ref == 'refs/heads/main'
run: |
if curl -s -H 'X-User-Id: ${{ secrets.DEMO_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DEMO_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"demo-ct","region":"europe-west1.gcp",frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
echo "Instance updated"
else
echo "Something went wrong during the update process..."
exit 1
fi
- name: Deploy on canary-ct.europe-west1.gcp.storefrontcloud.io
if: github.ref == 'refs/heads/release/next'
run: |
if curl -s -H 'X-User-Id: ${{ secrets.DEMO_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DEMO_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"canary-ct","region":"europe-west1.gcp",frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
echo "Instance updated"
else
echo "Something went wrong during the update process..."
Expand Down

0 comments on commit f921706

Please sign in to comment.