-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from bosonprotocol/demo
Migrate to GH Actions and EKS
- Loading branch information
Showing
225 changed files
with
1,454 additions
and
7,152 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-470 Bytes
.git-crypt/keys/default/0/04ED20CFC7112DE4E6C4070CED0E3AA9A664E742.gpg
Binary file not shown.
Binary file removed
BIN
-470 Bytes
.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg
Binary file not shown.
Binary file removed
BIN
-726 Bytes
.git-crypt/keys/default/0/B14145CFE7938B456B337E514F2AE1DED258B20E.gpg
Binary file not shown.
Binary file removed
BIN
-470 Bytes
.git-crypt/keys/default/0/CF76184B551B037240C4D457AFD792BACA20583D.gpg
Binary file not shown.
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,2 +1 @@ | ||
config/secrets/** filter=git-crypt diff=git-crypt | ||
*.sol linguist-language=Solidity |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,137 @@ | ||
name: Build and Deploy leptonite.io | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
api: | ||
name: API related tasks | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY: 031036423983.dkr.ecr.eu-west-2.amazonaws.com | ||
services: | ||
mongodb: | ||
image: mongo:4.4.8 | ||
ports: | ||
- 27017:27017 | ||
env: | ||
MONGO_INITDB_ROOT_USERNAME: admin | ||
MONGO_INITDB_ROOT_PASSWORD: secret | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12' | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run app:lint | ||
- run: npm run app:format | ||
- run: npm run tests:app:lint | ||
- run: npm run tests:app:format | ||
- run: npm run tests:app:unit:coverage | ||
- run: npm run tests:app:persistence:coverage | ||
- run: npm run tests:app:persistence | ||
- run: npm run tests:app:component:coverage | ||
- run: npm run tests:app:component | ||
- run: npm run tests:coverage:badge | ||
- name: Configure AWS credentials | ||
if: ${{ github.event_name == 'push' }} | ||
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: eu-west-2 | ||
- name: Login to Amazon ECR | ||
if: ${{ github.event_name == 'push' }} | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Export TAG value | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
- name: Build and push | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
docker build --tag $REGISTRY/bsn/reference-backend:$TAG . | ||
docker push $REGISTRY /bsn/reference-backend:$TAG | ||
keepers: | ||
name: Keepers related tasks | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "./external/keepers" | ||
env: | ||
REGISTRY: 031036423983.dkr.ecr.eu-west-2.amazonaws.com | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12' | ||
cache: 'npm' | ||
- run: npm install | ||
- name: Configure AWS credentials | ||
if: ${{ github.event_name == 'push' }} | ||
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: eu-west-2 | ||
- name: Login to Amazon ECR | ||
if: ${{ github.event_name == 'push' }} | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Export TAG value | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
- name: Build and push | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
docker build --tag $REGISTRY/bsn/keepers:$TAG . | ||
docker push $REGISTRY /bsn/keepers:$TAG | ||
triggers: | ||
name: Triggers related tasks | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "./terraform/functions" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- 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: eu-west-2 | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v1 | ||
with: | ||
terraform_wrapper: false | ||
- name: Terraform Format | ||
id: fmt | ||
run: terraform fmt -check -recursive | ||
- name: Terraform Init | ||
id: init | ||
run: terraform init -backend-config=$TF_BACKEND_BUCKET -backend-config=$TF_BACKEND_STATE_KEY -backend-config='region=eu-west-2' -backend-config='encrypt=true' | ||
env: | ||
TF_BACKEND_BUCKET: ${{ secrets.TF_BACKEND_BUCKET }} | ||
TF_BACKEND_STATE_KEY: ${{ secrets.TF_BACKEND_STATE_KEY }} | ||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color | ||
- run: 'echo "$TFVARS" > terraform.tfvars' | ||
shell: bash | ||
env: | ||
TFVARS: ${{ secrets.TFVARS }} | ||
- name: Terraform Plan | ||
id: plan | ||
run: terraform plan -no-color | ||
- name: Terraform Apply | ||
if: ${{ github.event_name == 'push' }} | ||
id: apply | ||
run: terraform apply -auto-approve |
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 was deleted.
Oops, something went wrong.
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.