mirror of
https://github.com/standardnotes/server
synced 2026-01-16 20:04:32 -05:00
feat: building server applications in ARM64 architecture for Docker
This commit is contained in:
317
.github/workflows/server-application.yml
vendored
Normal file
317
.github/workflows/server-application.yml
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
name: Server Application Reusable Workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
service_name:
|
||||
required: true
|
||||
type: string
|
||||
workspace_name:
|
||||
required: true
|
||||
type: string
|
||||
run_e2e_test_suite:
|
||||
required: true
|
||||
type: boolean
|
||||
e2e_tag_parameter_name:
|
||||
required: false
|
||||
type: string
|
||||
package_path:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: true
|
||||
DOCKER_PASSWORD:
|
||||
required: true
|
||||
CI_PAT_TOKEN:
|
||||
required: true
|
||||
AWS_ACCESS_KEY_ID:
|
||||
required: true
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:${{ inputs.service_name }}
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Test
|
||||
run: yarn test:${{ inputs.service_name }}
|
||||
|
||||
e2e:
|
||||
if: ${{ inputs.run_e2e_test_suite }} == true
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Bundle
|
||||
id: bundle
|
||||
run: |
|
||||
TEMP_DIR=$(mktemp -d -t "${{ inputs.service_name }}-${{ github.sha }}")
|
||||
echo "::set-output name=dir::$TEMP_DIR"
|
||||
yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory $TEMP_DIR
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@master
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ${{ steps.bundle.outputs.dir }}
|
||||
file: ${{ steps.bundle.outputs.dir }}/${{ inputs.package_path }}/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish:
|
||||
needs: [ test, lint, e2e ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Bundle
|
||||
id: bundle
|
||||
run: |
|
||||
TEMP_DIR=$(mktemp -d -t "${{ inputs.service_name }}-${{ github.sha }}")
|
||||
echo "::set-output name=dir::$TEMP_DIR"
|
||||
yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory $TEMP_DIR
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Login to Amazon ECR
|
||||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
|
||||
- name: Publish Docker image
|
||||
uses: docker/build-push-action@v3
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: ${{ inputs.service_name }}
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ${{ steps.bundle.outputs.dir }}
|
||||
file: ${{ steps.bundle.outputs.dir }}/${{ inputs.package_path }}/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
standardnotes/${{ inputs.service_name }}:latest
|
||||
$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
$ECR_REGISTRY/$ECR_REPOSITORY:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition ${{ inputs.service_name }}-prod --query taskDefinition > task-definition.json
|
||||
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="${{ inputs.service_name }}-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
|
||||
- name: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: ${{ inputs.service_name }}-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/${{ inputs.service_name }}:${{ github.sha }}
|
||||
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: ${{ inputs.service_name }}-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
deploy-worker:
|
||||
needs: publish
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition ${{ inputs.service_name }}-worker-prod --query taskDefinition > task-definition.json
|
||||
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="${{ inputs.service_name }}-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
|
||||
- name: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: ${{ inputs.service_name }}-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/${{ inputs.service_name }}:${{ github.sha }}
|
||||
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: ${{ inputs.service_name }}-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
313
.github/workflows/workspace.release.yml
vendored
313
.github/workflows/workspace.release.yml
vendored
@@ -1,313 +0,0 @@
|
||||
name: Workspace Server
|
||||
|
||||
concurrency:
|
||||
group: workspace
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/workspace-server*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build:workspace
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build:workspace
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:workspace
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build:workspace
|
||||
|
||||
- name: Test
|
||||
run: yarn test:workspace
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build:workspace
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
run: |
|
||||
yarn docker build @standardnotes/workspace-server -t standardnotes/workspace:${{ github.sha }}
|
||||
docker push standardnotes/workspace:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"workspace_image_tag": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: [ test, lint, e2e ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build:workspace
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Login to Amazon ECR
|
||||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
|
||||
- name: Build, tag, and push image to Amazon ECR
|
||||
id: build-image
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: workspace
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
run: |
|
||||
yarn docker build @standardnotes/workspace-server -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
||||
|
||||
publish-docker-hub:
|
||||
needs: [ test, lint, e2e ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: packages/**/dist
|
||||
key: ${{ runner.os }}-workspace-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build:workspace
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image as stable
|
||||
run: |
|
||||
yarn docker build @standardnotes/workspace-server -t standardnotes/workspace:latest
|
||||
docker push standardnotes/workspace:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish-aws-ecr
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition workspace-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="workspace-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
- name: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: workspace-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: workspace-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
deploy-worker:
|
||||
needs: publish-aws-ecr
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition workspace-worker-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="workspace-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
- name: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: workspace-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: workspace-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
needs: [ deploy-web, deploy-worker ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create New Relic deployment marker for Web
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
- name: Create New Relic deployment marker for Worker
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
49
.github/workflows/workspace.yml
vendored
Normal file
49
.github/workflows/workspace.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Workspace Server
|
||||
|
||||
concurrency:
|
||||
group: workspace
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/workspace-server*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Build, Test & Deploy Server Application
|
||||
uses: standardnotes/server/.github/workflows/server-application.yml@main
|
||||
with:
|
||||
service_name: workspace
|
||||
workspace_name: "@standardnotes/workspace-server"
|
||||
run_e2e_test_suite: true
|
||||
e2e_tag_parameter_name: workspace_image_tag
|
||||
package_path: packages/workspace
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Create New Relic deployment marker for Web
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
|
||||
- name: Create New Relic deployment marker for Worker
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
1866
.pnp.loader.mjs
generated
1866
.pnp.loader.mjs
generated
File diff suppressed because it is too large
Load Diff
BIN
.yarn/cache/@ampproject-remapping-npm-2.2.0-114878fa50-468104da65.zip
vendored
Normal file
BIN
.yarn/cache/@ampproject-remapping-npm-2.2.0-114878fa50-468104da65.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-code-frame-npm-7.18.6-25229a7e34-eb27d165ea.zip
vendored
Normal file
BIN
.yarn/cache/@babel-code-frame-npm-7.18.6-25229a7e34-eb27d165ea.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-compat-data-npm-7.18.6-115e49a0e5-69c51b3813.zip
vendored
Normal file
BIN
.yarn/cache/@babel-compat-data-npm-7.18.6-115e49a0e5-69c51b3813.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-core-npm-7.18.6-52b1065703-33ed7885a7.zip
vendored
Normal file
BIN
.yarn/cache/@babel-core-npm-7.18.6-52b1065703-33ed7885a7.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-generator-npm-7.18.7-14509012bd-a75bd8ed81.zip
vendored
Normal file
BIN
.yarn/cache/@babel-generator-npm-7.18.7-14509012bd-a75bd8ed81.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-compilation-targets-npm-7.18.6-db5c17ef96-4cefc3bc5d.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-compilation-targets-npm-7.18.6-db5c17ef96-4cefc3bc5d.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-environment-visitor-npm-7.18.6-e61d5b6be0-e41d27fe3d.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-environment-visitor-npm-7.18.6-e61d5b6be0-e41d27fe3d.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-function-name-npm-7.18.6-d041b167ad-c0cbcff95b.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-function-name-npm-7.18.6-d041b167ad-c0cbcff95b.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-helper-hoist-variables-npm-7.18.6-6eb061f405-462ef0d14f.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-hoist-variables-npm-7.18.6-6eb061f405-462ef0d14f.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-5c2d1987e4.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-5c2d1987e4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-module-transforms-npm-7.18.6-91962d1cd6-98c2863983.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-module-transforms-npm-7.18.6-91962d1cd6-98c2863983.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-helper-plugin-utils-npm-7.18.6-12ee942c4e-357b1326a2.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-plugin-utils-npm-7.18.6-12ee942c4e-357b1326a2.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-simple-access-npm-7.18.6-4ef4976ebe-59d09d4fab.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-simple-access-npm-7.18.6-4ef4976ebe-59d09d4fab.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-helper-split-export-declaration-npm-7.18.6-53ebf8ad4c-a7834c5b54.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-split-export-declaration-npm-7.18.6-53ebf8ad4c-a7834c5b54.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-validator-identifier-npm-7.18.6-357e4653ab-6653561132.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-validator-identifier-npm-7.18.6-357e4653ab-6653561132.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-validator-option-npm-7.18.6-cc7d1a3315-c32c6e5daa.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-validator-option-npm-7.18.6-cc7d1a3315-c32c6e5daa.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helpers-npm-7.18.6-113f2054af-052d190bcf.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helpers-npm-7.18.6-113f2054af-052d190bcf.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-highlight-npm-7.18.6-9d35ad2e27-b8eeb1d383.zip
vendored
Normal file
BIN
.yarn/cache/@babel-highlight-npm-7.18.6-9d35ad2e27-b8eeb1d383.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-parser-npm-7.18.6-f3f50dbfca-3671324cdc.zip
vendored
Normal file
BIN
.yarn/cache/@babel-parser-npm-7.18.6-f3f50dbfca-3671324cdc.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-async-generators-npm-7.8.4-d10cf993c9-518ee81097.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-async-generators-npm-7.8.4-d10cf993c9-518ee81097.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-bigint-npm-7.8.3-b05d971e6c-7c7ac943e4.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-bigint-npm-7.8.3-b05d971e6c-7c7ac943e4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-class-properties-npm-7.12.13-002ee9d930-7a9d076a55.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-class-properties-npm-7.12.13-002ee9d930-7a9d076a55.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-import-meta-npm-7.10.4-4a0a0158bc-8513fb2d40.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-import-meta-npm-7.10.4-4a0a0158bc-8513fb2d40.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-json-strings-npm-7.8.3-6dc7848179-d21aa96f15.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-json-strings-npm-7.8.3-6dc7848179-d21aa96f15.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-jsx-npm-7.18.6-3e378d5f11-93aa8b4803.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-jsx-npm-7.18.6-3e378d5f11-93aa8b4803.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-logical-assignment-operators-npm-7.10.4-72ae00fdf6-3a01f61a5b.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-logical-assignment-operators-npm-7.10.4-72ae00fdf6-3a01f61a5b.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-nullish-coalescing-operator-npm-7.8.3-8a723173b5-cc19c595a6.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-nullish-coalescing-operator-npm-7.8.3-8a723173b5-cc19c595a6.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-numeric-separator-npm-7.10.4-81444be605-32689c1628.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-numeric-separator-npm-7.10.4-81444be605-32689c1628.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-object-rest-spread-npm-7.8.3-60bd05b6ae-868f8cd0c2.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-object-rest-spread-npm-7.8.3-60bd05b6ae-868f8cd0c2.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-optional-catch-binding-npm-7.8.3-ce337427d8-c6277360d5.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-optional-catch-binding-npm-7.8.3-ce337427d8-c6277360d5.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-optional-chaining-npm-7.8.3-f3f3c79579-fd81239a2b.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-optional-chaining-npm-7.8.3-f3f3c79579-fd81239a2b.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-top-level-await-npm-7.14.5-60a0a2e83b-d62a60c7ad.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-top-level-await-npm-7.14.5-60a0a2e83b-d62a60c7ad.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-plugin-syntax-typescript-npm-7.18.6-4ad9dd7d2a-99aaa2a38b.zip
vendored
Normal file
BIN
.yarn/cache/@babel-plugin-syntax-typescript-npm-7.18.6-4ad9dd7d2a-99aaa2a38b.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-template-npm-7.18.6-56635d3ce4-419960b2d9.zip
vendored
Normal file
BIN
.yarn/cache/@babel-template-npm-7.18.6-56635d3ce4-419960b2d9.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-traverse-npm-7.18.6-ab4298b064-ac81f6d0ea.zip
vendored
Normal file
BIN
.yarn/cache/@babel-traverse-npm-7.18.6-ab4298b064-ac81f6d0ea.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-types-npm-7.18.7-ce70018628-c5f0fec866.zip
vendored
Normal file
BIN
.yarn/cache/@babel-types-npm-7.18.7-ce70018628-c5f0fec866.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@bcoe-v8-coverage-npm-0.2.3-9e27b3c57e-86336400d6.zip
vendored
Normal file
BIN
.yarn/cache/@bcoe-v8-coverage-npm-0.2.3-9e27b3c57e-86336400d6.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@colors-colors-npm-1.5.0-875af3a8b4-5e08870799.zip
vendored
Normal file
BIN
.yarn/cache/@colors-colors-npm-1.5.0-875af3a8b4-5e08870799.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-cli-npm-17.0.3-802065b1af-33b44c3f7f.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-cli-npm-17.0.3-802065b1af-33b44c3f7f.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-config-conventional-npm-17.0.3-58ee159448-5614f6772c.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-config-conventional-npm-17.0.3-58ee159448-5614f6772c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@commitlint-config-validator-npm-17.0.3-721ee560ed-76d4977179.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-config-validator-npm-17.0.3-721ee560ed-76d4977179.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-ensure-npm-17.0.0-cd46ef1c2c-c8a25decac.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-ensure-npm-17.0.0-cd46ef1c2c-c8a25decac.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-execute-rule-npm-17.0.0-398525bcdc-f84c8db196.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-execute-rule-npm-17.0.0-398525bcdc-f84c8db196.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@commitlint-format-npm-17.0.0-c09fb870cb-70a19eb1d4.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-format-npm-17.0.0-c09fb870cb-70a19eb1d4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-is-ignored-npm-17.0.3-ada095e18a-20d7bd7e4c.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-is-ignored-npm-17.0.3-ada095e18a-20d7bd7e4c.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-lint-npm-17.0.3-396678e8c7-ca48c0ceb9.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-lint-npm-17.0.3-396678e8c7-ca48c0ceb9.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-load-npm-17.0.3-6a5895c82d-d0ede622a9.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-load-npm-17.0.3-6a5895c82d-d0ede622a9.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@commitlint-message-npm-17.0.0-7f40c6f1a5-4e2e36b43c.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-message-npm-17.0.0-7f40c6f1a5-4e2e36b43c.zip
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user