Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
build: to add docker/k8 setup to deriv com (#5932)
Browse files Browse the repository at this point in the history
* build: to add docker/k8 setup to deriv com

* build: to add docker/k8 setup to deriv com

* build: to add docker/k8 setup to deriv com

* refactor: removed CA in staging and production

* Move the docker image build to after release

* refactor: added docker after cloudflare

---------

Co-authored-by: Ali(Ako) Hosseini <[email protected]>
  • Loading branch information
yaswanth-deriv and ali-hosseini-deriv authored Nov 17, 2023
1 parent 0076eee commit 963d1c3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "production(.*)"

- name: Deploy to Cloudflare ☁️
uses: cloudflare/[email protected]
with:
Expand All @@ -64,6 +63,29 @@ jobs:
- name: Cloudflare production link ✨
run: echo "New website - http://cf-pages-deriv-com.deriv.com"

- name: Building docker image 🐳
run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME .

- name: Verify nginx image
run: |
set -e
docker run --rm ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME nginx -t
echo "docker image validated successfully"
- name: Pushing Image to docker hub 🐳
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }}| docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest
docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME
- name: Deploy 🚀
run: |
export NAMESPACE="deriv-com-production"
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
echo ${{ secrets.CA_CRT}} | base64 --decode > ca.crt
./release.sh deriv-com $GIT_TAG_NAME
- name: Slack Notification 📣
uses: 8398a7/action-slack@v3
with:
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "staging(.*)"

- name: Deploy to Cloudflare ☁️
uses: cloudflare/[email protected]
with:
Expand All @@ -61,6 +60,29 @@ jobs:
- name: Cloudflare preview link ✨
run: echo "New staging website - http://staging.cf-pages-deriv-com.deriv.com"

- name: Building docker image 🐳
run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest-staging -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA .

- name: Verify nginx image
run: |
set -e
docker run --rm ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA nginx -t
echo "docker image validated successfully"
- name: Pushing Image to docker hub 🐳
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }}| docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest-staging
docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA
- name: Deploy 🚀
run: |
export NAMESPACE="deriv-com-staging"
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
echo ${{ secrets.CA_CRT}} | base64 --decode > ca.crt
./release.sh deriv-com $GITHUB_SHA
- name: Slack Notification 📣
uses: 8398a7/action-slack@v3
with:
Expand Down

1 comment on commit 963d1c3

@vercel
Copy link

@vercel vercel bot commented on 963d1c3 Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com.binary.sx
deriv-com-git-master.binary.sx

Please sign in to comment.