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 branch 'master' into websocket-update
- Loading branch information
Showing
137 changed files
with
11,116 additions
and
12,827 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,42 @@ | ||
name: k8s_deploy | ||
description: Deploy to Kubernetes | ||
inputs: | ||
K8S_VERSION: | ||
description: Kubernetes version | ||
required: true | ||
K8S_NAMESPACE: | ||
description: Kubernetes namespace | ||
required: false | ||
default: 'deriv-com-api-staging' | ||
CA_CRT: | ||
description: Kubernetes CA certificate | ||
required: true | ||
KUBE_SERVER: | ||
description: Kubernetes server | ||
required: true | ||
SERVICEACCOUNT_TOKEN: | ||
description: Kubernetes service account token | ||
required: true | ||
DOCKERHUB_ORGANISATION: | ||
description: Dockerhub organisation | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Environment variables | ||
run: | | ||
echo "NAMESPACE=${{ inputs.K8S_NAMESPACE }}" >> "$GITHUB_ENV" | ||
echo "KUBE_SERVER=${{ inputs.KUBE_SERVER }}" >> "$GITHUB_ENV" | ||
echo "SERVICEACCOUNT_TOKEN=${{ inputs.SERVICEACCOUNT_TOKEN }}" >> "$GITHUB_ENV" | ||
echo "DOCKERHUB_ORGANISATION=${{ inputs.DOCKERHUB_ORGANISATION }}" >> "$GITHUB_ENV" | ||
echo "CA_CRT=${{ inputs.CA_CRT }}" >> "$GITHUB_ENV" | ||
echo "APP_NAME=deriv-com-api" >> "$GITHUB_ENV" | ||
shell: bash | ||
- name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀 | ||
run: | | ||
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 ${APP_NAME} ${{ inputs.K8S_VERSION }} | ||
shell: bash |
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,38 @@ | ||
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' | ||
DOCKER_IMAGE_TAG: | ||
description: Docker image tag | ||
required: true | ||
DOCKERHUB_ORGANISATION: | ||
description: Docker Hub organisation | ||
required: true | ||
DOCKERHUB_USERNAME: | ||
description: Docker Hub username | ||
required: true | ||
DOCKERHUB_PASSWORD: | ||
description: Docker Hub password | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Building docker image 🐳 | ||
run: | | ||
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 }} . | ||
shell: bash | ||
- 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" | ||
shell: bash | ||
- name: Pushing Image to docker hub 🐳 | ||
run: | | ||
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 }} | ||
shell: bash |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,62 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Active Symbols (request)", | ||
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).", | ||
"type": "object", | ||
"auth_required": 0, | ||
"additionalProperties": false, | ||
"required": [ | ||
"active_symbols" | ||
], | ||
"properties": { | ||
"active_symbols": { | ||
"description": "If you use `brief`, only a subset of fields will be returned.", | ||
"type": "string", | ||
"enum": [ | ||
"brief", | ||
"full" | ||
] | ||
}, | ||
"landing_company": { | ||
"description": "Deprecated - replaced by landing_company_short.", | ||
"type": "string", | ||
"enum": [ | ||
"iom", | ||
"malta", | ||
"maltainvest", | ||
"svg", | ||
"virtual", | ||
"vanuatu", | ||
"champion", | ||
"champion-virtual" | ||
] | ||
}, | ||
"landing_company_short": { | ||
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.", | ||
"type": "string", | ||
"enum": [ | ||
"iom", | ||
"malta", | ||
"maltainvest", | ||
"svg", | ||
"virtual", | ||
"vanuatu", | ||
"champion", | ||
"champion-virtual" | ||
] | ||
}, | ||
"product_type": { | ||
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.", | ||
"type": "string", | ||
"enum": [ | ||
"basic" | ||
] | ||
}, | ||
"passthrough": { | ||
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", | ||
"type": "object", | ||
"maxSize": 3500 | ||
}, | ||
"req_id": { | ||
"description": "[Optional] Used to map request to response.", | ||
"type": "integer" | ||
} | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Active Symbols (request)", | ||
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).", | ||
"type": "object", | ||
"auth_required": 0, | ||
"additionalProperties": false, | ||
"required": ["active_symbols"], | ||
"properties": { | ||
"active_symbols": { | ||
"description": "If you use `brief`, only a subset of fields will be returned.", | ||
"type": "string", | ||
"enum": ["brief", "full"] | ||
}, | ||
"landing_company": { | ||
"description": "Deprecated - replaced by landing_company_short.", | ||
"type": "string", | ||
"enum": [ | ||
"iom", | ||
"malta", | ||
"maltainvest", | ||
"svg", | ||
"virtual", | ||
"vanuatu", | ||
"champion", | ||
"champion-virtual" | ||
] | ||
}, | ||
"landing_company_short": { | ||
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.", | ||
"type": "string", | ||
"enum": [ | ||
"iom", | ||
"malta", | ||
"maltainvest", | ||
"svg", | ||
"virtual", | ||
"vanuatu", | ||
"champion", | ||
"champion-virtual" | ||
] | ||
}, | ||
"product_type": { | ||
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.", | ||
"type": "string", | ||
"enum": ["basic"] | ||
}, | ||
"loginid": { | ||
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", | ||
"type": "string", | ||
"pattern": "^[A-Za-z]+[0-9]+$" | ||
}, | ||
"passthrough": { | ||
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", | ||
"type": "object" | ||
}, | ||
"req_id": { | ||
"description": "[Optional] Used to map request to response.", | ||
"type": "integer" | ||
} | ||
} | ||
} |
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,66 +1,55 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "API Token (request)", | ||
"description": "This call manages API tokens", | ||
"type": "object", | ||
"auth_required": 1, | ||
"auth_scopes": [ | ||
"admin" | ||
], | ||
"additionalProperties": false, | ||
"required": [ | ||
"api_token" | ||
], | ||
"properties": { | ||
"api_token": { | ||
"description": "Must be `1`", | ||
"type": "integer", | ||
"enum": [ | ||
1 | ||
] | ||
}, | ||
"delete_token": { | ||
"description": "[Optional] The token to remove.", | ||
"type": "string", | ||
"pattern": "^\\w+$" | ||
}, | ||
"new_token": { | ||
"description": "[Optional] The name of the created token.", | ||
"type": "string", | ||
"pattern": "^[A-Za-z0-9\\s_]+$" | ||
}, | ||
"new_token_scopes": { | ||
"description": "[Optional] List of permission scopes to provide with the token.", | ||
"type": "array", | ||
"items": { | ||
"description": "Required when create new token", | ||
"type": "string", | ||
"enum": [ | ||
"read", | ||
"trade", | ||
"trading_information", | ||
"payments", | ||
"admin" | ||
] | ||
}, | ||
"uniqueItems": true | ||
}, | ||
"valid_for_current_ip_only": { | ||
"description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token", | ||
"type": "integer", | ||
"enum": [ | ||
0, | ||
1 | ||
] | ||
}, | ||
"passthrough": { | ||
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", | ||
"type": "object", | ||
"maxSize": 3500 | ||
}, | ||
"req_id": { | ||
"description": "[Optional] Used to map request to response.", | ||
"type": "integer" | ||
} | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "API Token (request)", | ||
"description": "This call manages API tokens", | ||
"type": "object", | ||
"auth_required": 1, | ||
"auth_scopes": ["admin"], | ||
"additionalProperties": false, | ||
"required": ["api_token"], | ||
"properties": { | ||
"api_token": { | ||
"description": "Must be `1`", | ||
"type": "integer", | ||
"enum": [1] | ||
}, | ||
"delete_token": { | ||
"description": "[Optional] The token to remove.", | ||
"type": "string", | ||
"pattern": "^\\w+$" | ||
}, | ||
"new_token": { | ||
"description": "[Optional] The name of the created token.", | ||
"type": "string", | ||
"pattern": "^[A-Za-z0-9\\s_]+$" | ||
}, | ||
"new_token_scopes": { | ||
"description": "[Optional] List of permission scopes to provide with the token.", | ||
"type": "array", | ||
"items": { | ||
"description": "Required when create new token", | ||
"type": "string", | ||
"enum": ["read", "trade", "trading_information", "payments", "admin"] | ||
}, | ||
"uniqueItems": true | ||
}, | ||
"valid_for_current_ip_only": { | ||
"description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token", | ||
"type": "integer", | ||
"enum": [0, 1] | ||
}, | ||
"loginid": { | ||
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", | ||
"type": "string", | ||
"pattern": "^[A-Za-z]+[0-9]+$" | ||
}, | ||
"passthrough": { | ||
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", | ||
"type": "object" | ||
}, | ||
"req_id": { | ||
"description": "[Optional] Used to map request to response.", | ||
"type": "integer" | ||
} | ||
} | ||
} |
Oops, something went wrong.