This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
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 #259 from jim-deriv/Jim/FEQ-878/setup-docker-and-k…
…ubernetes FEQ-878 / add docker and k8s setup
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: k8s_deploy | ||
description: Deploy to Kubernetes | ||
inputs: | ||
K8S_VERSION: | ||
description: Kubernetes version | ||
required: true | ||
type: string | ||
K8S_NAMESPACE: | ||
description: Kubernetes namespace | ||
required: false | ||
type: string | ||
default: 'deriv-com-api-staging' | ||
CA_CRT: | ||
description: Kubernetes CA certificate | ||
required: true | ||
type: string | ||
steps: | ||
- k8s/install-kubectl | ||
- run: | ||
name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀 | ||
command: | | ||
export NAMESPACE=${{ inputs.K8S_NAMESPACE }} | ||
git clone https://github.com/binary-com/devops-ci-scripts | ||
cd devops-ci-scripts/k8s-build_tools | ||
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt | ||
export CA="ca.crt" | ||
./release.sh deriv-com-api ${{ inputs.K8S_VERSION }} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: docker_build_push | ||
description: Build and push Docker image to Docker Hub | ||
inputs: | ||
DOCKER_LATEST_IMAGE_TAG: | ||
description: Docker image tag | ||
required: false | ||
default: 'latest-staging' | ||
type: string | ||
DOCKER_IMAGE_TAG: | ||
description: Docker image tag | ||
required: true | ||
type: string | ||
DOCKERHUB_ORGANISATION: | ||
description: Docker Hub organisation | ||
required: true | ||
type: string | ||
DOCKERHUB_USERNAME: | ||
description: Docker Hub username | ||
required: true | ||
type: string | ||
DOCKERHUB_PASSWORD: | ||
description: Docker Hub password | ||
required: true | ||
type: string | ||
steps: | ||
- setup_remote_docker | ||
- run: | ||
name: Building docker image 🐳 | ||
command: | | ||
docker build -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }} -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} . | ||
- name: Verify nginx image | ||
run: | | ||
set -e | ||
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t | ||
echo "docker image validated successfully" | ||
- run: | ||
name: Pushing Image to docker hub 🐳 | ||
command: | | ||
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u $${{ inputs.DOCKERHUB_USERNAME }} --password-stdin | ||
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }} | ||
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} |
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 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
1d754ce
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-api-docs – ./
deriv-api-docs-git-master.binary.sx
deriv-api-docs.binary.sx