Skip to content

Commit

Permalink
feat: introduce the logic to list/promote/stop squids
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Nov 13, 2024
0 parents commit 16f0d0c
Show file tree
Hide file tree
Showing 25 changed files with 7,255 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CORS_ORIGIN=^http:\/\/localhost:[0-9]{1,10}$
CORS_METHODS=*

HTTP_SERVER_PORT=5001
HTTP_SERVER_HOST=0.0.0.0
AWS_CLUSTER_NAME=dev-main

AUTH_TOKEN=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
DAPPS_PG_COMPONENT_PSQL_CONNECTION_STRING=
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
35 changes: 35 additions & 0 deletions .github/workflows/deployer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on:
workflow_dispatch:
inputs:
deployment-environment:
required: true
type: choice
options:
- dev
- stg
- prd
default: prd
description: Environment
tag:
required: true
default: "latest"
type: string
description: "Docker tag (quay.io)"

jobs:
deployment:
if: ${{ inputs.deployment-environment }}
name: "Deploy to: ${{ inputs.deployment-environment }}"
runs-on: ubuntu-latest
environment: ${{ inputs.deployment-environment }}
steps:
- name: Trigger deployment
id: deploy
uses: decentraland/dcl-deploy-action@main
with:
dockerImage: "quay.io/decentraland/squid-management-server-:${{ inputs.tag }}"
serviceName: "squid-management-server"
env: ${{ inputs.deployment-environment }}
token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI/CD on main branch

on:
push:
branches:
- "main"

jobs:
cd:
uses: decentraland/actions/.github/workflows/build-quay-main.yml@main
with:
service-name: squid-management-server
deployment-environment: dev stg
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: node

on: push

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Start postgres
run: docker compose up -d --renew-anon-volumes
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: install
run: npm install
- name: build
run: npm run build
- name: linter
run: npm run lint
if: ${{ always() }}
- name: test
run: npm run test
- name: integration test
run: npm run test:integration
- name: Report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build and publish
on:
release:
types:
- created
jobs:
build:
name: "Build & publish: ${{github.ref_name}}"
uses: decentraland/actions/.github/workflows/build-quay-main.yml@main
with:
service-name: squid-management-server
docker-tag: "${{ github.ref_name }}"
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
node_modules
Loading

0 comments on commit 16f0d0c

Please sign in to comment.