Skip to content

Commit

Permalink
Merge pull request #2949 from sourcenetwork/release/0.13.0
Browse files Browse the repository at this point in the history
Release v0.13.0
  • Loading branch information
fredcarle authored Aug 23, 2024
2 parents 1f9c3ee + f9e3be6 commit 495c456
Show file tree
Hide file tree
Showing 749 changed files with 37,462 additions and 25,688 deletions.
76 changes: 46 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,11 @@ jobs:
cache: false

- name: Apply tag
run: git tag ${{ github.event.inputs.tag }}
run: git tag v${{ github.event.inputs.tag }}

- name: Build modules
run: make deps:modules

- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v3

- name: Log in to Docker Hub
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run command to get SHA environment
shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -114,7 +95,7 @@ jobs:
fetch-depth: 0

- name: Apply tag
run: git tag ${{ github.event.inputs.tag }}
run: git tag v${{ github.event.inputs.tag }}

- name: Setup Go environment explicitly
uses: actions/setup-go@v5
Expand All @@ -123,12 +104,6 @@ jobs:
check-latest: true
cache: false

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Run command to get SHA environment
shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -179,17 +154,58 @@ jobs:
GITHUB_REPOSITORY: ${{ github.repository }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

docker-build-push:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code into the directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: tools/defradb.containerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ github.repository_owner }}/defradb:latest
${{ github.repository_owner }}/defradb:${{ github.event.inputs.tag }}
ghcr.io/${{ github.repository_owner }}/defradb:latest
ghcr.io/${{ github.repository_owner }}/defradb:${{ github.event.inputs.tag }}
pull-docker-image:
name: Pull docker image job
runs-on: ubuntu-latest
needs: prepare
needs: docker-build-push

strategy:
fail-fast: false
matrix:
image_tag:
- sourcenetwork/defradb:latest
- ghcr.io/sourcenetwork/defradb:latest
- ${{ github.repository_owner }}/defradb:latest
- ghcr.io/${{ github.repository_owner }}/defradb:latest

steps:
- name: Log in to Docker Hub
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test-and-upload-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,57 @@ jobs:
database-type: [badger-file, badger-memory]
mutation-type: [gql, collection-named, collection-save]
lens-type: [wasm-time]
acp-type: [local]
database-encryption: [false]
include:
- os: ubuntu-latest
client-type: go
database-type: badger-memory
mutation-type: collection-save
lens-type: wasm-time
acp-type: local
database-encryption: true
- os: ubuntu-latest
client-type: go
database-type: badger-memory
mutation-type: collection-save
lens-type: wazero
acp-type: local
database-encryption: false
- os: ubuntu-latest
client-type: go
database-type: badger-memory
mutation-type: collection-save
lens-type: wasmer
acp-type: local
database-encryption: false
- os: ubuntu-latest
client-type: go
database-type: badger-memory
mutation-type: collection-save
lens-type: wasm-time
acp-type: source-hub
database-encryption: false
- os: ubuntu-latest
client-type: http
database-type: badger-memory
mutation-type: collection-save
lens-type: wasm-time
acp-type: source-hub
database-encryption: false
- os: ubuntu-latest
client-type: cli
database-type: badger-memory
mutation-type: collection-save
lens-type: wasm-time
acp-type: source-hub
database-encryption: false
- os: macos-latest
client-type: go
database-type: badger-memory
mutation-type: collection-save
lens-type: wasm-time
acp-type: local
database-encryption: false
## TODO: https://github.com/sourcenetwork/defradb/issues/2080
## Uncomment the lines below to Re-enable the windows build once this todo is resolved.
Expand All @@ -68,6 +94,7 @@ jobs:
## database-type: badger-memory
## mutation-type: collection-save
## lens-type: wasm-time
## acp-type: local
## database-encryption: false

runs-on: ${{ matrix.os }}
Expand All @@ -87,6 +114,7 @@ jobs:
DEFRA_BADGER_ENCRYPTION: ${{ matrix.database-encryption }}
DEFRA_MUTATION_TYPE: ${{ matrix.mutation-type }}
DEFRA_LENS_TYPE: ${{ matrix.lens-type }}
DEFRA_ACP_TYPE: ${{ matrix.acp-type }}

steps:
- name: Checkout code into the directory
Expand Down Expand Up @@ -143,6 +171,23 @@ jobs:
make deps:modules
make deps:test
# We have to checkout the source-hub repo and install it ourselves because it
# contains replace commands in its go.mod file.
- name: Checkout sourcehub code into the directory
if: ${{ matrix.acp-type == 'source-hub' }}
uses: actions/checkout@v4
with:
repository: sourcenetwork/sourcehub
path: _sourceHub
# Lock the sourcehub version until the dev branch is stable
# remove this when closed https://github.com/sourcenetwork/defradb/issues/2865
ref: c232133c35c96924509a4d955a7b450eb3624a15

- name: Install SourceHub CLI
if: ${{ matrix.acp-type == 'source-hub' }}
working-directory: _sourceHub
run: make install

- name: Run integration tests
run: make test:coverage

Expand All @@ -158,6 +203,7 @@ jobs:
_${{ matrix.database-type }}\
_${{ matrix.mutation-type }}\
_${{ matrix.lens-type }}\
_${{ matrix.acp-type }}\
_${{ matrix.database-encryption }}\
"
path: coverage.txt
Expand Down
20 changes: 0 additions & 20 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,3 @@ milestones:
- close: true
fail_on_error: false
name_template: "DefraDB v{{ .Major }}.{{ .Minor }}"

dockers:
- ids:
- "defradb_playground"
image_templates:
- "{{ .Env.GITHUB_REPOSITORY }}:latest"
- "{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}"
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.description=DefraDB is a Peer-to-Peer Edge Database."
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- "--platform=linux/amd64"
dockerfile: ./tools/goreleaser.containerfile
Loading

0 comments on commit 495c456

Please sign in to comment.