Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce the logic to list/promote/stop squids #5

Merged
merged 12 commits into from
Nov 15, 2024
10 changes: 10 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORS_ORIGIN=^http:\/\/localhost:[0-9]{1,10}$
CORS_METHODS=*

HTTP_SERVER_PORT=5001
HTTP_SERVER_HOST=0.0.0.0
AWS_CLUSTER_NAME=

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 }}
29 changes: 29 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: 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
Loading