This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: to add docker/k8 setup to deriv com (#5932)
* 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
1 parent
0076eee
commit 963d1c3
Showing
2 changed files
with
46 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|
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 |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|
963d1c3
There was a problem hiding this comment.
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