-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'siliev/proxy-contracts-deployment' of https://github.co…
…m/obscuronet/go-obscuro into siliev/proxy-contracts-deployment
- Loading branch information
Showing
152 changed files
with
14,066 additions
and
242 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,84 @@ | ||
# Deploys Ten Scan on Azure for Testnet | ||
# Builds the Ten Scan image, pushes the image to dockerhub and starts the Ten Scan on Azure | ||
|
||
name: "[M] Deploy Ten Scan 3 Testnet" | ||
run-name: "[M] Deploy Ten Scan Testnet ( ${{ github.event.inputs.testnet_type }} )" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
testnet_type: | ||
description: "Testnet Type" | ||
required: true | ||
default: "dev-testnet" | ||
type: choice | ||
options: | ||
- "dev-testnet" | ||
- "uat-testnet" | ||
- "sepolia-testnet" | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ github.event.inputs.testnet_type }} | ||
steps: | ||
- name: "Print GitHub variables" | ||
# This is a useful record of what the environment variables were at the time the job ran, for debugging and reference | ||
run: | | ||
echo "GitHub Variables = ${{ toJSON(vars) }}" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Set up Docker" | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: "Login to Azure docker registry" | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: testnetobscuronet.azurecr.io | ||
username: testnetobscuronet | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
- name: "Login via Azure CLI" | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Build and Push Docker FE Image | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build -t ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} -f ./tools/obscuroscan_v3/frontend/Dockerfile . | ||
docker push ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} | ||
- name: Build and Push Docker API Image | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build -t ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} -f ./tools/obscuroscan_v2/backend/Dockerfile . | ||
docker push ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} | ||
- name: "Deploy FE to Azure Container Instances" | ||
uses: "azure/aci-deploy@v1" | ||
with: | ||
resource-group: ${{ secrets.RESOURCE_GROUP }} | ||
dns-name-label: ${{ github.event.inputs.testnet_type }}-obscuro-scan | ||
image: ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} | ||
name: ${{ github.event.inputs.testnet_type }}-fe-obscuro-scan | ||
location: "uksouth" | ||
restart-policy: "Never" | ||
environment-variables: NEXT_PUBLIC_API_HOST=https://${{ github.event.inputs.testnet_type }}-api.obscuroscan.io NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }} | ||
command-line: npm run start | ||
ports: "80" | ||
cpu: 2 | ||
memory: 2 | ||
|
||
- name: "Deploy API to Azure Container Instances" | ||
uses: "azure/aci-deploy@v1" | ||
with: | ||
resource-group: ${{ secrets.RESOURCE_GROUP }} | ||
dns-name-label: ${{ github.event.inputs.testnet_type }}-api-obscuro-scan-v3 | ||
image: ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} | ||
name: ${{ github.event.inputs.testnet_type }}-api-obscuro-scan-v3 | ||
location: "uksouth" | ||
restart-policy: "Never" | ||
command-line: ./cmd/backend --nodeHostAddress http://${{ vars.L2_RPC_URL_VALIDATOR }}:80 --serverAddress 0.0.0.0:80 | ||
ports: "80" | ||
cpu: 2 | ||
memory: 2 |
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
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
Oops, something went wrong.