-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from jim-deriv/jim/dsec-25497/resolve-context…
…-issues [FEQ] Jim/DSEC-25497/resolve context issues
- Loading branch information
Showing
3 changed files
with
90 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,71 @@ | ||
name: Websocket Production Workflow | ||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
env: | ||
RELEASE_TYPE: Production | ||
jobs: | ||
build_test_and_publish: | ||
name: Build, Test and Publish to Production | ||
runs-on: ubuntu-latest | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.extract_version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
- name: Bundle Install | ||
uses: ./.github/actions/bundle_install | ||
- name: Build Jekyll site | ||
uses: ./.github/actions/build_jekyll_site | ||
- name: invalidate master cache | ||
uses: ./.github/actions/invalidate_master_cache | ||
- name: Versioning | ||
id: extract_version | ||
uses: ./.github/actions/versioning | ||
with: | ||
release_type: production | ||
- name: Publish to Cloudflare Pages Production | ||
uses: "./.github/actions/publish_to_pages_production" | ||
with: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
- name: Build Docker image and push to Docker hub and K8S | ||
uses: "./.github/actions/build_and_push_docker_image" | ||
with: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }} | ||
K8S_NAMESPACE: "developers-binary-com-production" | ||
KUBE_SERVER: ${{ secrets.KUBE_SERVER }} | ||
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} | ||
CA_CRT: ${{ secrets.CA_CRT }} | ||
APP_VERSION: latest | ||
|
||
|
||
send_slack_notification: | ||
name: Send Slack notification | ||
runs-on: ubuntu-latest | ||
if: always() | ||
needs: [build_test_and_publish] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Conclusion | ||
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 | ||
- name: Send Slack Notification | ||
uses: "./.github/actions/send_slack_notifications" | ||
with: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
status: ${{ env.WORKFLOW_CONCLUSION }} | ||
release_type: Production | ||
version: ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }} | ||
build_test_and_publish: | ||
name: Build, Test and Publish to Production | ||
runs-on: ubuntu-latest | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.extract_version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
- name: Bundle Install | ||
uses: ./.github/actions/bundle_install | ||
- name: Build Jekyll site | ||
uses: ./.github/actions/build_jekyll_site | ||
- name: invalidate master cache | ||
uses: ./.github/actions/invalidate_master_cache | ||
- name: Versioning | ||
id: extract_version | ||
uses: ./.github/actions/versioning | ||
with: | ||
RELEASE_TYPE: production | ||
- name: Publish to Cloudflare Pages Production | ||
uses: "./.github/actions/publish_to_pages_production" | ||
with: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
- name: Build Docker image and push to Docker hub and K8S | ||
uses: "./.github/actions/build_and_push_docker_image" | ||
with: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }} | ||
K8S_NAMESPACE: "developers-binary-com-production" | ||
KUBE_SERVER: ${{ secrets.KUBE_SERVER }} | ||
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} | ||
CA_CRT: ${{ secrets.CA_CRT }} | ||
APP_VERSION: latest | ||
send_slack_notification: | ||
name: Send Slack notification | ||
runs-on: ubuntu-latest | ||
if: always() | ||
needs: [build_test_and_publish] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Conclusion | ||
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 | ||
- name: Create Slack Message | ||
env: | ||
RELEASE_VERSION: ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }} | ||
id: create_slack_message | ||
run: | | ||
if [ $WORKFLOW_CONCLUSION == "success" ]; then | ||
echo "MESSAGE=$RELEASE_TYPE Release succeeded for developers.binary.com with version $RELEASE_VERSION" >> $GITHUB_OUTPUT | ||
else | ||
echo "MESSAGE=$RELEASE_TYPE Release failed for developers.binary.com with version $RELEASE_VERSION" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Send Slack Notification | ||
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master" | ||
with: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
MESSAGE: ${{ steps.create_slack_message.outputs.MESSAGE }} |