Skip to content

Commit

Permalink
Merge pull request #1340 from sourcenetwork/release/0.5.0
Browse files Browse the repository at this point in the history
Release v0.5.0
  • Loading branch information
jsimnz authored Apr 13, 2023
2 parents e6c800f + 1831d36 commit 9ff3eb6
Show file tree
Hide file tree
Showing 578 changed files with 35,348 additions and 13,030 deletions.
23 changes: 23 additions & 0 deletions .github/DISCUSSION_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: "[Feature request] "
labels: ["Submit a request for a new feature or improvement."]
body:
- type: textarea
id: problem
attributes:
label: Is the request related to a problem?
description: "Provide a clear and concise description of what the problem is. Ex. I'm frustrated when [...]"
- type: textarea
id: feature
attributes:
label: The feature you would like
description: "Provide a clear and concise description of what you want to happen."
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: "Describe alternatives you've considered"
- type: textarea
id: context
attributes:
label: Additional context
description: "Add any other context or screenshots about the feature request here."
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---

**Describe the problem**
(*replace*) A clear and concise description of what the bug is.

**To Reproduce**
(*replace*) Steps to reproduce the behavior.

**Expected behavior**
(*replace*) A clear and concise description of what you expected to happen.

**Platform**
(*replace*) The platform information and DefraDB's version obtained with the `defradb version` command.

**Additional context**
(*replace*) Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Feature request
url: https://github.com/sourcenetwork/defradb/discussions/new?category=feature-request
about: To request a new feature or improvement.
- name: Discussion
url: https://github.com/sourcenetwork/defradb/discussions
about: To discuss DefraDB or ask questions.
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ comment:
ignore:
- "tests"
- "**/*_test.go"
- "**/*.pb.go"
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
commit-message:
prefix: "bot"
59 changes: 59 additions & 0 deletions .github/workflows/build-ami-with-packer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 2023 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Build AMI With Packer Workflow

on:
push:
tags: ["v[0-9].[0-9]+.[0-9]+"]

env:
PACKER_LOG: 1
# RELEASE_VERSION: v0.4.0

jobs:
build-ami-with-packer:
name: Build ami with packer job

runs-on: ubuntu-latest

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3


- name: Environment version target
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# run: echo ${{ env.RELEASE_VERSION }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_AMI_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_AMI_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: "latest"

- name: Run `packer init`
id: init
run: "packer init ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"

- name: Run `packer validate`
id: validate
run: "packer validate -var \"github_pat=${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }}\" -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"

- name: Run `packer build`
id: build
run: "packer build -var \"github_pat=${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }}\" -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"
41 changes: 41 additions & 0 deletions .github/workflows/build-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2023 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Build Dependencies Workflow

on:
pull_request:

push:
tags:
- v*
branches:
- master
- develop

jobs:
build-dependencies:
name: Build dependencies job

runs-on: ubuntu-latest

steps:

- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.19"
check-latest: true

- name: Build all dependencies
run: make deps
12 changes: 11 additions & 1 deletion .github/workflows/code-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Copyright 2022 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Code Test Coverage Workflow

on: [push]
Expand All @@ -17,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.19"
check-latest: true

- name: Generate full test coverage report using go-acc
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/deploy-ami-with-terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Copyright 2023 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Deploy AMI With Terraform Workflow

env:
# Verbosity setting for Terraform logs
TF_LOG: INFO

# Credentials for deployment to AWS.
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_AMI_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_AMI_SECRET_ACCESS_KEY }}

# Set environment type: dev, test, prod
ENVIRONMENT: "dev"

on:
workflow_run:
workflows: ["Build AMI With Packer Workflow"]
types:
- completed

pull_request:

jobs:
deploy-ami-with-terraform:
name: Deploy ami with terraform job

if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/cloud/aws/terraform

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Terraform action setup
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.3.7

- name: Terraform format
id: fmt
run: terraform fmt -check

- name: Terraform initialization
id: init
run: terraform init -backend-config="workspaces/$ENVIRONMENT-backend.conf"

- name: Terraform workspace
id: wrokspace
run: terraform workspace select $ENVIRONMENT || terraform workspace new $ENVIRONMENT #Create workspace if it doesnt exist

- name: Terraform validate
id: validate
run: terraform validate -no-color

- name: Terraform plan
id: plan
if: github.event_name == 'pull_request'
run: terraform plan -no-color -input=false -var-file="workspaces/source-ec2-$ENVIRONMENT.tfvars"
continue-on-error: true

- name: Update pull request
uses: actions/github-script@v6

if: github.event_name == 'pull_request'

env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"

with:
github-token: ${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }} # Must have pull request write perms.
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`\n
${process.env.PLAN}
\`\`\`
</details>
*Pushed by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
- name: Terraform plan status
if: steps.plan.outcome == 'failure'
run: exit 1

- name: List workspaces
run: ls workspaces

- name: Terraform Apply # Only runs if pushed
if: github.event_name != 'pull_request'
run: terraform apply -auto-approve -input=false -var-file="workspaces/source-ec2-$ENVIRONMENT.tfvars"
12 changes: 11 additions & 1 deletion .github/workflows/detect-change.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Copyright 2022 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Detect Change Workflow

on:
Expand All @@ -23,7 +33,7 @@ jobs:
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.19"
check-latest: true

- name: Build dependencies
Expand Down
Loading

0 comments on commit 9ff3eb6

Please sign in to comment.