-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:AudiusProject/audius-protocol into …
…jd/harmony-text-input
- Loading branch information
Showing
335 changed files
with
4,405 additions
and
4,849 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
identity-init: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/node:18.17 | ||
steps: | ||
- checkout | ||
|
||
- create_concatenated_patch_file: | ||
filename: combined-patch-file.txt | ||
|
||
- restore_cache: | ||
keys: | ||
- cache-{{ checksum "package-lock.json" }}-{{ checksum "combined-patch-file.txt" }} | ||
|
||
- restore_cache: | ||
keys: | ||
- cache-{{ .Revision }} | ||
|
||
- run: | ||
name: verify | ||
command: npx turbo run verify --filter=identity-service | ||
|
||
- persist_to_workspace: | ||
root: ./ | ||
paths: | ||
- node_modules | ||
- packages/libs/node_modules | ||
- packages/libs/dist |
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,196 @@ | ||
protocol-dashboard-init: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > protocol-dashboard/.npmrc | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- dependency-cache-{{ checksum "protocol-dashboard/package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- dependency-cache- | ||
|
||
- run: | ||
name: npm ci | ||
command: | | ||
cd protocol-dashboard | ||
npm ci | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "protocol-dashboard/package.json" }} | ||
paths: | ||
- protocol-dashboard/node_modules | ||
|
||
# Lint | ||
- run: | ||
name: lint | ||
command: | | ||
cd protocol-dashboard | ||
npm run lint | ||
# Persist node modules | ||
- persist_to_workspace: | ||
root: ./ | ||
paths: | ||
- protocol-dashboard/node_modules | ||
|
||
protocol-dashboard-build-staging: | ||
working_directory: ~/audius-protocol | ||
resource_class: xlarge | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: build | ||
command: | | ||
cd protocol-dashboard | ||
npm run build:stage | ||
- run: | ||
name: armada bundle | ||
command: | | ||
cd protocol-dashboard | ||
timestamp=$(date +%s) | ||
filename="$(npx armada-cli bundle create dist${timestamp} dist)" | ||
hash="$(npx armada-cli bundle checksum $filename)" | ||
echo "export FILENAME='$filename'" >> tmp.env | ||
echo "export HASH='$hash'" >> tmp.env | ||
- persist_to_workspace: | ||
root: ./ | ||
paths: | ||
- protocol-dashboard/* | ||
|
||
protocol-dashboard-pin-staging: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: circleci/python:2.7-jessie | ||
steps: | ||
- run: | ||
name: install-awscli | ||
command: sudo pip install awscli | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: deploy to s3 | ||
command: | | ||
cd protocol-dashboard | ||
source tmp.env | ||
aws s3 cp ${FILENAME} s3://dashboard.staging.audius.org/${FILENAME} --cache-control max-age=0 | ||
protocol-dashboard-deploy-staging: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: install deps | ||
command: sudo apt update && sudo apt install -y libsecret-1-0 | ||
- run: | ||
name: armada publish | ||
command: | | ||
cd protocol-dashboard | ||
source tmp.env | ||
npx armada-cli project publish 0x3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1 https://s3.us-west-1.amazonaws.com/dashboard.staging.audius.org/${FILENAME} ${HASH} --key=${ARMADA_ADMIN_PRIVATE_KEY} | ||
protocol-dashboard-build-prod: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
resource_class: xlarge | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: build | ||
command: | | ||
cd protocol-dashboard | ||
npm run build:prod | ||
- run: | ||
name: zip dist | ||
command: | | ||
cd protocol-dashboard | ||
zip -r dist.zip ./dist | ||
- persist_to_workspace: | ||
root: ./ | ||
paths: | ||
- protocol-dashboard/* | ||
|
||
protocol-dashboard-deploy-prod: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: circleci/python:2.7-jessie | ||
steps: | ||
- run: | ||
name: install-awscli | ||
command: sudo pip install awscli | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: Deploy to S3 | ||
command: | | ||
cd protocol-dashboard | ||
aws s3 sync dist s3://dashboard.audius.org --delete --cache-control max-age=604800 | ||
aws s3 cp s3://dashboard.audius.org/index.html s3://dashboard.audius.org/index.html --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --metadata-directive REPLACE --acl public-read | ||
aws s3 cp dist.zip s3://dashboard.audius.org/dist.zip --cache-control max-age=0 | ||
protocol-dashboard-update-prod-ga-build: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: update build in ga | ||
command: | | ||
cd protocol-dashboard | ||
npm run update-build:prod | ||
- persist_to_workspace: | ||
root: ./ | ||
paths: | ||
- protocol-dashboard/build_cid.txt | ||
|
||
protocol-dashboard-publish-prod-build-cids: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: circleci/python:2.7-jessie | ||
steps: | ||
- run: | ||
name: install-awscli | ||
command: sudo pip install awscli | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: Push to S3 | ||
command: | | ||
cd protocol-dashboard | ||
aws s3 cp build_cid.txt s3://dashboard.audius.org/build_cid.txt | ||
protocol-dashboard-update-prod-records: | ||
working_directory: ~/audius-protocol | ||
docker: | ||
- image: cimg/ruby:2.6-node | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: | ||
name: Update Cloudflare records | ||
command: | | ||
cd protocol-dashboard | ||
DNS_NAME=_dnslink.dashboard.audius.org | ||
CID=$(cat ./build_cid.txt) | ||
curl -X PUT "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE}/dns_records/${CLOUDFLARE_PROD_DASHBOARD_DNS_ID}" \ | ||
-H "X-Auth-Email: ${CLOUDFLARE_AUTH_EMAIL}" \ | ||
-H "Authorization: Bearer ${CLOUDFLARE_AUTH_KEY}" \ | ||
-H "Content-Type: application/json" \ | ||
--data '{"type":"TXT","name":"'"$DNS_NAME"'","content":"\"dnslink=/ipfs/'"$CID"'\"","ttl":1,"proxied":false}' |
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,6 +1,5 @@ | ||
machine: | ||
image: ubuntu-2204:current | ||
docker_layer_caching: true | ||
resource_class: large | ||
steps: | ||
- checkout: | ||
|
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
when: << pipeline.parameters.run-healthz-workflow >> | ||
jobs: | ||
- push-docker-image: | ||
name: push-healthz | ||
context: [GCP, dockerhub] | ||
service: healthz | ||
filters: | ||
branches: | ||
only: main |
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.